diff options
author | w0rp <w0rp@users.noreply.github.com> | 2017-04-28 17:06:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-28 17:06:38 +0100 |
commit | e417dafa780aa62b5b5aed53956bd73a524f9758 (patch) | |
tree | 8cea3cad9a08f7820136348183b5b89aa75f3fb9 /ale_linters | |
parent | 944564bb8c5d9d6d3fdc4a96982586bf27d5031d (diff) | |
parent | 7230cbe9e43d64a02212ae4803abff874e39b8d6 (diff) | |
download | ale-e417dafa780aa62b5b5aed53956bd73a524f9758.zip |
Merge pull request #514 from adriaanzon/buffer-local-options-doc
Add tags for buffer-local variants of each linter option
Diffstat (limited to 'ale_linters')
-rw-r--r-- | ale_linters/javascript/xo.vim | 8 | ||||
-rw-r--r-- | ale_linters/sh/shellcheck.vim | 11 | ||||
-rw-r--r-- | ale_linters/sml/smlnj.vim | 2 |
3 files changed, 9 insertions, 12 deletions
diff --git a/ale_linters/javascript/xo.vim b/ale_linters/javascript/xo.vim index dc71f0d3..0276b551 100644 --- a/ale_linters/javascript/xo.vim +++ b/ale_linters/javascript/xo.vim @@ -11,20 +11,20 @@ let g:ale_javascript_xo_use_global = \ get(g:, 'ale_javascript_xo_use_global', 0) function! ale_linters#javascript#xo#GetExecutable(buffer) abort - if g:ale_javascript_xo_use_global - return g:ale_javascript_xo_executable + if ale#Var(a:buffer, 'javascript_xo_use_global') + return ale#Var(a:buffer, 'javascript_xo_executable') endif return ale#path#ResolveLocalPath( \ a:buffer, \ 'node_modules/.bin/xo', - \ g:ale_javascript_xo_executable + \ ale#Var(a:buffer, 'javascript_xo_executable') \) endfunction function! ale_linters#javascript#xo#GetCommand(buffer) abort return ale_linters#javascript#xo#GetExecutable(a:buffer) - \ . ' ' . g:ale_javascript_xo_options + \ . ' ' . ale#Var(a:buffer, 'javascript_xo_options') \ . ' --reporter unix --stdin --stdin-filename %s' endfunction diff --git a/ale_linters/sh/shellcheck.vim b/ale_linters/sh/shellcheck.vim index 1d9f7b05..b4a622a0 100644 --- a/ale_linters/sh/shellcheck.vim +++ b/ale_linters/sh/shellcheck.vim @@ -20,12 +20,6 @@ function! ale_linters#sh#shellcheck#GetExecutable(buffer) abort return ale#Var(a:buffer, 'sh_shellcheck_executable') endfunction -if g:ale_linters_sh_shellcheck_exclusions !=# '' - let s:exclude_option = '-e ' . g:ale_linters_sh_shellcheck_exclusions -else - let s:exclude_option = '' -endif - function! s:GetDialectArgument() abort if exists('b:is_bash') && b:is_bash return '-s bash' @@ -39,9 +33,12 @@ function! s:GetDialectArgument() abort endfunction function! ale_linters#sh#shellcheck#GetCommand(buffer) abort + let l:exclude_option = ale#Var(a:buffer, 'linters_sh_shellcheck_exclusions') + return ale_linters#sh#shellcheck#GetExecutable(a:buffer) \ . ' ' . ale#Var(a:buffer, 'sh_shellcheck_options') - \ . ' ' . s:exclude_option . ' ' . s:GetDialectArgument() . ' -f gcc -' + \ . ' ' . (!empty(l:exclude_option) ? '-e ' . l:exclude_option : '') + \ . ' ' . s:GetDialectArgument() . ' -f gcc -' endfunction call ale#linter#Define('sh', { diff --git a/ale_linters/sml/smlnj.vim b/ale_linters/sml/smlnj.vim index 48786370..fda1d038 100644 --- a/ale_linters/sml/smlnj.vim +++ b/ale_linters/sml/smlnj.vim @@ -39,7 +39,7 @@ function! ale_linters#sml#smlnj#Handle(buffer, lines) abort return l:out endfunction -call g:ale#linter#Define('sml', { +call ale#linter#Define('sml', { \ 'name': 'smlnj', \ 'executable': 'sml', \ 'command': 'sml', |