Fix pattern of output for coffeelint
This commit is contained in:
parent
c2ceb9e085
commit
e969d97843
@ -21,7 +21,7 @@ function! ale_linters#coffee#coffeelint#Handle(buffer, lines) abort
|
||||
" stdin,14,,error,Throwing strings is forbidden
|
||||
"
|
||||
" Note that we currently ignore lineNumberEnd for multiline errors
|
||||
let l:pattern = 'stdin,\(\d\+\),\(\d*\),\(.\+\),\(.\+\)'
|
||||
let l:pattern = 'stdin,\(\d\+\),\(\d*\),\(.\{-1,}\),\(.\+\)'
|
||||
let l:output = []
|
||||
|
||||
for l:line in a:lines
|
||||
|
20
test/handler/test_coffeelint_handler.vader
Normal file
20
test/handler/test_coffeelint_handler.vader
Normal file
@ -0,0 +1,20 @@
|
||||
Execute(The coffeelint handler should parse lines correctly):
|
||||
runtime ale_linters/coffee/coffeelint.vim
|
||||
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
\ 'bufnr': 347,
|
||||
\ 'lnum': 125,
|
||||
\ 'col': 1,
|
||||
\ 'text': "Line exceeds maximum allowed length Length is 122, max is 120.",
|
||||
\ 'type': 'E',
|
||||
\ },
|
||||
\ ],
|
||||
\ ale_linters#coffee#coffeelint#Handle(347, [
|
||||
\ "path,lineNumber,lineNumberEnd,level,message",
|
||||
\ "stdin,125,,error,Line exceeds maximum allowed length Length is 122, max is 120.",
|
||||
\ ])
|
||||
|
||||
After:
|
||||
call ale#linter#Reset()
|
Loading…
Reference in New Issue
Block a user