mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 20:54:26 +08:00
Add explicit module search path to the verilator linter (#5000)
Adds the origin file directory as a module search path. This is the default behaviour, this commit makes it explicit. Note from the doc: '-I' -> include search path '-y' -> module search path The space after '-y' seems mandatory, at least when I tested it with vresion 5.032-46-g447ab12ce
This commit is contained in:
@@ -10,6 +10,7 @@ function! ale_linters#verilog#verilator#GetCommand(buffer) abort
|
||||
" the path to the current file is systematically added to the search path
|
||||
return 'verilator --lint-only -Wall -Wno-DECLFILENAME '
|
||||
\ . '-I%s:h '
|
||||
\ . '-y %s:h '
|
||||
\ . ale#Var(a:buffer, 'verilog_verilator_options') .' '
|
||||
\ . '%t'
|
||||
endfunction
|
||||
|
||||
@@ -5,10 +5,10 @@ After:
|
||||
call ale#assert#TearDownLinterTest()
|
||||
|
||||
Execute(The default verilator command should be correct):
|
||||
AssertLinter 'verilator', 'verilator --lint-only -Wall -Wno-DECLFILENAME -I%s:h %t'
|
||||
AssertLinter 'verilator', 'verilator --lint-only -Wall -Wno-DECLFILENAME -I%s:h -y %s:h %t'
|
||||
|
||||
Execute(verilator options should be configurable):
|
||||
" Additional args for the linter
|
||||
let g:ale_verilog_verilator_options = '-sv --default-language "1800-2012"'
|
||||
|
||||
AssertLinter 'verilator', 'verilator --lint-only -Wall -Wno-DECLFILENAME -I%s:h -sv --default-language "1800-2012" %t'
|
||||
AssertLinter 'verilator', 'verilator --lint-only -Wall -Wno-DECLFILENAME -I%s:h -y %s:h -sv --default-language "1800-2012" %t'
|
||||
|
||||
Reference in New Issue
Block a user