summaryrefslogtreecommitdiff
path: root/ale_linters
diff options
context:
space:
mode:
authorCyril Roelandt <tipecaml@gmail.com>2018-08-30 03:42:44 +0200
committerCyril Roelandt <tipecaml@gmail.com>2018-08-30 03:42:44 +0200
commit244c5a8ce5f400efc76977c480965df0019d8fff (patch)
tree7a8c990d60197fc75be1e2e7f9aadd962c3ed875 /ale_linters
parent3c85c7ef65242cf80279cf9dcf843523f6d7875b (diff)
downloadale-244c5a8ce5f400efc76977c480965df0019d8fff.zip
gitcommit: fully implement warn_about_trailing_whitespace
Fixes #1761
Diffstat (limited to 'ale_linters')
-rw-r--r--ale_linters/gitcommit/gitlint.vim6
1 files changed, 4 insertions, 2 deletions
diff --git a/ale_linters/gitcommit/gitlint.vim b/ale_linters/gitcommit/gitlint.vim
index ec3bfb0b..a9c4822d 100644
--- a/ale_linters/gitcommit/gitlint.vim
+++ b/ale_linters/gitcommit/gitlint.vim
@@ -23,8 +23,10 @@ function! ale_linters#gitcommit#gitlint#Handle(buffer, lines) abort
for l:match in ale#util#GetMatches(a:lines, l:pattern)
let l:code = l:match[2]
- if l:code is# 'T2' && !ale#Var(a:buffer, 'warn_about_trailing_whitespace')
- continue
+ if !ale#Var(a:buffer, 'warn_about_trailing_whitespace')
+ if l:code is# 'T2' || l:code is# 'B2'
+ continue
+ endif
endif
let l:item = {