diff options
author | RedBug312 <redbug312@gmail.com> | 2017-11-20 06:59:17 +0800 |
---|---|---|
committer | w0rp <w0rp@users.noreply.github.com> | 2017-11-19 22:59:17 +0000 |
commit | 1afe2992e29c40e445ce29394d8923eb85cec6e2 (patch) | |
tree | a9bb5766c644f37d2e13f6168c10db758a115a1e /ale_linters/verilog | |
parent | 344add6a28a5ee3ba0c6cae0182fdd20ca17d5ad (diff) | |
download | ale-1afe2992e29c40e445ce29394d8923eb85cec6e2.zip |
Make options configurable for iverilog (#1143)
Diffstat (limited to 'ale_linters/verilog')
-rw-r--r-- | ale_linters/verilog/iverilog.vim | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ale_linters/verilog/iverilog.vim b/ale_linters/verilog/iverilog.vim index 18769d56..c64a3be6 100644 --- a/ale_linters/verilog/iverilog.vim +++ b/ale_linters/verilog/iverilog.vim @@ -1,6 +1,14 @@ " Author: Masahiro H https://github.com/mshr-h " Description: iverilog for verilog files +call ale#Set('verilog_iverilog_options', '') + +function! ale_linters#verilog#iverilog#GetCommand(buffer) abort + return 'iverilog -t null -Wall ' + \ . ale#Var(a:buffer, 'verilog_iverilog_options') + \ . ' %t' +endfunction + function! ale_linters#verilog#iverilog#Handle(buffer, lines) abort " Look for lines like the following. " @@ -30,6 +38,6 @@ call ale#linter#Define('verilog', { \ 'name': 'iverilog', \ 'output_stream': 'stderr', \ 'executable': 'iverilog', -\ 'command': 'iverilog -t null -Wall %t', +\ 'command_callback': 'ale_linters#verilog#iverilog#GetCommand', \ 'callback': 'ale_linters#verilog#iverilog#Handle', \}) |