2017-10-26 18:32:33 +00:00
|
|
|
Before:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#SetUpLinterTest('terraform', 'tflint')
|
2017-10-26 18:32:33 +00:00
|
|
|
|
|
|
|
After:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#TearDownLinterTest()
|
2017-10-26 18:32:33 +00:00
|
|
|
|
2023-09-16 21:22:01 +00:00
|
|
|
Execute(The default tflint command should be correct):
|
2021-05-25 00:41:14 +00:00
|
|
|
AssertLinter 'tflint', ale#Escape('tflint') . ' -f json'
|
2017-10-26 18:32:33 +00:00
|
|
|
|
2023-09-16 21:22:01 +00:00
|
|
|
Execute(Test tflint executable and command should be configurable):
|
2017-10-26 18:32:33 +00:00
|
|
|
let g:ale_terraform_tflint_executable = 'fnord'
|
|
|
|
let g:ale_terraform_tflint_options = '--whatever'
|
2018-07-15 17:24:53 +00:00
|
|
|
|
2021-05-25 00:41:14 +00:00
|
|
|
AssertLinter 'fnord', ale#Escape('fnord') . ' --whatever -f json'
|
2018-08-02 22:44:12 +00:00
|
|
|
|
|
|
|
Execute(Configuration files should be found):
|
2021-03-20 22:11:22 +00:00
|
|
|
call ale#test#SetFilename('../test-files/tflint/foo/bar.tf')
|
2018-08-02 22:44:12 +00:00
|
|
|
|
|
|
|
AssertLinter 'tflint',
|
|
|
|
\ ale#Escape('tflint')
|
|
|
|
\ . ' --config '
|
2021-03-20 22:11:22 +00:00
|
|
|
\ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/tflint/foo/.tflint.hcl'))
|
2021-05-25 00:41:14 +00:00
|
|
|
\ . ' -f json'
|