summaryrefslogtreecommitdiff
path: root/ale_linters
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-11-15 17:26:52 +0000
committerw0rp <devw0rp@gmail.com>2017-11-15 17:26:52 +0000
commit08f4f8f0fc2a6698dd48da7871209070ddfdb754 (patch)
treef67cc71d37c290d3aa3d5d3b1f4a2660e88453f5 /ale_linters
parentb14377915b9948454322cd95a86bcc298c03f77a (diff)
downloadale-08f4f8f0fc2a6698dd48da7871209070ddfdb754.zip
#852 Capture error codes for shellcheck
Diffstat (limited to 'ale_linters')
-rw-r--r--ale_linters/sh/shellcheck.vim3
1 files changed, 2 insertions, 1 deletions
diff --git a/ale_linters/sh/shellcheck.vim b/ale_linters/sh/shellcheck.vim
index 3e60ad31..27c74531 100644
--- a/ale_linters/sh/shellcheck.vim
+++ b/ale_linters/sh/shellcheck.vim
@@ -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])