mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
* Sets module search path to file directory for slang/verilog linter
Similar to iverilog behaviour.
See 699c0dbe80
Reasonable default behaviour, can be changed by adding '-y%s:h' to
`b:ale_verilog_slang_options` buffer variable.
* Adds filename to slang/verilog linter output
slang can parse other files based on the modules instances names find in
the current file and returns warning/error messages related to those
files that have the same pattern.
Adding the file name to the outputs avoid polluting the active buffer
with those messages.
* Absolute paths in slang/verilog linter messages
Otherwise temp files are not correctly detected
29 lines
778 B
Plaintext
29 lines
778 B
Plaintext
Before:
|
|
runtime ale_linters/verilog/slang.vim
|
|
|
|
After:
|
|
call ale#linter#Reset()
|
|
|
|
Execute(The slang handler should parse lines correctly):
|
|
AssertEqual
|
|
\ [
|
|
\ {
|
|
\ 'filename' : 'foo.sv',
|
|
\ 'lnum': 11,
|
|
\ 'col': 1,
|
|
\ 'type': 'W',
|
|
\ 'text': 'extra '';'' has no effect [-Wempty-member]',
|
|
\ },
|
|
\ {
|
|
\ 'filename' : 'bar.sv',
|
|
\ 'lnum': 24,
|
|
\ 'col': 12,
|
|
\ 'type': 'E',
|
|
\ 'text': 'cannot mix continuous and procedural assignments to variable ''data_o''',
|
|
\ },
|
|
\ ],
|
|
\ ale_linters#verilog#slang#Handle(bufnr(''), [
|
|
\ 'foo.sv:11:1: warning: extra '';'' has no effect [-Wempty-member]',
|
|
\ 'bar.sv:24:12: error: cannot mix continuous and procedural assignments to variable ''data_o''',
|
|
\ ])
|