summaryrefslogtreecommitdiff
path: root/ale_linters/verilog
diff options
context:
space:
mode:
authorTarik Graba <tarikgraba@users.noreply.github.com>2017-06-29 10:15:52 +0200
committerw0rp <w0rp@users.noreply.github.com>2017-06-29 09:15:52 +0100
commit01ecf2a75f60fff8884ad7858da44b3c5f71bc11 (patch)
treee22a78c39ecf0a71612ee71e4c10f9ed99e249d9 /ale_linters/verilog
parent7eec1f2efc01b0674ccc96baaa4f529d803ddf55 (diff)
downloadale-01ecf2a75f60fff8884ad7858da44b3c5f71bc11.zip
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
Diffstat (limited to 'ale_linters/verilog')
-rw-r--r--ale_linters/verilog/verilator.vim9
1 files changed, 8 insertions, 1 deletions
diff --git a/ale_linters/verilog/verilator.vim b/ale_linters/verilog/verilator.vim
index b44731c7..aa5e7047 100644
--- a/ale_linters/verilog/verilator.vim
+++ b/ale_linters/verilog/verilator.vim
@@ -1,6 +1,11 @@
" Author: Masahiro H https://github.com/mshr-h
" Description: verilator for verilog files
+" Set this option to change Verilator lint options
+if !exists('g:ale_verilog_verilator_options')
+ let g:ale_verilog_verilator_options = ''
+endif
+
function! ale_linters#verilog#verilator#GetCommand(buffer) abort
let l:filename = tempname() . '_verilator_linted.v'
@@ -8,7 +13,9 @@ function! ale_linters#verilog#verilator#GetCommand(buffer) abort
call ale#engine#ManageFile(a:buffer, l:filename)
call writefile(getbufline(a:buffer, 1, '$'), l:filename)
- return 'verilator --lint-only -Wall -Wno-DECLFILENAME ' . ale#Escape(l:filename)
+ return 'verilator --lint-only -Wall -Wno-DECLFILENAME '
+ \ . ale#Var(a:buffer, 'verilog_verilator_options') .' '
+ \ . ale#Escape(l:filename)
endfunction
function! ale_linters#verilog#verilator#Handle(buffer, lines) abort