Add support for npm-groovy-lint (#4495)

* Add support for npm-groovy-lint

* Add doc and tests for npm-groovy-lint

* Use ale#util#FuzzyJSONDecode instead of json_decode
This commit is contained in:
lucas-str
2023-05-06 02:02:07 +02:00
committed by GitHub
parent 61248e1453
commit 9fe9f11521
11 changed files with 223 additions and 0 deletions

42
doc/ale-groovy.txt Normal file
View File

@@ -0,0 +1,42 @@
===============================================================================
ALE Groovy Integration *ale-groovy-options*
===============================================================================
Integration Information
Linting and fixing of Groovy files is enabled with the integration of
`npm-groovy-lint`.
===============================================================================
npm-groovy-lint *ale-groovy-npm-groovy-lint*
g:ale_groovy_npmgroovylint_executable *g:ale_groovy_npmgroovylint_executable*
*b:ale_groovy_npmgroovylint_executable*
Type: |String|
Default: `'npm-groovy-lint'`
Location of the npm-groovy-lint binary file.
g:ale_groovy_npmgroovylint_options *g:ale_groovy_npmgroovylint_options*
*b:ale_groovy_npmgroovylint_options*
Type: |String|
Default: `'--loglevel warning'`
Additional npm-groovy-lint linter options.
g:ale_groovy_npmgroovylint_fix_options *g:ale_groovy_npmgroovylint_fix_options*
*b:ale_groovy_npmgroovylint_fix_options*
Type: |String|
Default: `'--fix'`
This variable can be used to configure fixing with npm-groovy-lint. It must
contain either `--fix` or `--format` for the fixer to work. See
`npm-groovy-lint --help` for more information on possible fix rules.
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

View File

@@ -223,6 +223,8 @@ Notes:
* `eslint`
* `gqlint`
* `prettier`
* Groovy
* `npm-groovy-lint`
* Hack
* `hack`
* `hackfmt`

View File

@@ -1642,6 +1642,7 @@ g:ale_linters *g:ale_linters*
\ 'csh': ['shell'],
\ 'elixir': ['credo', 'dialyxir', 'dogma'],
\ 'go': ['gofmt', 'golint', 'gopls', 'govet'],
\ 'groovy': ['npm-groovy-lint'],
\ 'hack': ['hack'],
\ 'help': [],
\ 'inko': ['inko'],
@@ -2995,6 +2996,8 @@ documented in additional help files.
eslint................................|ale-graphql-eslint|
gqlint................................|ale-graphql-gqlint|
prettier..............................|ale-graphql-prettier|
groovy..................................|ale-groovy-options|
npm-groovy-lint.......................|ale-groovy-npm-groovy-lint|
hack....................................|ale-hack-options|
hack..................................|ale-hack-hack|
hackfmt...............................|ale-hack-hackfmt|