#852 - Capture error codes for stylelint
This commit is contained in:
parent
01b2971d04
commit
d7a60ade77
2 changed files with 6 additions and 3 deletions
|
@ -61,7 +61,8 @@ function! ale#handlers#css#HandleStyleLintFormat(buffer, lines) abort
|
|||
\ 'lnum': l:match[1] + 0,
|
||||
\ 'col': l:match[2] + 0,
|
||||
\ 'type': l:match[3] is# '✖' ? 'E' : 'W',
|
||||
\ 'text': l:match[4] . ' [' . l:match[5] . ']',
|
||||
\ 'text': l:match[4],
|
||||
\ 'code': l:match[5],
|
||||
\})
|
||||
endfor
|
||||
|
||||
|
|
|
@ -10,13 +10,15 @@ Execute (stylelint errors should be handled correctly):
|
|||
\ 'lnum': 108,
|
||||
\ 'col': 10,
|
||||
\ 'type': 'E',
|
||||
\ 'text': 'Unexpected leading zero [number-leading-zero]',
|
||||
\ 'text': 'Unexpected leading zero',
|
||||
\ 'code': 'number-leading-zero',
|
||||
\ },
|
||||
\ {
|
||||
\ 'lnum': 116,
|
||||
\ 'col': 20,
|
||||
\ 'type': 'E',
|
||||
\ 'text': 'Expected a trailing semicolon [declaration-block-trailing-semicolon]',
|
||||
\ 'text': 'Expected a trailing semicolon',
|
||||
\ 'code': 'declaration-block-trailing-semicolon',
|
||||
\ },
|
||||
\ ],
|
||||
\ ale#handlers#css#HandleStyleLintFormat(42, [
|
||||
|
|
Reference in a new issue