diff options
author | Johannes Wienke <jwienke@techfak.uni-bielefeld.de> | 2018-11-07 13:25:48 +0100 |
---|---|---|
committer | Johannes Wienke <jwienke@techfak.uni-bielefeld.de> | 2018-11-07 13:25:48 +0100 |
commit | 5d6b4ef73f1d9532fe3f16cdbf5994aa6a3eb9fe (patch) | |
tree | 8d7a62b5309b0ea0aac4cfbbc306ad96b1b3c172 /test/handler | |
parent | ad98cb74488c017a4b23e5a848e37ac5bc0840b0 (diff) | |
download | ale-5d6b4ef73f1d9532fe3f16cdbf5994aa6a3eb9fe.zip |
Support older checkstyle versions
The output format used by older checkstyle versions differs from the one
of new versions. This commit adds a second parsing iteration on the
output lines with a suitable pattern to support both versions in
parallel. Due to the differences in the order of matching groups this is
hard to achieve in a single pass through the output lines.
An appropriate test case is added.
Diffstat (limited to 'test/handler')
-rw-r--r-- | test/handler/test_checkstyle_handler.vader | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/handler/test_checkstyle_handler.vader b/test/handler/test_checkstyle_handler.vader index 2f1f0f8d..218fe344 100644 --- a/test/handler/test_checkstyle_handler.vader +++ b/test/handler/test_checkstyle_handler.vader @@ -26,3 +26,16 @@ Execute(The checkstyle handler should parse lines correctly): \ '[WARN] whatever:101: ''method def rcurly'' has incorrect indentation level 4, expected level should be 2. [Indentation]', \ '[WARN] whatever:63:3: Missing a Javadoc comment. [JavadocMethod]', \ ]) + +Execute(The checkstyle handler should parse lines from older checkstyle versions correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 289, + \ 'text': '''method def modifier'' have incorrect indentation level 4, expected level should be 2.', + \ 'type': 'W', + \ }, + \ ], + \ ale_linters#java#checkstyle#Handle(666, [ + \ '/home/languitar/src/rsb-java/rsb-java/src/main/java/rsb/Listener.java:289: warning: ''method def modifier'' have incorrect indentation level 4, expected level should be 2.', + \ ]) |