Skip to content

Commit 016727a

Browse files
committed
Fix error message parsing and quickfix construction
1 parent 07c780c commit 016727a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

autoload/codefmt/mixformat.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ function! codefmt#mixformat#GetFormatter() abort
6868
" (blank line), (stack trace with 4-space indent)
6969
" TODO gather additional details between error message and stack trace
7070
let l:tokens = matchlist(l:line,
71-
\ printf('\v^\*\* (\(.*\)) %s:(\d+):(\d+):\s*(.*)', l:filename))
71+
\ printf('\v^\*\* (\(\k+\)) [^:]+:(\d+):(\d+):\s*(.*)'))
7272
if !empty(l:tokens)
7373
call add(l:errors, {
7474
\ 'filename': @%,
75-
\ 'lnum': l:tokens[1] + a:startline - 1,
76-
\ 'col': l:tokens[2],
77-
\ 'text': l:tokens[3]})
75+
\ 'lnum': l:tokens[2] + a:startline - 1,
76+
\ 'col': l:tokens[3],
77+
\ 'text': printf('%s %s', l:tokens[1], l:tokens[4])})
7878
endif
7979
endfor
8080
if empty(l:errors)

0 commit comments

Comments
 (0)