Skip to content

Instantly share code, notes, and snippets.

@scrooloose
Last active December 12, 2015 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scrooloose/4774347 to your computer and use it in GitHub Desktop.
Save scrooloose/4774347 to your computer and use it in GitHub Desktop.
"notes:
"syntastic looks for these functions:
"
" SyntaxCheckers_FILETYPE_NAME_IsAvailable()
" SyntaxCheckers_FILETYPE_NAME_GetLocList()
"
" In your code below, FILETYPE is verilog_systemverilog, and NAME is sv_compiler (i
" removed the "my " from the beginning).
"
" I have changed the function names to match, so it should work now :)
function! SyntaxCheckers_verilog_systemverilog_sv_compiler_IsAvailable()
return executable("my sv_compiler")
endfunction
if !exists('g:verilog_systemverilog_checker')
let g:verilog_systemverilog_checker = "my sv_compiler"
endfunction
function! SyntaxCheckers_verilog_systemverilog_sv_compiler_GetLocList()
let makeprg = g:verilog_systemverilog_checker . 'list of arg
files' .shellescape(expand('%')) . 'list of post arg files'
let errorformat = '"%f", %l: %m'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat})
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'verilog_systemverilog',
\ 'name': 'sv_compiler'})
@scrooloose
Copy link
Author

you may want to change NAME to my_sv_compiler if that seems more sensible :)

@tinitot
Copy link

tinitot commented Feb 12, 2013

Wow that was a very quick relpy. First class support :) !! My question now is that what if my executable has a '.' in its name. For exmaple it looks like my_compiler.compiler. Would that affect the SyntaxCheckers_FILETYPE_NAME_GetLocList() function call ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment