#427 Implement buffer variable overrides for all linter options

This commit is contained in:
w0rp
2017-04-16 01:24:08 +01:00
parent e80116cee0
commit e97dada261
45 changed files with 117 additions and 108 deletions

View File

@@ -15,7 +15,7 @@ function! ale_linters#scss#scsslint#Handle(buffer, lines) abort
continue
endif
if !g:ale_warn_about_trailing_whitespace && l:match[4] =~# '^TrailingWhitespace'
if g:ale_warn_about_trailing_whitespace && l:match[4] =~# '^TrailingWhitespace'
" Skip trailing whitespace warnings if that option is on.
continue
endif

View File

@@ -7,14 +7,14 @@ let g:ale_scss_stylelint_use_global =
\ get(g:, 'ale_scss_stylelint_use_global', 0)
function! ale_linters#scss#stylelint#GetExecutable(buffer) abort
if g:ale_scss_stylelint_use_global
return g:ale_scss_stylelint_executable
if ale#Var(a:buffer, 'scss_stylelint_use_global')
return ale#Var(a:buffer, 'scss_stylelint_executable')
endif
return ale#util#ResolveLocalPath(
\ a:buffer,
\ 'node_modules/.bin/stylelint',
\ g:ale_scss_stylelint_executable
\ ale#Var(a:buffer, 'scss_stylelint_executable')
\)
endfunction