From 80ef6ef6a7f1fba7f3dbc770e1807b04caeb3ae4 Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Tue, 6 Mar 2018 23:27:59 -0600 Subject: [PATCH] Find executable for `shellcheck` Wanted to be able to use `shellcheck` that was installed in node_modules. --- ale_linters/sh/shellcheck.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ale_linters/sh/shellcheck.vim b/ale_linters/sh/shellcheck.vim index 27c7453..ac66892 100644 --- a/ale_linters/sh/shellcheck.vim +++ b/ale_linters/sh/shellcheck.vim @@ -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