Prospector: version 0.7 can check individual files.

This commit is contained in:
LCD 47 2014-10-22 10:04:35 +03:00
parent 3fe6f2a842
commit dd1560862c

View File

@ -18,24 +18,21 @@ let g:loaded_syntastic_python_prospector_checker = 1
let s:save_cpo = &cpo let s:save_cpo = &cpo
set cpo&vim set cpo&vim
function! SyntaxCheckers_python_prospector_GetLocList() dict function! SyntaxCheckers_python_prospector_IsAvailable() dict
let base = syntastic#util#var('prospector_base_dir') if !executable(self.getExec())
if base == '' return 0
let base = expand('%:p:h')
let init = findfile('setup.py', base . ';')
if init == ''
let init = findfile('__init__.py', base . ';')
endif
if init != ''
let base = fnamemodify(init, ':p:h')
endif
call self.log('base =', base)
endif endif
let ver = syntastic#util#getVersion(self.getExecEscaped() . ' --version')
call self.log(self.getExec() . ' version =', ver)
return syntastic#util#versionIsAtLeast(ver, [0, 7])
endfunction
function! SyntaxCheckers_python_prospector_GetLocList() dict
let makeprg = self.makeprgBuild({ let makeprg = self.makeprgBuild({
\ 'args': '--external-config merge', \ 'args': '--external-config merge',
\ 'args_after': '--messages-only --absolute-paths --die-on-tool-error --zero-exit --output-format json', \ 'args_after': '--messages-only --absolute-paths --die-on-tool-error --zero-exit --output-format json' })
\ 'fname': syntastic#util#shescape(base) })
let errorformat = '%f:%l:%c: %m' let errorformat = '%f:%l:%c: %m'