diff --git a/syntax_checkers/puppet.vim b/syntax_checkers/puppet.vim index 0f3298b5..163d253f 100644 --- a/syntax_checkers/puppet.vim +++ b/syntax_checkers/puppet.vim @@ -72,14 +72,8 @@ function! s:getPuppetMakeprg() let makeprg = 'puppet parser validate ' . \ shellescape(expand('%')) . \ ' --color=false' - - "add --ignoreimport for versions < 2.7.10 - if s:PuppetVersion()[2] < '10' - let makeprg .= ' --ignoreimport' - endif - else - let makeprg = 'puppet --color=false --parseonly --ignoreimport '.shellescape(expand('%')) + let makeprg = 'puppet --color=false --parseonly '.shellescape(expand('%')) endif return makeprg endfunction @@ -95,6 +89,13 @@ function! SyntaxCheckers_puppet_GetLocList() let errorformat = '%-Gerr: Try ''puppet help parser validate'' for usage,' let errorformat .= 'err: Could not parse for environment %*[a-z]: %m at %f:%l' + "Puppet 3.0.0 changes this from "err:" to "Error:" + "reset errorformat in that case + if SyntasticIsVersionAtLeast(s:PuppetVersion(), [3,0,0]) + let errorformat = '%-GError: Try ''puppet help parser validate'' for usage,' + let errorformat .= 'Error: Could not parse for environment %*[a-z]: %m at %f:%l' + endif + let errors = errors + SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) endif