diff --git a/syntax_checkers/javascript/jsl.vim b/syntax_checkers/javascript/jsl.vim index 36c7efc5..a4a68ae1 100644 --- a/syntax_checkers/javascript/jsl.vim +++ b/syntax_checkers/javascript/jsl.vim @@ -12,8 +12,16 @@ if !exists("g:syntastic_javascript_jsl_conf") let g:syntastic_javascript_jsl_conf = "" endif +function s:ConfFlag() + if !empty(g:syntastic_javascript_jsl_conf) + return "-conf " . g:syntastic_javascript_jsl_conf + endif + + return "" +endfunction + function! SyntaxCheckers_javascript_GetLocList() - let makeprg = "jsl " . g:syntastic_javascript_jsl_conf . " -nologo -nofilelisting -nosummary -nocontext -process ".shellescape(expand('%')) + let makeprg = "jsl " . s:ConfFlag() . " -nologo -nofilelisting -nosummary -nocontext -process ".shellescape(expand('%')) let errorformat='%W%f(%l): lint warning: %m,%-Z%p^,%W%f(%l): warning: %m,%-Z%p^,%E%f(%l): SyntaxError: %m,%-Z%p^,%-G' return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) endfunction