From: Alexis Laferrière Date: Mon, 13 Jan 2014 16:39:25 +0000 (-0500) Subject: misc: adds the option to specify the main nit module to syntastic X-Git-Tag: v0.6.4~70^2~1^2 X-Git-Url: http://nitlanguage.org misc: adds the option to specify the main nit module to syntastic Signed-off-by: Alexis Laferrière --- diff --git a/misc/vim/syntax_checkers/nit/nitc.vim b/misc/vim/syntax_checkers/nit/nitc.vim index 1637f46..563e478 100644 --- a/misc/vim/syntax_checkers/nit/nitc.vim +++ b/misc/vim/syntax_checkers/nit/nitc.vim @@ -37,7 +37,7 @@ function! SyntaxCheckers_nit_nitc_IsAvailable() endfunction function! SyntaxCheckers_nit_nitc_GetLocList() - let makeprg = s:nitc . " --no-color --only-metamodel 2>&1 " . shellescape(expand("%")) + let makeprg = s:nitc . " --no-color --only-metamodel " " custom NIT_DIR if exists('g:syntastic_nit_dir') @@ -56,6 +56,16 @@ function! SyntaxCheckers_nit_nitc_GetLocList() endfor end + " alternative main module + if exists('g:nit_main') + let makeprg .= " " . g:nit_main + else + let makeprg .= " " . shellescape(expand("%")) + end + + " pipe stderr + let makeprg .= " 2>&1 " + " possible combinations of error messages let ef_start = [ '%f:%l\,%c--%*[0-9]:', \ '%f:%l\,%c--%*[0-9]\,%*[0-9]:',