#427 Implement b:ale_warn_about_trailing_whitespace
This commit is contained in:
parent
c2a0847f99
commit
14f3fc777f
@ -9,8 +9,9 @@ function! ale_linters#scss#scsslint#Handle(buffer, lines) abort
|
|||||||
let l:output = []
|
let l:output = []
|
||||||
|
|
||||||
for l:match in ale#util#GetMatches(a:lines, l:pattern)
|
for l:match in ale#util#GetMatches(a:lines, l:pattern)
|
||||||
if g:ale_warn_about_trailing_whitespace && l:match[4] =~# '^TrailingWhitespace'
|
if !ale#Var(a:buffer, 'warn_about_trailing_whitespace')
|
||||||
" Skip trailing whitespace warnings if that option is on.
|
\&& l:match[4] =~# '^TrailingWhitespace'
|
||||||
|
" Skip trailing whitespace warnings if that option is off.
|
||||||
continue
|
continue
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ function! ale#handlers#python#HandlePEP8Format(buffer, lines) abort
|
|||||||
let l:code = l:match[3]
|
let l:code = l:match[3]
|
||||||
|
|
||||||
if (l:code ==# 'W291' || l:code ==# 'W293' || l:code ==# 'EANSIBLE002')
|
if (l:code ==# 'W291' || l:code ==# 'W293' || l:code ==# 'EANSIBLE002')
|
||||||
\ && !g:ale_warn_about_trailing_whitespace
|
\ && !ale#Var(a:buffer, 'warn_about_trailing_whitespace')
|
||||||
" Skip warnings for trailing whitespace if the option is off.
|
" Skip warnings for trailing whitespace if the option is off.
|
||||||
continue
|
continue
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user