Fix 2726 - fix terraform linter.

Instead of using `terraform fmt` for linting use `terraform validate`
with json output.
This commit is contained in:
Horacio Sanson
2021-01-30 17:11:12 +09:00
parent 7c44f4e403
commit d511d5af11
3 changed files with 76 additions and 33 deletions

View File

@@ -6,4 +6,10 @@ After:
call ale#assert#TearDownLinterTest()
Execute(The default command should be correct):
AssertLinter 'terraform', ale#Escape('terraform') . ' fmt -no-color --check=true -'
AssertLinter 'terraform',
\ ale#Escape('terraform') . ' validate -no-color -json '
Execute(The default command should be overriden):
let b:ale_terraform_terraform_executable = '/bin/other/terraform'
AssertLinter '/bin/other/terraform',
\ ale#Escape('/bin/other/terraform') . ' validate -no-color -json '