diff options
author | Frederick Zhang <frederick888@tsundere.moe> | 2021-07-04 22:31:00 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-04 21:31:00 +0900 |
commit | afcbd1620e741a98a2952b5e7bfd0dd2bdda2c7a (patch) | |
tree | 6937088046ee42f88e5d42daf846ae367867a5a2 | |
parent | 9efa96eb9431e43e183a73f91db4c84126880a15 (diff) | |
download | ale-afcbd1620e741a98a2952b5e7bfd0dd2bdda2c7a.zip |
Change checkstyle's output sub_type to style (#3780)
-rw-r--r-- | ale_linters/java/checkstyle.vim | 2 | ||||
-rw-r--r-- | test/handler/test_checkstyle_handler.vader | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/ale_linters/java/checkstyle.vim b/ale_linters/java/checkstyle.vim index f00734e0..1ccbc505 100644 --- a/ale_linters/java/checkstyle.vim +++ b/ale_linters/java/checkstyle.vim @@ -14,6 +14,7 @@ function! ale_linters#java#checkstyle#Handle(buffer, lines) abort for l:match in ale#util#GetMatches(a:lines, l:pattern) call add(l:output, { \ 'type': l:match[1] is? 'WARN' ? 'W' : 'E', + \ 'sub_type': 'style', \ 'lnum': l:match[2] + 0, \ 'col': l:match[3] + 0, \ 'text': l:match[4], @@ -31,6 +32,7 @@ function! ale_linters#java#checkstyle#Handle(buffer, lines) abort for l:match in ale#util#GetMatches(a:lines, l:pattern) call add(l:output, { \ 'type': l:match[3] is? 'warning' ? 'W' : 'E', + \ 'sub_type': 'style', \ 'lnum': l:match[2] + 0, \ 'text': l:match[4], \}) diff --git a/test/handler/test_checkstyle_handler.vader b/test/handler/test_checkstyle_handler.vader index c60bbc82..ea90db3f 100644 --- a/test/handler/test_checkstyle_handler.vader +++ b/test/handler/test_checkstyle_handler.vader @@ -13,6 +13,7 @@ Execute(The checkstyle handler should parse lines correctly): \ 'text': '''method def rcurly'' has incorrect indentation level 4, expected level should be 2.', \ 'code': 'Indentation', \ 'type': 'W', + \ 'sub_type': 'style', \ }, \ { \ 'lnum': 63, @@ -20,6 +21,7 @@ Execute(The checkstyle handler should parse lines correctly): \ 'text': 'Missing a Javadoc comment.', \ 'code': 'JavadocMethod', \ 'type': 'W', + \ 'sub_type': 'style', \ }, \ { \ 'lnum': 11, @@ -27,6 +29,7 @@ Execute(The checkstyle handler should parse lines correctly): \ 'text': 'WhitespaceAround: ''if'' is not followed by whitespace.', \ 'code': 'WhitespaceAround', \ 'type': 'W', + \ 'sub_type': 'style', \ }, \ ], \ ale_linters#java#checkstyle#Handle(666, [ @@ -42,6 +45,7 @@ Execute(The checkstyle handler should parse lines from older checkstyle versions \ 'lnum': 289, \ 'text': '''method def modifier'' have incorrect indentation level 4, expected level should be 2.', \ 'type': 'W', + \ 'sub_type': 'style', \ }, \ ], \ ale_linters#java#checkstyle#Handle(666, [ |