diff options
Diffstat (limited to 'ale_linters/sh')
-rw-r--r-- | ale_linters/sh/shell.vim | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/ale_linters/sh/shell.vim b/ale_linters/sh/shell.vim index 372c1729..cd363091 100644 --- a/ale_linters/sh/shell.vim +++ b/ale_linters/sh/shell.vim @@ -41,22 +41,10 @@ function! ale_linters#sh#shell#Handle(buffer, lines) abort let l:pattern = '\v(line |: ?)(\d+): (.+)$' let l:output = [] - for l:line in a:lines - let l:match = matchlist(l:line, l:pattern) - - if len(l:match) == 0 - continue - endif - - let l:line = l:match[2] + 0 - let l:text = l:match[3] - let l:type = 'E' - + for l:match in ale#util#GetMatches(a:lines, l:pattern) call add(l:output, { - \ 'bufnr': a:buffer, - \ 'lnum': l:line, - \ 'text': l:text, - \ 'type': l:type, + \ 'lnum': str2nr(l:match[2]), + \ 'text': l:match[3], \}) endfor |