Merge pull request #333 from pneff/puppet-lint
Allow puppet validation to be disabled
This commit is contained in:
commit
38eeaa8a87
@ -19,6 +19,10 @@ if !executable("puppet")
|
|||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if !exists("g:syntastic_puppet_validate_disable")
|
||||||
|
let g:syntastic_puppet_validate_disable = 0
|
||||||
|
endif
|
||||||
|
|
||||||
if !exists("g:syntastic_puppet_lint_disable")
|
if !exists("g:syntastic_puppet_lint_disable")
|
||||||
let g:syntastic_puppet_lint_disable = 0
|
let g:syntastic_puppet_lint_disable = 0
|
||||||
endif
|
endif
|
||||||
@ -94,7 +98,9 @@ function! s:getPuppetMakeprg()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_puppet_GetLocList()
|
function! SyntaxCheckers_puppet_GetLocList()
|
||||||
|
let errors = []
|
||||||
|
|
||||||
|
if !g:syntastic_puppet_validate_disable
|
||||||
let makeprg = s:getPuppetMakeprg()
|
let makeprg = s:getPuppetMakeprg()
|
||||||
|
|
||||||
"some versions of puppet (e.g. 2.7.10) output the message below if there
|
"some versions of puppet (e.g. 2.7.10) output the message below if there
|
||||||
@ -102,7 +108,8 @@ function! SyntaxCheckers_puppet_GetLocList()
|
|||||||
let errorformat = '%-Gerr: Try ''puppet help parser validate'' for usage,'
|
let errorformat = '%-Gerr: Try ''puppet help parser validate'' for usage,'
|
||||||
let errorformat .= 'err: Could not parse for environment %*[a-z]: %m at %f:%l'
|
let errorformat .= 'err: Could not parse for environment %*[a-z]: %m at %f:%l'
|
||||||
|
|
||||||
let errors = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
let errors = errors + SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||||
|
endif
|
||||||
|
|
||||||
if !g:syntastic_puppet_lint_disable
|
if !g:syntastic_puppet_lint_disable
|
||||||
let errors = errors + s:getPuppetLintErrors()
|
let errors = errors + s:getPuppetLintErrors()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user