mirror of
https://github.com/dense-analysis/ale.git
synced 2026-10-11 23:50:14 +08:00
Allow warnings about trailing whitespace to be disabled for pycodestyle, and cover the flake8 code with tests
This commit is contained in:
1 parent
0ab689db0a
commit
a43ada93e4
3 files changed
+84
No files matched your search
@@ -23,6 +23,12 @@ function! ale_linters#python#pycodestyle#Handle(buffer, lines) abort
|
||||
" lines are formatted as follows:
|
||||
" file.py:21:26: W291 trailing whitespace
|
||||
for l:match in ale#util#GetMatches(a:lines, l:pattern)
|
||||
if(l:match[4] is# 'W291' || l:match[4] is# 'W293')
|
||||
\&& !ale#Var(a:buffer, 'warn_about_trailing_whitespace')
|
||||
" Skip warnings for trailing whitespace if the option is off.
|
||||
continue
|
||||
endif
|
||||
|
||||
if l:match[4] is# 'W391'
|
||||
\&& !ale#Var(a:buffer, 'warn_about_trailing_blank_lines')
|
||||
" Skip warnings for trailing blank lines if the option is off
|
||||
|
||||
Reference in new issue
Block a user