summaryrefslogtreecommitdiff
path: root/ale_linters
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-10-26 00:48:51 +0100
committerw0rp <devw0rp@gmail.com>2017-10-26 00:48:51 +0100
commit5917de565d4e89c73e69727848b7fba3e2730c57 (patch)
tree53d826663a779d33259e7a0e9a5b18755a300ffa /ale_linters
parent2f5b94e07d3a9a2fbd7ebf26dc15cbe158eb738f (diff)
downloadale-5917de565d4e89c73e69727848b7fba3e2730c57.zip
Fix #491 - Use -x for shellcheck for checking files with sourced files
Diffstat (limited to 'ale_linters')
-rw-r--r--ale_linters/sh/shellcheck.vim5
1 files changed, 3 insertions, 2 deletions
diff --git a/ale_linters/sh/shellcheck.vim b/ale_linters/sh/shellcheck.vim
index b47ba19f..68844a05 100644
--- a/ale_linters/sh/shellcheck.vim
+++ b/ale_linters/sh/shellcheck.vim
@@ -43,11 +43,12 @@ function! ale_linters#sh#shellcheck#GetCommand(buffer) abort
let l:exclude_option = ale#Var(a:buffer, 'sh_shellcheck_exclusions')
let l:dialect = ale_linters#sh#shellcheck#GetDialectArgument(a:buffer)
- return ale_linters#sh#shellcheck#GetExecutable(a:buffer)
+ return ale#path#BufferCdString(a:buffer)
+ \ . ale#Escape(ale_linters#sh#shellcheck#GetExecutable(a:buffer))
\ . (!empty(l:dialect) ? ' -s ' . l:dialect : '')
\ . (!empty(l:options) ? ' ' . l:options : '')
\ . (!empty(l:exclude_option) ? ' -e ' . l:exclude_option : '')
- \ . ' -f gcc -'
+ \ . ' -x -f gcc -'
endfunction
call ale#linter#Define('sh', {