diff options
author | w0rp <devw0rp@gmail.com> | 2017-11-14 09:41:29 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-11-14 09:41:29 +0000 |
commit | d8f9aef84a1271633cb4fc7ba7a063e4b922d56b (patch) | |
tree | 4394cf299b2fc7badf75c2ba97be5a8ac470e780 /test/handler/test_flake8_handler.vader | |
parent | 037aaae593bba96b71d89c6f9bd5f14e3846e067 (diff) | |
download | ale-d8f9aef84a1271633cb4fc7ba7a063e4b922d56b.zip |
#852 - Capture error codes for flake8
Diffstat (limited to 'test/handler/test_flake8_handler.vader')
-rw-r--r-- | test/handler/test_flake8_handler.vader | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/test/handler/test_flake8_handler.vader b/test/handler/test_flake8_handler.vader index 0d6d65fc..d8cb51b3 100644 --- a/test/handler/test_flake8_handler.vader +++ b/test/handler/test_flake8_handler.vader @@ -11,21 +11,24 @@ Execute(The flake8 handler should handle basic warnings and syntax errors): \ 'lnum': 6, \ 'col': 6, \ 'type': 'E', - \ 'text': 'E111: indentation is not a multiple of four', + \ 'text': 'indentation is not a multiple of four', + \ 'code': 'E111', \ 'sub_type': 'style', \ }, \ { \ 'lnum': 7, \ 'col': 6, \ 'type': 'W', - \ 'text': 'W123: some warning', + \ 'text': 'some warning', + \ 'code': 'W123', \ 'sub_type': 'style', \ }, \ { \ 'lnum': 8, \ 'col': 3, \ 'type': 'E', - \ 'text': 'E999: SyntaxError: invalid syntax', + \ 'text': 'SyntaxError: invalid syntax', + \ 'code': 'E999', \ }, \ ], \ ale_linters#python#flake8#Handle(1, [ @@ -42,35 +45,40 @@ Execute(The flake8 handler should set end column indexes should be set for certa \ 'col': 1, \ 'type': 'E', \ 'end_col': 3, - \ 'text': 'F821: undefined name ''foo''', + \ 'text': 'undefined name ''foo''', + \ 'code': 'F821', \ }, \ { \ 'lnum': 28, \ 'col': 5, \ 'type': 'E', \ 'end_col': 9, - \ 'text': 'F405: hello may be undefined, or defined from star imports: x', + \ 'text': 'hello may be undefined, or defined from star imports: x', + \ 'code': 'F405', \ }, \ { \ 'lnum': 104, \ 'col': 5, \ 'type': 'E', \ 'end_col': 12, - \ 'text': 'F999: ''continue'' not properly in loop', + \ 'text': '''continue'' not properly in loop', + \ 'code': 'F999', \ }, \ { \ 'lnum': 106, \ 'col': 5, \ 'type': 'E', \ 'end_col': 9, - \ 'text': 'F999: ''break'' outside loop', + \ 'text': '''break'' outside loop', + \ 'code': 'F999', \ }, \ { \ 'lnum': 109, \ 'col': 5, \ 'type': 'E', \ 'end_col': 8, - \ 'text': 'F841: local variable ''test'' is assigned to but never used', + \ 'text': 'local variable ''test'' is assigned to but never used', + \ 'code': 'F841', \ }, \ ], \ ale_linters#python#flake8#Handle(1, [ @@ -125,7 +133,8 @@ Execute (The flake8 handler should handle names with spaces): \ 'lnum': 6, \ 'col': 6, \ 'type': 'E', - \ 'text': 'E111: indentation is not a multiple of four', + \ 'text': 'indentation is not a multiple of four', + \ 'code': 'E111', \ 'sub_type': 'style', \ }, \ ], |