diff --git a/ale_linters/verilog/xvlog.vim b/ale_linters/verilog/xvlog.vim index 98b5aae72a..51b4ca4757 100644 --- a/ale_linters/verilog/xvlog.vim +++ b/ale_linters/verilog/xvlog.vim @@ -11,15 +11,18 @@ endfunction function! ale_linters#verilog#xvlog#Handle(buffer, lines) abort "Matches patterns like the following: " ERROR: [VRFC 10-1412] syntax error near output [/path/to/file.v:5] - let l:pattern = '^ERROR:\s\+\(\[.*\)\[.*:\([0-9]\+\)\]' + let l:pattern = '^\(WARNING\|ERROR\|INFO\):\s\+\(\[.*\)\[\(.*\):\([0-9]\+\)\]' let l:output = [] + let l:dir = expand('#' . a:buffer . ':p:h') " NOTE: `xvlog` only prints 'INFO' and 'ERROR' messages for l:match in ale#util#GetMatches(a:lines, l:pattern) + let l:fname = ale#path#GetAbsPath(l:dir, l:match[3]) call add(l:output, { - \ 'lnum': l:match[2] + 0, - \ 'type': 'E', - \ 'text': l:match[1], + \ 'filename': l:fname, + \ 'lnum': l:match[4] + 0, + \ 'type': l:match[1][0], + \ 'text': l:match[2], \}) endfor diff --git a/doc/ale-verilog.txt b/doc/ale-verilog.txt index 83e4f31e95..c1bb20c857 100644 --- a/doc/ale-verilog.txt +++ b/doc/ale-verilog.txt @@ -127,6 +127,9 @@ g:ale_verilog_xvlog_options *g:ale_verilog_xvlog_options* Default: `''` This variable can be changed to modify the flags/options passed to 'xvlog'. + Vivado generates a 'compile.sh' file in the xsim directory with the flags you + are probably looking for. Note, however, that you may need to change the + relative paths in the Project File '.prj'. ===============================================================================