summaryrefslogtreecommitdiff
path: root/ale_linters/yaml/yamllint.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ale_linters/yaml/yamllint.vim')
-rw-r--r--ale_linters/yaml/yamllint.vim6
1 files changed, 6 insertions, 0 deletions
diff --git a/ale_linters/yaml/yamllint.vim b/ale_linters/yaml/yamllint.vim
index 9e075a75..f100667e 100644
--- a/ale_linters/yaml/yamllint.vim
+++ b/ale_linters/yaml/yamllint.vim
@@ -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