1
0
mirror of https://github.com/amix/vimrc synced 2025-06-16 09:35:01 +08:00

Updated plugins

This commit is contained in:
Amir
2020-04-25 21:56:16 -04:00
parent d98c510eee
commit fef069af24
114 changed files with 4018 additions and 988 deletions

View File

@ -28,21 +28,30 @@ function! ale_linters#verilog#verilator#Handle(buffer, lines) abort
" %Warning-UNDRIVEN: test.v:3: Signal is not driven: clk
" %Warning-UNUSED: test.v:4: Signal is not used: dout
" %Warning-BLKSEQ: test.v:10: Blocking assignments (=) in sequential (flop or latch) block; suggest delayed assignments (<=).
let l:pattern = '^%\(Warning\|Error\)[^:]*:\([^:]\+\):\(\d\+\): \(.\+\)$'
" Since version 4.032 (04/2020) verilator linter messages also contain the column number,
" and look like:
" %Error: /tmp/test.sv:3:1: syntax error, unexpected endmodule, expecting ';'
"
" to stay compatible with old versions of the tool, the column number is
" optional in the researched pattern
let l:pattern = '^%\(Warning\|Error\)[^:]*:\([^:]\+\):\(\d\+\):\(\d\+\)\?:\? \(.\+\)$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
let l:line = l:match[3] + 0
let l:type = l:match[1] is# 'Error' ? 'E' : 'W'
let l:text = l:match[4]
let l:item = {
\ 'lnum': str2nr(l:match[3]),
\ 'text': l:match[5],
\ 'type': l:match[1] is# 'Error' ? 'E' : 'W',
\}
if !empty(l:match[4])
let l:item.col = str2nr(l:match[4])
endif
let l:file = l:match[2]
if l:file =~# '_verilator_linted.v'
call add(l:output, {
\ 'lnum': l:line,
\ 'text': l:text,
\ 'type': l:type,
\})
call add(l:output, l:item)
endif
endfor