summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Krichevsky <njk828@gmail.com>2017-06-27 10:07:26 -0400
committerw0rp <w0rp@users.noreply.github.com>2017-06-27 15:07:26 +0100
commit14cca6d1155720124bcc735b189212096a76391a (patch)
treeca4bf618383ff0ab225cf2c05e05680c120a1387
parent16ba9bd680f513affd7b5c64e2f012a85748393a (diff)
downloadale-14cca6d1155720124bcc735b189212096a76391a.zip
Remove style classification from E999 (#696)v1.4.0
* Remove style classification from E999 * Update test_flake8_handler to reflect E999 changes
-rw-r--r--ale_linters/python/flake8.vim2
-rw-r--r--test/handler/test_flake8_handler.vader9
2 files changed, 9 insertions, 2 deletions
diff --git a/ale_linters/python/flake8.vim b/ale_linters/python/flake8.vim
index df091053..fb02e1ee 100644
--- a/ale_linters/python/flake8.vim
+++ b/ale_linters/python/flake8.vim
@@ -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'
diff --git a/test/handler/test_flake8_handler.vader b/test/handler/test_flake8_handler.vader
index 7de28275..0d6d65fc 100644
--- a/test/handler/test_flake8_handler.vader
+++ b/test/handler/test_flake8_handler.vader
@@ -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
\ [
\ {
@@ -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):