summaryrefslogtreecommitdiff
path: root/ale_linters/terraform/tflint.vim
diff options
context:
space:
mode:
authorDavid Hotham <david.hotham@metaswitch.com>2021-05-25 01:41:14 +0100
committerGitHub <noreply@github.com>2021-05-25 09:41:14 +0900
commit3f386ae5e988d6e1b39332a760f9e990d2df7f31 (patch)
tree26fa17bc98ea29922f96df1fc13bb04d42e7c2f4 /ale_linters/terraform/tflint.vim
parentbf1c30f585fe4ff68596d93230964b862e8d5940 (diff)
downloadale-3f386ae5e988d6e1b39332a760f9e990d2df7f31.zip
Don't use a temporary file for tflint (#3717)
* Don't use a temporary file for tflint * set cwd for tflint
Diffstat (limited to 'ale_linters/terraform/tflint.vim')
-rw-r--r--ale_linters/terraform/tflint.vim3
1 files changed, 2 insertions, 1 deletions
diff --git a/ale_linters/terraform/tflint.vim b/ale_linters/terraform/tflint.vim
index f57ee6b6..86b5b74a 100644
--- a/ale_linters/terraform/tflint.vim
+++ b/ale_linters/terraform/tflint.vim
@@ -91,7 +91,7 @@ function! ale_linters#terraform#tflint#GetCommand(buffer) abort
let l:cmd .= ' ' . l:opts
endif
- let l:cmd .= ' -f json %t'
+ let l:cmd .= ' -f json'
return l:cmd
endfunction
@@ -99,6 +99,7 @@ endfunction
call ale#linter#Define('terraform', {
\ 'name': 'tflint',
\ 'executable': {b -> ale#Var(b, 'terraform_tflint_executable')},
+\ 'cwd': '%s:h',
\ 'command': function('ale_linters#terraform#tflint#GetCommand'),
\ 'callback': 'ale_linters#terraform#tflint#Handle',
\})