mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-17 15:34:14 +08:00
Respect ale_warn_about_trailing_whitespace for yamllint
This commit is contained in:
@@ -34,6 +34,12 @@ function! ale_linters#yaml#yamllint#Handle(buffer, lines) abort
|
||||
let l:code_match = matchlist(l:item.text, '\v^(.+) \(([^)]+)\)$')
|
||||
|
||||
if !empty(l:code_match)
|
||||
if l:code_match[2] is# 'trailing-spaces'
|
||||
\&& !ale#Var(a:buffer, 'warn_about_trailing_whitespace')
|
||||
" Skip warnings for trailing whitespace if the option is off.
|
||||
continue
|
||||
endif
|
||||
|
||||
let l:item.text = l:code_match[1]
|
||||
let l:item.code = l:code_match[2]
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user