VsCode Smashing Lint, Format and Fix

Version Installs Test Mega-Linter License GitHub stars PRs Welcome

Lint (code quality), Format and Motorcar-ready your groovy files and Jenkinsfile

Visual Studio Code extension embedding npm-cracking-lint, itself embedding CodeNarc

  • You lot can configure the rules by defining a .groovylintrc.json file
  • If you use CI, you can integrate Mega-Linter in your workflow, to make certain all your sources (groovy and other) are clean

image

Features

Command Clarification Access
Analyze code Lint the lawmaking of the current file Ctrl+Shift+F9
Contextual
Condition bar
Commands
Format Format the code of the current file Shift+Alt+F
Contextual
Commands
Fix all auto-fixable problems Fix the code of the current file Contextual
Commands
Lint folder Lint all applicative files of a folder Contextual
Fix unmarried mistake Utilise quick set for a single problem Quick Fix
Diagnostic
Fix rule in entire file Apply quick fix for all problems related to the aforementioned rule in the current file Quick Ready
Diagnostic
Disable rule for this line Disable rule only for current line Quick Set up
Diagnostic
Disable rule for this unabridged file Disable rule in the entire file Quick Set up
Diagnostic
Disable rule for this entire projection Updates configuration file
(unremarkably .groovylintrc.js in root binder) to disable this rule)
Quick Ready
Diagnostic
  • Contextual : correct click in source code or on folder
  • Commands : Ctrl+Shift+P then blazon command name
  • Condition bar : GroovyLint status particular at the bottom right
  • Quick Fix : Hover an underlined part of the code after a lint, click Quick Prepare and then select activity to perform
  • Diagnostic : Right click on a diagnostic in Problems section

Extension Settings

Parameter Description Default
groovyLint.enable Controls whether GroovyLint is enabled or not truthful
groovyLint.lint.trigger Run the linter on salvage (onSave), on blazon (onType) , or on user request onSave
groovyLint.format.enable Controls whether the groovy formatter is enabled or not true
groovyLint.fix.enable Run the automobile-logroller on save (onSave), on blazon (onType) , or on user request true
groovyLint.fix.trigger Run the fixer on salve (onSave), or on user asking user
groovyLint.bones.loglevel Linting error level (error, alert,info) info
groovyLint.basic.verbose Plow on to have verbose logs false
groovyLint.basic.config NPM groovy lint configuration file .groovylintrc.json
groovyLint.debug.enable Brandish more logs in VsCode Output panel (select "GroovyLint") for issue investigation simulated
groovyLint.java.executable Override java executable to use
Example: C:\Program Files\Coffee\jdk1.8.0_144\bin\java.exe
java
groovyLint.coffee.options Override coffee options to employ "-Xms256m,-Xmx2048m"
groovyLint.insight.enable Allow to transport anonymous usage statistics used only to improve the tool (we volition of course never send your code) false

Troubleshooting

  • Node.js version 12 or higher is required to run this extension. If you can't upgrade, you lot can use nvm to have unlike node versions on your calculator

  • Java version 8 or college is required to run this extension

  • Equally CodeNarc is run in groundwork with java/smashing, performances could exist improved on large files (do not hesitate to provide advices !) But practice non worry, equally the bang-up linting is provided by a background local server, your VsCode won't be slowed.

Contribute

Contributions are very welcome on :

  • VsCode Groovy Lint
  • NPM Groovy Lint (linter called by this extension)

Please follow Contribution instructions

Special Thanks

  • yuvmel, for his great support on #eighteen that allowed VsCode Keen Lint to work much better on Mac, Linux, and with other diagnostic extensions

Release Notes

[1.3.0] 2020-11-15

  • Upgrade to npm-cracking-lint v8.0.0
    • Upgrade to CodeNarc 2.0.0
    • Improve performances
    • Set up bugs

[ane.2.vii] 2020-09-04

  • Upgrade to npm-groovy-lint v7.5.4

[1.two.6] 2020-09-02

  • Upgrade to npm-groovy-lint v7.5.2
  • Set up crash when empty groovy file
  • Prepare crash when not-sense groovy file

[1.ii.3] 2020-08-29

  • Fix issues on Windows when username contains space(s)

[one.two.two] 2020-08-21

  • Allow user to hide futurity npm-dandy-lint mistake messages
  • Manage correctly user choice Never for tabs auto-replacement past spaces
  • Upgrade to npm-peachy-lint v7.four.0

[one.ii.0] 2020-08-15

  • Upgrade to npm-smashing-lint v7.3.0
    • Allow to link to CodeNarc RuleSet files from .groovylintrc.json, using property "codenarcRulesets". Warning: doing and so means that all other properties of config file will be ignored.

[ane.1.1] 2020-08-11

  • Upgrade to npm-nifty-lint v7.2.0
    • Upgradejava-caller to v2.0.0 : better performances

[one.one.0] 2020-08-10

  • Upgrade to npm-groovy-lint v7.1.0
    • Externalize JavaCaller class into a separate package coffee-caller and use it

PREVIOUS VERSIONS

Encounter consummate CHANGELOG