Find executable for shellcheck

Wanted to be able to use `shellcheck` that was installed in node_modules.
This commit is contained in:
Josh Sherman 2018-03-06 23:27:59 -06:00
parent 0a0535546f
commit 80ef6ef6a7
No known key found for this signature in database
GPG key ID: 55B058A80530EF22

View file

@ -12,11 +12,16 @@ let g:ale_sh_shellcheck_exclusions =
let g:ale_sh_shellcheck_executable =
\ get(g:, 'ale_sh_shellcheck_executable', 'shellcheck')
let g:ale_sh_shellcheck_use_global =
\ get(g:, 'ale_sh_shellcheck_use_global', 0)
let g:ale_sh_shellcheck_options =
\ get(g:, 'ale_sh_shellcheck_options', '')
function! ale_linters#sh#shellcheck#GetExecutable(buffer) abort
return ale#Var(a:buffer, 'sh_shellcheck_executable')
return ale#node#FindExecutable(a:buffer, 'sh_shellcheck', [
\ 'node_modules/.bin/shellcheck',
\])
endfunction
function! ale_linters#sh#shellcheck#GetDialectArgument(buffer) abort