diff options
author | w0rp <devw0rp@gmail.com> | 2017-10-26 00:48:51 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-10-26 00:48:51 +0100 |
commit | 5917de565d4e89c73e69727848b7fba3e2730c57 (patch) | |
tree | 53d826663a779d33259e7a0e9a5b18755a300ffa /ale_linters | |
parent | 2f5b94e07d3a9a2fbd7ebf26dc15cbe158eb738f (diff) | |
download | ale-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.vim | 5 |
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', { |