#852 Capture error codes for shellcheck

This commit is contained in:
w0rp
2017-11-15 17:26:52 +00:00
parent b14377915b
commit 08f4f8f0fc
2 changed files with 8 additions and 4 deletions

View File

@@ -71,7 +71,7 @@ function! ale_linters#sh#shellcheck#GetCommand(buffer, version_output) abort
endfunction
function! ale_linters#sh#shellcheck#Handle(buffer, lines) abort
let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):(\d+)?:? ([^:]+): (.+)$'
let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):(\d+)?:? ([^:]+): (.+) \[([^\]]+)\]$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
@@ -87,6 +87,7 @@ function! ale_linters#sh#shellcheck#Handle(buffer, lines) abort
\ 'lnum': str2nr(l:match[2]),
\ 'type': l:type,
\ 'text': l:match[5],
\ 'code': l:match[6],
\}
if !empty(l:match[3])