Flow checker: bail out if there is no .flowconfig.

This commit is contained in:
LCD 47 2015-03-15 07:30:50 +02:00
parent 5b0d3dc8bc
commit 7b8526b966
2 changed files with 5 additions and 1 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.6.0-57' let g:_SYNTASTIC_VERSION = '3.6.0-58'
lockvar g:_SYNTASTIC_VERSION lockvar g:_SYNTASTIC_VERSION
" Sanity checks {{{1 " Sanity checks {{{1

View File

@ -22,6 +22,10 @@ let s:save_cpo = &cpo
set cpo&vim set cpo&vim
function! SyntaxCheckers_javascript_flow_GetLocList() dict function! SyntaxCheckers_javascript_flow_GetLocList() dict
if findfile('.flowconfig', '.;') == ''
return []
endif
let makeprg = self.makeprgBuild({ let makeprg = self.makeprgBuild({
\ 'exe': self.getExecEscaped() . ' check', \ 'exe': self.getExecEscaped() . ' check',
\ 'args_after': '--show-all-errors --json' }) \ 'args_after': '--show-all-errors --json' })