mirror of https://github.com/dense-analysis/ale
Change checkstyle's output sub_type to style (#3780)
This commit is contained in:
parent
9efa96eb94
commit
afcbd1620e
|
@ -14,6 +14,7 @@ function! ale_linters#java#checkstyle#Handle(buffer, lines) abort
|
||||||
for l:match in ale#util#GetMatches(a:lines, l:pattern)
|
for l:match in ale#util#GetMatches(a:lines, l:pattern)
|
||||||
call add(l:output, {
|
call add(l:output, {
|
||||||
\ 'type': l:match[1] is? 'WARN' ? 'W' : 'E',
|
\ 'type': l:match[1] is? 'WARN' ? 'W' : 'E',
|
||||||
|
\ 'sub_type': 'style',
|
||||||
\ 'lnum': l:match[2] + 0,
|
\ 'lnum': l:match[2] + 0,
|
||||||
\ 'col': l:match[3] + 0,
|
\ 'col': l:match[3] + 0,
|
||||||
\ 'text': l:match[4],
|
\ '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)
|
for l:match in ale#util#GetMatches(a:lines, l:pattern)
|
||||||
call add(l:output, {
|
call add(l:output, {
|
||||||
\ 'type': l:match[3] is? 'warning' ? 'W' : 'E',
|
\ 'type': l:match[3] is? 'warning' ? 'W' : 'E',
|
||||||
|
\ 'sub_type': 'style',
|
||||||
\ 'lnum': l:match[2] + 0,
|
\ 'lnum': l:match[2] + 0,
|
||||||
\ 'text': l:match[4],
|
\ 'text': l:match[4],
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -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.',
|
\ 'text': '''method def rcurly'' has incorrect indentation level 4, expected level should be 2.',
|
||||||
\ 'code': 'Indentation',
|
\ 'code': 'Indentation',
|
||||||
\ 'type': 'W',
|
\ 'type': 'W',
|
||||||
|
\ 'sub_type': 'style',
|
||||||
\ },
|
\ },
|
||||||
\ {
|
\ {
|
||||||
\ 'lnum': 63,
|
\ 'lnum': 63,
|
||||||
|
@ -20,6 +21,7 @@ Execute(The checkstyle handler should parse lines correctly):
|
||||||
\ 'text': 'Missing a Javadoc comment.',
|
\ 'text': 'Missing a Javadoc comment.',
|
||||||
\ 'code': 'JavadocMethod',
|
\ 'code': 'JavadocMethod',
|
||||||
\ 'type': 'W',
|
\ 'type': 'W',
|
||||||
|
\ 'sub_type': 'style',
|
||||||
\ },
|
\ },
|
||||||
\ {
|
\ {
|
||||||
\ 'lnum': 11,
|
\ 'lnum': 11,
|
||||||
|
@ -27,6 +29,7 @@ Execute(The checkstyle handler should parse lines correctly):
|
||||||
\ 'text': 'WhitespaceAround: ''if'' is not followed by whitespace.',
|
\ 'text': 'WhitespaceAround: ''if'' is not followed by whitespace.',
|
||||||
\ 'code': 'WhitespaceAround',
|
\ 'code': 'WhitespaceAround',
|
||||||
\ 'type': 'W',
|
\ 'type': 'W',
|
||||||
|
\ 'sub_type': 'style',
|
||||||
\ },
|
\ },
|
||||||
\ ],
|
\ ],
|
||||||
\ ale_linters#java#checkstyle#Handle(666, [
|
\ ale_linters#java#checkstyle#Handle(666, [
|
||||||
|
@ -42,6 +45,7 @@ Execute(The checkstyle handler should parse lines from older checkstyle versions
|
||||||
\ 'lnum': 289,
|
\ 'lnum': 289,
|
||||||
\ 'text': '''method def modifier'' have incorrect indentation level 4, expected level should be 2.',
|
\ 'text': '''method def modifier'' have incorrect indentation level 4, expected level should be 2.',
|
||||||
\ 'type': 'W',
|
\ 'type': 'W',
|
||||||
|
\ 'sub_type': 'style',
|
||||||
\ },
|
\ },
|
||||||
\ ],
|
\ ],
|
||||||
\ ale_linters#java#checkstyle#Handle(666, [
|
\ ale_linters#java#checkstyle#Handle(666, [
|
||||||
|
|
Loading…
Reference in New Issue