summaryrefslogtreecommitdiff
path: root/ale_linters/python/vulture.vim
diff options
context:
space:
mode:
authorKevin Locke <kevin@kevinlocke.name>2019-02-08 21:44:34 +0000
committerw0rp <w0rp@users.noreply.github.com>2019-02-08 21:44:34 +0000
commita24f0b4d5f91f9214c64ae281fadcd981e0dadfc (patch)
tree25e07c98b5de66ab70db85b980fcbe9f3675358d /ale_linters/python/vulture.vim
parent422908a5721e11be73935b765f599f9fc672802e (diff)
downloadale-a24f0b4d5f91f9214c64ae281fadcd981e0dadfc.zip
Support pylama for python (#2266)
* Add pylama for python * Consolidate python traceback handling
Diffstat (limited to 'ale_linters/python/vulture.vim')
-rw-r--r--ale_linters/python/vulture.vim15
1 files changed, 5 insertions, 10 deletions
diff --git a/ale_linters/python/vulture.vim b/ale_linters/python/vulture.vim
index 80828013..b3908b80 100644
--- a/ale_linters/python/vulture.vim
+++ b/ale_linters/python/vulture.vim
@@ -46,19 +46,14 @@ endfunction
function! ale_linters#python#vulture#Handle(buffer, lines) abort
- for l:line in a:lines[:10]
- if match(l:line, '^Traceback') >= 0
- return [{
- \ 'lnum': 1,
- \ 'text': 'An exception was thrown. See :ALEDetail',
- \ 'detail': join(a:lines, "\n"),
- \}]
- endif
- endfor
+ let l:output = ale#python#HandleTraceback(a:lines, 10)
+
+ if !empty(l:output)
+ return l:output
+ endif
" Matches patterns line the following:
let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+): (.*)$'
- let l:output = []
let l:dir = s:GetDir(a:buffer)
for l:match in ale#util#GetMatches(a:lines, l:pattern)