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

View File

@@ -0,0 +1,16 @@
" Based upon :help ale-development
Before:
call ale#assert#SetUpLinterTest('rego', 'opacheck')
After:
call ale#assert#TearDownLinterTest()
Execute(The default command should be correct):
AssertLinter 'opa',
\ ale#Escape('opa') . ' check %s --format json '
Execute(The default command should be overriden):
let b:ale_rego_opacheck_executable = '/bin/other/opa'
AssertLinter '/bin/other/opa',
\ ale#Escape('/bin/other/opa') . ' check %s --format json '