summaryrefslogtreecommitdiff
path: root/ale_linters/python
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2016-09-15 13:08:21 +0100
committerw0rp <devw0rp@gmail.com>2016-09-15 13:08:21 +0100
commitc4fb7f949d7880a80e4b1879cf6cd5c2d251980e (patch)
treeb5060541640e07b28fbc61e5d0ec3883c9f5440d /ale_linters/python
parentb236b6b35310ad4d50017b95ac20a2a5ffb9950c (diff)
downloadale-c4fb7f949d7880a80e4b1879cf6cd5c2d251980e.zip
Add an option disabling warnings about trailing whitespace, and use it in flake8.
Diffstat (limited to 'ale_linters/python')
-rw-r--r--ale_linters/python/flake8.vim5
1 files changed, 5 insertions, 0 deletions
diff --git a/ale_linters/python/flake8.vim b/ale_linters/python/flake8.vim
index 8f33f9ef..ba754fef 100644
--- a/ale_linters/python/flake8.vim
+++ b/ale_linters/python/flake8.vim
@@ -24,6 +24,11 @@ function! ale_linters#python#flake8#Handle(buffer, lines)
let text = l:match[4]
let type = code[0] ==# 'E' ? 'E' : 'W'
+ if code ==# 'W291' && !g:ale_warn_about_trailing_whitespace
+ " Skip warnings for trailing whitespace if the option is off.
+ continue
+ endif
+
" vcol is Needed to indicate that the column is a character.
call add(output, {
\ 'bufnr': a:buffer,