2017-05-15 19:59:50 +00:00
|
|
|
Before:
|
2017-05-12 13:42:32 +00:00
|
|
|
runtime ale_linters/java/checkstyle.vim
|
|
|
|
|
2017-05-15 19:59:50 +00:00
|
|
|
After:
|
|
|
|
call ale#linter#Reset()
|
|
|
|
|
|
|
|
Execute(The checkstyle handler should parse lines correctly):
|
2017-05-12 13:42:32 +00:00
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 101,
|
2017-11-18 18:29:12 +00:00
|
|
|
\ 'col': 0,
|
|
|
|
\ 'text': '''method def rcurly'' has incorrect indentation level 4, expected level should be 2.',
|
|
|
|
\ 'code': 'Indentation',
|
2017-05-12 13:42:32 +00:00
|
|
|
\ 'type': 'W',
|
2021-07-04 12:31:00 +00:00
|
|
|
\ 'sub_type': 'style',
|
2017-05-12 13:42:32 +00:00
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 63,
|
|
|
|
\ 'col': 3,
|
2017-11-18 18:29:12 +00:00
|
|
|
\ 'text': 'Missing a Javadoc comment.',
|
|
|
|
\ 'code': 'JavadocMethod',
|
2017-05-12 13:42:32 +00:00
|
|
|
\ 'type': 'W',
|
2021-07-04 12:31:00 +00:00
|
|
|
\ 'sub_type': 'style',
|
2017-05-12 13:42:32 +00:00
|
|
|
\ },
|
2019-05-28 08:48:27 +00:00
|
|
|
\ {
|
|
|
|
\ 'lnum': 11,
|
|
|
|
\ 'col': 7,
|
|
|
|
\ 'text': 'WhitespaceAround: ''if'' is not followed by whitespace.',
|
|
|
|
\ 'code': 'WhitespaceAround',
|
|
|
|
\ 'type': 'W',
|
2021-07-04 12:31:00 +00:00
|
|
|
\ 'sub_type': 'style',
|
2019-05-28 08:48:27 +00:00
|
|
|
\ },
|
2017-05-12 13:42:32 +00:00
|
|
|
\ ],
|
|
|
|
\ ale_linters#java#checkstyle#Handle(666, [
|
2017-11-18 18:29:12 +00:00
|
|
|
\ '[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]',
|
2019-05-28 08:48:27 +00:00
|
|
|
\ '[WARN] whatever:11:7: WhitespaceAround: ''if'' is not followed by whitespace. [WhitespaceAround]',
|
2017-05-12 13:42:32 +00:00
|
|
|
\ ])
|
2018-11-07 12:25:48 +00:00
|
|
|
|
|
|
|
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',
|
2021-07-04 12:31:00 +00:00
|
|
|
\ 'sub_type': 'style',
|
2018-11-07 12:25:48 +00:00
|
|
|
\ },
|
|
|
|
\ ],
|
|
|
|
\ 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.',
|
|
|
|
\ ])
|