From d798286bb76d0677b99fbfb6b6b07d02ef6b63de Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Sun, 17 Jun 2012 03:33:49 -0400 Subject: [PATCH] Enable pass arguments to puppet-lint Some users might want to disable some checks for puppet-lint if they do not intend to follow all of the style recommendations. There is currently no way of doing that. By adding a global variable synstastic_puppet_lint_arguments, one can now set arguments to pass to puppet-lint via .vimrc. Signed-off-by: Gabriel Filion --- syntax_checkers/puppet.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/syntax_checkers/puppet.vim b/syntax_checkers/puppet.vim index fdfc6a3c..28c9e339 100644 --- a/syntax_checkers/puppet.vim +++ b/syntax_checkers/puppet.vim @@ -48,7 +48,11 @@ if !(s:lintVersion[0] >= '0' && s:lintVersion[1] >= '1' && s:lintVersion[2] >= ' endif function! s:getPuppetLintErrors() - let makeprg = 'puppet-lint --log-format "\%{KIND} [\%{check}] \%{message} at \%{fullpath}:\%{linenumber}" '.shellescape(expand('%')) + if !exists("g:syntastic_puppet_lint_arguments") + let g:syntastic_puppet_lint_arguments = '' + endif + + let makeprg = 'puppet-lint --log-format "\%{KIND} [\%{check}] \%{message} at \%{fullpath}:\%{linenumber}" '.g:syntastic_puppet_lint_arguments.shellescape(expand('%')) let errorformat = '%t%*[a-zA-Z] %m at %f:%l' return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'subtype': 'Style' }) endfunction