Parse clj-kondo lines that don't include row/col (#3946)

Some custom linter hooks don't include these numbers.
This commit is contained in:
Randy Stauner
2021-10-19 00:04:50 -07:00
committed by GitHub
parent cb0f0e1d0b
commit 9b5a3581eb
2 changed files with 15 additions and 1 deletions

View File

@@ -16,7 +16,7 @@ endfunction
function! ale_linters#clojure#clj_kondo#HandleCljKondoFormat(buffer, lines) abort
" output format
" <filename>:<line>:<column>: <issue type>: <message>
let l:pattern = '\v^[a-zA-Z]?:?[^:]+:(\d+):(\d+):? ((Exception|error|warning): ?(.+))$'
let l:pattern = '\v^[a-zA-Z]?:?[^:]+:(\d+)?:(\d+)?:? ((Exception|error|warning): ?(.+))$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)