Merge pull request #1135 from aurieh/master

Capture error codes for checkmake
This commit is contained in:
w0rp 2017-11-16 10:15:37 +00:00 committed by GitHub
commit ee07be5f59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -5,12 +5,12 @@ function! ale_linters#make#checkmake#Handle(buffer, lines) abort
let l:output = [] let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern) for l:match in ale#util#GetMatches(a:lines, l:pattern)
let l:text = l:match[2] . ': ' . l:match[3]
call add(l:output, { call add(l:output, {
\ 'bufnr': a:buffer, \ 'bufnr': a:buffer,
\ 'lnum': l:match[1] + 0, \ 'lnum': l:match[1] + 0,
\ 'type': 'E', \ 'type': 'E',
\ 'text': l:text, \ 'code': l:match[2],
\ 'text': l:match[3],
\}) \})
endfor endfor
return l:output return l:output

View File

@ -13,7 +13,8 @@ Execute(Parsing checkmake errors should work):
\ 'bufnr': 42, \ 'bufnr': 42,
\ 'lnum': 1, \ 'lnum': 1,
\ 'type': 'E', \ 'type': 'E',
\ 'text': 'woops: an error has occurred', \ 'code': 'woops',
\ 'text': 'an error has occurred',
\ } \ }
\ ], \ ],
\ ale_linters#make#checkmake#Handle(42, [ \ ale_linters#make#checkmake#Handle(42, [