Checkstyle checker: cleanup.

This commit is contained in:
LCD 47 2014-09-26 15:02:11 +03:00
parent 2a88120b33
commit fe6003c3be
2 changed files with 14 additions and 6 deletions

View File

@ -19,7 +19,7 @@ if has('reltime')
lockvar! g:syntastic_start
endif
let g:syntastic_version = '3.5.0-33'
let g:syntastic_version = '3.5.0-34'
lockvar g:syntastic_version
" Sanity checks {{{1

View File

@ -27,19 +27,27 @@ endif
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_java_checkstyle_IsAvailable() dict
return
\ executable(self.getExec()) &&
\ filereadable(expand(g:syntastic_java_checkstyle_classpath)) &&
\ filereadable(expand(g:syntastic_java_checkstyle_conf_file))
endfunction
function! SyntaxCheckers_java_checkstyle_GetLocList() dict
let fname = syntastic#util#shescape( expand('%:p:h') . '/' . expand('%:t') )
let fname = syntastic#util#shescape( expand('%:p:h') . syntastic#util#Slash() . expand('%:t') )
if has('win32unix')
let fname = substitute(system('cygpath -m ' . fname), '\m\%x00', '', 'g')
endif
let makeprg = self.makeprgBuild({
\ 'args_after': '-cp ' . g:syntastic_java_checkstyle_classpath .
\ ' com.puppycrawl.tools.checkstyle.Main -c ' .
\ syntastic#util#shexpand(g:syntastic_java_checkstyle_conf_file) .
\ ' -f xml',
\ 'args_after': [
\ '-cp', expand(g:syntastic_java_checkstyle_classpath),
\ 'com.puppycrawl.tools.checkstyle.Main',
\ '-c', expand(g:syntastic_java_checkstyle_conf_file),
\ '-f', 'xml'],
\ 'fname': fname })
let errorformat = '%f:%t:%l:%c:%m'