Handle Unix errors with no space after the colon
This commit is contained in:
parent
99afe586b3
commit
b4c0335ebc
@ -12,7 +12,7 @@ function! s:HandleUnixFormat(buffer, lines, type) abort
|
|||||||
" file.go:27: missing argument for Printf("%s"): format reads arg 2, have only 1 args
|
" file.go:27: missing argument for Printf("%s"): format reads arg 2, have only 1 args
|
||||||
" file.go:53:10: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
|
" file.go:53:10: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
|
||||||
" file.go:5:2: expected declaration, found 'STRING' "log"
|
" file.go:5:2: expected declaration, found 'STRING' "log"
|
||||||
let l:pattern = '^' . s:path_pattern . ':\(\d\+\):\?\(\d\+\)\?:\? \(.\+\)$'
|
let l:pattern = '^' . s:path_pattern . ':\(\d\+\):\?\(\d\+\)\?:\? \?\(.\+\)$'
|
||||||
let l:output = []
|
let l:output = []
|
||||||
|
|
||||||
for l:line in a:lines
|
for l:line in a:lines
|
||||||
|
@ -89,6 +89,27 @@ Execute (HandleUnixFormatAsError should handle some example lines of output):
|
|||||||
\ 'test.pug:1:1 ".b" is not a valid class name. Class names must begin with "-", "_" or a letter and can only contain "_", "-", a-z and 0-9.',
|
\ 'test.pug:1:1 ".b" is not a valid class name. Class names must begin with "-", "_" or a letter and can only contain "_", "-", a-z and 0-9.',
|
||||||
\ ])
|
\ ])
|
||||||
|
|
||||||
|
Execute (HandleUnixFormatAsError should handle lines with no space after the colon):
|
||||||
|
AssertEqual
|
||||||
|
\ [
|
||||||
|
\ {
|
||||||
|
\ 'lnum': 27,
|
||||||
|
\ 'col': 0,
|
||||||
|
\ 'type': 'E',
|
||||||
|
\ 'text': 'foo',
|
||||||
|
\ },
|
||||||
|
\ {
|
||||||
|
\ 'lnum': 53,
|
||||||
|
\ 'col': 10,
|
||||||
|
\ 'type': 'E',
|
||||||
|
\ 'text': 'bar',
|
||||||
|
\ },
|
||||||
|
\ ],
|
||||||
|
\ ale#handlers#HandleUnixFormatAsError(42, [
|
||||||
|
\ 'some_file.xyz:27:foo',
|
||||||
|
\ 'some_file.xyz:53:10:bar',
|
||||||
|
\ ])
|
||||||
|
|
||||||
Execute (HandleUnixFormatAsWarning should handle some example lines of output):
|
Execute (HandleUnixFormatAsWarning should handle some example lines of output):
|
||||||
AssertEqual
|
AssertEqual
|
||||||
\ [
|
\ [
|
||||||
|
Loading…
Reference in New Issue
Block a user