2017-10-26 18:32:33 +00:00
|
|
|
Before:
|
|
|
|
Save g:ale_terraform_tflint_executable
|
|
|
|
Save g:ale_terraform_tflint_options
|
|
|
|
|
|
|
|
runtime ale_linters/terraform/tflint.vim
|
|
|
|
|
|
|
|
After:
|
|
|
|
Restore
|
|
|
|
|
2017-11-15 17:21:17 +00:00
|
|
|
call ale#linter#Reset()
|
2017-10-26 18:32:33 +00:00
|
|
|
|
|
|
|
Execute(The default executable should be configurable):
|
|
|
|
AssertEqual 'tflint', ale_linters#terraform#tflint#GetExecutable(bufnr(''))
|
|
|
|
|
|
|
|
let g:ale_terraform_tflint_executable = 'asdf'
|
|
|
|
|
|
|
|
AssertEqual 'asdf', ale_linters#terraform#tflint#GetExecutable(bufnr(''))
|
|
|
|
|
|
|
|
Execute(The default command should be good):
|
|
|
|
let g:ale_terraform_tflint_executable = 'tflint'
|
|
|
|
AssertEqual
|
2017-10-26 19:14:28 +00:00
|
|
|
\ ale#Escape('tflint') . ' -f json %t',
|
2017-10-26 18:32:33 +00:00
|
|
|
\ ale_linters#terraform#tflint#GetCommand(bufnr(''))
|
|
|
|
|
|
|
|
Execute(Overriding things should work):
|
|
|
|
let g:ale_terraform_tflint_executable = 'fnord'
|
|
|
|
let g:ale_terraform_tflint_options = '--whatever'
|
|
|
|
AssertEqual
|
2017-10-26 19:14:28 +00:00
|
|
|
\ ale#Escape('fnord') . ' --whatever -f json %t',
|
2017-10-26 18:32:33 +00:00
|
|
|
\ ale_linters#terraform#tflint#GetCommand(bufnr(''))
|