Checker perl: minor fixes.

This commit is contained in:
LCD 47 2016-08-18 09:16:06 +03:00
parent cdfb64db67
commit bee62146bb
2 changed files with 9 additions and 9 deletions

View File

@ -19,7 +19,7 @@ if has('reltime')
lockvar! g:_SYNTASTIC_START lockvar! g:_SYNTASTIC_START
endif endif
let g:_SYNTASTIC_VERSION = '3.7.0-190' let g:_SYNTASTIC_VERSION = '3.7.0-193'
lockvar g:_SYNTASTIC_VERSION lockvar g:_SYNTASTIC_VERSION
" Sanity checks {{{1 " Sanity checks {{{1

View File

@ -1,6 +1,6 @@
"============================================================================ "============================================================================
"File: perl.vim "File: perl.vim
"Description: Syntax checking plugin for syntastic.vim "Description: Syntax checking plugin for syntastic
"Maintainer: Anthony Carapetis <anthony.carapetis at gmail dot com>, "Maintainer: Anthony Carapetis <anthony.carapetis at gmail dot com>,
" Eric Harmon <http://eharmon.net> " Eric Harmon <http://eharmon.net>
"License: This program is free software. It comes without any warranty, "License: This program is free software. It comes without any warranty,
@ -23,7 +23,7 @@
" "
" let g:syntastic_enable_perl_checker = 1 " let g:syntastic_enable_perl_checker = 1
" "
" References: " Reference:
" "
" - http://perldoc.perl.org/perlrun.html#*-c* " - http://perldoc.perl.org/perlrun.html#*-c*
@ -55,15 +55,15 @@ function! SyntaxCheckers_perl_perl_GetLocList() dict " {{{1
call syntastic#log#oneTimeWarn('variable g:syntastic_perl_lib_path should be a list') call syntastic#log#oneTimeWarn('variable g:syntastic_perl_lib_path should be a list')
let includes = split(g:syntastic_perl_lib_path, ',') let includes = split(g:syntastic_perl_lib_path, ',')
else else
let includes = copy(syntastic#util#var('perl_lib_path')) let includes = copy(syntastic#util#var('perl_lib_path', []))
endif endif
let shebang = syntastic#util#parseShebang() let shebang = syntastic#util#parseShebang()
let extra = join(map(includes, '"-I" . v:val')) . let extra = map(includes, '"-I" . v:val') +
\ (index(shebang['args'], '-T') >= 0 ? ' -T' : '') . \ (index(shebang['args'], '-T') >= 0 ? ['-T'] : []) +
\ (index(shebang['args'], '-t') >= 0 ? ' -t' : '') \ (index(shebang['args'], '-t') >= 0 ? ['-t'] : [])
let errorformat = '%f:%l:%m' let errorformat = '%f:%l:%m'
let makeprg = self.makeprgBuild({ 'args_before': '-c -X ' . extra }) let makeprg = self.makeprgBuild({ 'args_before': ['-c', '-X '] + extra })
let errors = SyntasticMake({ let errors = SyntasticMake({
\ 'makeprg': makeprg, \ 'makeprg': makeprg,
@ -74,7 +74,7 @@ function! SyntaxCheckers_perl_perl_GetLocList() dict " {{{1
return errors return errors
endif endif
let makeprg = self.makeprgBuild({ 'args_before': '-c -Mwarnings ' . extra }) let makeprg = self.makeprgBuild({ 'args_before': ['-c', '-Mwarnings'] + extra })
return SyntasticMake({ return SyntasticMake({
\ 'makeprg': makeprg, \ 'makeprg': makeprg,