add rego support (#4199)

* add opa fmt fixer for rego files

* add opa linter

* add basic tests for linter and fixer

* add cspell to the docs
This commit is contained in:
Reza J. Bavaghoush
2022-05-16 14:14:11 +02:00
committed by GitHub
parent 5479b58660
commit 75d2413425
10 changed files with 191 additions and 0 deletions

50
doc/ale-rego.txt Normal file
View File

@@ -0,0 +1,50 @@
===============================================================================
ALE Rego Integration *ale-rego-options*
===============================================================================
cspell *ale-rego-cspell*
See |ale-cspell-options|
===============================================================================
opacheck *ale-rego-opa-check*
g:ale_rego_opacheck_executable *g:rego_opacheck_executable*
*b:rego_opacheck_executable*
Type: |String|
Default: `'opa'`
This variable can be changed to use a different executable for opa.
g:rego_opacheck_options *g:rego_opacheck_options*
*b:rego_opacheck_options*
Type: |String|
Default: `''`
This variable can be changed to pass custom CLI flags to opa check.
===============================================================================
opafmt *ale-rego-opa-fmt-fixer*
g:ale_opa_fmt_executable *g:ale_opa_fmt_executable*
*b:ale_opa_fmt_executable*
Type: |String|
Default: `'opa'`
This variable can be changed to use a different executable for opa.
g:ale_opa_fmt_options *g:ale_opa_fmt_options*
*b:ale_opa_fmt_options*
Type: |String|
Default: `''`
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

View File

@@ -489,6 +489,10 @@ Notes:
* `ols`
* `reason-language-server`
* `refmt`
* Rego
* `cspell`
* `opacheck`
* `opafmt`
* reStructuredText
* `alex`
* `cspell`

View File

@@ -3128,6 +3128,10 @@ documented in additional help files.
ols...................................|ale-reasonml-ols|
reason-language-server................|ale-reasonml-language-server|
refmt.................................|ale-reasonml-refmt|
rego....................................|ale-rego-options|
cspell................................|ale-rego-cspell|
opacheck..............................|ale-rego-opa-check|
opafmt................................|ale-rego-opa-fmt-fixer|
restructuredtext........................|ale-restructuredtext-options|
cspell................................|ale-restructuredtext-cspell|
textlint..............................|ale-restructuredtext-textlint|