mirror of
https://github.com/dense-analysis/ale.git
synced 2026-07-29 19:26:46 +08:00
feat(terraform): add trivy (#5100)
* feat(terraform): add trivy * fixup! feat(terraform): add trivy --------- Co-authored-by: cos <cos>
This commit is contained in:
co-authored by
cos <cos>
parent
c874be57bc
commit
069baf559e
@@ -0,0 +1,20 @@
|
||||
Before:
|
||||
call ale#assert#SetUpLinterTest('terraform', 'trivy')
|
||||
|
||||
After:
|
||||
call ale#assert#TearDownLinterTest()
|
||||
|
||||
Execute(The default command should be correct):
|
||||
AssertLinter 'trivy', ale#Escape('trivy') . ' config --format json .'
|
||||
|
||||
Execute(The default executable should be configurable):
|
||||
let b:ale_terraform_trivy_executable = '/usr/bin/trivy'
|
||||
|
||||
AssertLinter '/usr/bin/trivy', ale#Escape('/usr/bin/trivy') . ' config --format json .'
|
||||
|
||||
Execute(Overriding options should work):
|
||||
let g:ale_terraform_trivy_executable = '/usr/local/bin/trivy'
|
||||
let g:ale_terraform_trivy_options = '--severity HIGH,CRITICAL'
|
||||
|
||||
AssertLinter '/usr/local/bin/trivy',
|
||||
\ ale#Escape('/usr/local/bin/trivy') . ' config --format json --severity HIGH,CRITICAL .'
|
||||
Reference in New Issue
Block a user