Skip to content

Commit

Permalink
Remove style classification from E999 (#696)
Browse files Browse the repository at this point in the history
* Remove style classification from E999

* Update test_flake8_handler to reflect E999 changes
  • Loading branch information
ollien authored and w0rp committed Jun 27, 2017
1 parent 16ba9bd commit 14cca6d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ale_linters/python/flake8.vim
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function! ale_linters#python#flake8#Handle(buffer, lines) abort
\ 'type': 'W',
\}

if l:code[:0] ==# 'F'
if l:code[:0] ==# 'F' || l:code ==# 'E999'
let l:item.type = 'E'
elseif l:code[:0] ==# 'E'
let l:item.type = 'E'
Expand Down
9 changes: 8 additions & 1 deletion test/handler/test_flake8_handler.vader
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Before:
After:
call ale#linter#Reset()

Execute(The flake8 handler should handle basic warnings):
Execute(The flake8 handler should handle basic warnings and syntax errors):
AssertEqual
\ [
\ {
Expand All @@ -21,10 +21,17 @@ Execute(The flake8 handler should handle basic warnings):
\ 'text': 'W123: some warning',
\ 'sub_type': 'style',
\ },
\ {
\ 'lnum': 8,
\ 'col': 3,
\ 'type': 'E',
\ 'text': 'E999: SyntaxError: invalid syntax',
\ },
\ ],
\ ale_linters#python#flake8#Handle(1, [
\ 'stdin:6:6: E111 indentation is not a multiple of four',
\ 'stdin:7:6: W123 some warning',
\ 'stdin:8:3: E999 SyntaxError: invalid syntax',
\ ])

Execute(The flake8 handler should set end column indexes should be set for certain errors):
Expand Down

0 comments on commit 14cca6d

Please sign in to comment.