This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
ale/test/test_verilog_verilator_options.vader
Tarik Graba 01ecf2a75f Adds an option to pass additional arguments to the verilog/verilator … (#698)
* Adds an option to pass additional arguments to the verilog/verilator linter

The new otion is g:ale_verilog_verilator_options
+ doc

* Spell check verilog linter doc file

* Add entries to the verilog linters in the doc table of content

* Vader test for verilog/verilator linter args option verilog_verilator_options
2017-06-29 09:15:52 +01:00

25 lines
703 B
Text

Before:
Save g:ale_verilog_verilator_options
let g:ale_verilog_verilator_options = ''
After:
Restore
call ale#linter#Reset()
Execute(Set Verilog Verilator linter additional options to `-sv --default-language "1800-2012"`):
runtime! ale_linters/verilog/verilator.vim
" Additional args for the linter
let g:ale_verilog_verilator_options = '-sv --default-language "1800-2012"'
call ale#Lint()
let g:run_cmd = ale_linters#verilog#verilator#GetCommand(bufnr(''))
let g:matched = match(g:run_cmd, '\s' . g:ale_verilog_verilator_options . '\s')
" match returns -1 if not found
AssertNotEqual
\ g:matched ,
\ -1 ,
\ 'Additionnal arguments not found in the run command'