diff options
Diffstat (limited to 'ale_linters/verilog')
-rw-r--r-- | ale_linters/verilog/iverilog.vim | 9 | ||||
-rw-r--r-- | ale_linters/verilog/verilator.vim | 9 |
2 files changed, 2 insertions, 16 deletions
diff --git a/ale_linters/verilog/iverilog.vim b/ale_linters/verilog/iverilog.vim index a061e473..0f4cd7b3 100644 --- a/ale_linters/verilog/iverilog.vim +++ b/ale_linters/verilog/iverilog.vim @@ -11,19 +11,12 @@ function! ale_linters#verilog#iverilog#Handle(buffer, lines) abort let l:pattern = '^[^:]\+:\(\d\+\): \(warning\|error\|syntax error\)\(: \(.\+\)\)\?' let l:output = [] - for l:line in a:lines - let l:match = matchlist(l:line, l:pattern) - - if len(l:match) == 0 - continue - endif - + for l:match in ale#util#GetMatches(a:lines, l:pattern) let l:line = l:match[1] + 0 let l:type = l:match[2] =~# 'error' ? 'E' : 'W' let l:text = l:match[2] ==# 'syntax error' ? 'syntax error' : l:match[4] call add(l:output, { - \ 'bufnr': a:buffer, \ 'lnum': l:line, \ 'text': l:text, \ 'type': l:type, diff --git a/ale_linters/verilog/verilator.vim b/ale_linters/verilog/verilator.vim index fbff2b2e..e2dbafac 100644 --- a/ale_linters/verilog/verilator.vim +++ b/ale_linters/verilog/verilator.vim @@ -23,13 +23,7 @@ function! ale_linters#verilog#verilator#Handle(buffer, lines) abort let l:pattern = '^%\(Warning\|Error\)[^:]*:\([^:]\+\):\(\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 - + for l:match in ale#util#GetMatches(a:lines, l:pattern) let l:line = l:match[3] + 0 let l:type = l:match[1] ==# 'Error' ? 'E' : 'W' let l:text = l:match[4] @@ -37,7 +31,6 @@ function! ale_linters#verilog#verilator#Handle(buffer, lines) abort if l:file =~# '_verilator_linted.v' call add(l:output, { - \ 'bufnr': a:buffer, \ 'lnum': l:line, \ 'text': l:text, \ 'type': l:type, |