1
0
mirror of https://github.com/amix/vimrc synced 2025-07-21 11:54:59 +08:00
This commit is contained in:
huangqundl
2017-03-17 23:12:53 +08:00
parent 47b213d974
commit cba39b7326
855 changed files with 59981 additions and 35298 deletions

View File

@ -10,7 +10,7 @@
"
"============================================================================
if exists("g:loaded_syntastic_puppet_puppet_checker")
if exists('g:loaded_syntastic_puppet_puppet_checker')
finish
endif
let g:loaded_syntastic_puppet_puppet_checker = 1
@ -19,18 +19,12 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_puppet_puppet_GetLocList() dict
if !exists('s:puppet_version')
let s:puppet_version = syntastic#util#getVersion(self.getExecEscaped() . ' --version 2>' . syntastic#util#DevNull())
call self.log(self.getExec() . ' version =', s:puppet_version)
if !exists('s:puppet_new')
let s:puppet_new = syntastic#util#versionIsAtLeast(self.getVersion(), [2, 7, 0])
endif
if syntastic#util#versionIsAtLeast(s:puppet_version, [2,7,0])
let args = 'parser validate --color=false'
else
let args = '--color=false --parseonly'
endif
let makeprg = self.makeprgBuild({ 'args_before': args })
let makeprg = self.makeprgBuild({
\ 'args_before': (s:puppet_new ? 'parser validate --color=false' : '--color=false --parseonly') })
let errorformat =
\ '%-Gerr: Try ''puppet help parser validate'' for usage,' .
@ -50,4 +44,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set et sts=4 sw=4:
" vim: set sw=4 sts=4 et fdm=marker:

View File

@ -10,7 +10,7 @@
"
"============================================================================
if exists("g:loaded_syntastic_puppet_puppetlint_checker")
if exists('g:loaded_syntastic_puppet_puppetlint_checker')
finish
endif
let g:loaded_syntastic_puppet_puppetlint_checker = 1
@ -19,23 +19,20 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_puppet_puppetlint_IsAvailable() dict
call self.log("executable('puppet') = " . executable('puppet') . ', ' .
\ "executable(" . string(self.getExec()) . ") = " . executable(self.getExec()))
if !executable('puppet') || !executable(self.getExec())
if !executable(self.getExec())
return 0
endif
let ver = syntastic#util#getVersion(self.getExecEscaped() . ' --version 2>' . syntastic#util#DevNull())
call self.log(self.getExec() . ' version =', ver)
return syntastic#util#versionIsAtLeast(ver, [0, 1, 10])
let s:puppetlint_new = syntastic#util#versionIsAtLeast(self.getVersion(), [1])
return syntastic#util#versionIsAtLeast(self.getVersion(), [0, 2])
endfunction
function! SyntaxCheckers_puppet_puppetlint_GetLocList() dict
call syntastic#log#deprecationWarn('puppet_lint_arguments', 'puppet_puppetlint_args')
let makeprg = self.makeprgBuild({
\ 'args_after': '--log-format "%{KIND} [%{check}] %{message} at %{fullpath}:%{linenumber}"' })
\ 'args_after':
\ '--log-format "%{KIND} [%{check}] %{message} at %{fullpath}:' .
\ (s:puppetlint_new ? '%{line}' : '%{linenumber}') . '"' })
let errorformat = '%t%*[a-zA-Z] %m at %f:%l'
@ -52,4 +49,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set et sts=4 sw=4:
" vim: set sw=4 sts=4 et fdm=marker: