Add verilator checker for verilog.

This commit is contained in:
LCD 47 2013-08-07 20:41:50 +03:00
parent 74cd2bd9c9
commit 5c75519bc8
2 changed files with 44 additions and 2 deletions

View File

@ -32,8 +32,8 @@ Fortran, Gentoo metadata, Go, Haml, Haskell, Haxe, HSS, HTML, Java,
JavaScript, JSON, LESS, LISP, LLVM intermediate language, Lua, MATLAB, JavaScript, JSON, LESS, LISP, LLVM intermediate language, Lua, MATLAB,
NASM, Objective-C, Objective-C++, OCaml, Perl, Perl POD, PHP, Puppet, NASM, Objective-C, Objective-C++, OCaml, Perl, Perl POD, PHP, Puppet,
Python, reStructuredText, Ruby, Rust, SASS/SCSS, Scala, Slim, Tcl, TeX, Python, reStructuredText, Ruby, Rust, SASS/SCSS, Scala, Slim, Tcl, TeX,
Twig, TypeScript, Vala, VHDL, xHtml, XML, XSLT, YAML, z80, Zope page Twig, TypeScript, Vala, Verilog, VHDL, xHtml, XML, XSLT, YAML, z80, Zope
templates, zsh. page templates, zsh.
## Screenshot ## Screenshot

View File

@ -0,0 +1,42 @@
"============================================================================
"File: verilator.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: Kocha <kocha dot lsifrontend at gmail dot com>
"============================================================================
if exists("g:loaded_syntastic_verilog_verilator_checker")
finish
endif
let g:loaded_syntastic_verilog_verilator_checker = 1
if !exists('g:syntastic_verilog_compiler')
let g:syntastic_verilog_compiler = 'verilator'
endif
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_verilog_verilator_IsAvailable()
return executable(g:syntastic_verilog_compiler)
endfunction
if !exists('g:syntastic_verilog_compiler_options')
let g:syntastic_verilog_compiler_options = '-Wall'
endif
function! SyntaxCheckers_verilog_verilator_GetLocList()
return syntastic#c#GetLocList('verilog', 'verilator', {
\ 'errorformat':
\ '%%%trror-%\=%\w%#: %f:%l: %m,' .
\ '%%%tarning-%\=%\w%#: %f:%l: %m',
\ 'main_flags': '--lint-only' })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'verilog',
\ 'name': 'verilator'})
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set et sts=4 sw=4: