Print a message if no active checkers are found.
This commit is contained in:
parent
ede4127f13
commit
af9d6f627b
@ -138,13 +138,21 @@ function! syntastic#util#debug(msg)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! syntastic#util#info(msg)
|
||||
echomsg "syntastic: info: " . a:msg
|
||||
endfunction
|
||||
|
||||
function! syntastic#util#warn(msg)
|
||||
echomsg "syntastic: warning: " . a:msg
|
||||
endfunction
|
||||
|
||||
function! syntastic#util#deprecationWarn(msg)
|
||||
if index(s:deprecationNoticesIssued, a:msg) >= 0
|
||||
return
|
||||
endif
|
||||
|
||||
call add(s:deprecationNoticesIssued, a:msg)
|
||||
echomsg "syntastic: warning: " . a:msg
|
||||
call syntastic#util#warn(a:msg)
|
||||
endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
|
@ -162,17 +162,17 @@ function! s:CacheErrors(...)
|
||||
let newLoclist = g:SyntasticLoclist.New([])
|
||||
|
||||
if !s:SkipFile()
|
||||
let active_checkers = 0
|
||||
for ft in s:CurrentFiletypes()
|
||||
if a:0
|
||||
let checker = s:registry.getChecker(ft, a:1)
|
||||
if !empty(checker)
|
||||
let checkers = [checker]
|
||||
endif
|
||||
let checkers = !empty(checker) ? [checker] : []
|
||||
else
|
||||
let checkers = s:registry.getActiveCheckers(ft)
|
||||
endif
|
||||
|
||||
for checker in checkers
|
||||
let active_checkers += 1
|
||||
call syntastic#util#debug("CacheErrors: Invoking checker: " . checker.getName())
|
||||
|
||||
let loclist = checker.getLocList()
|
||||
@ -186,6 +186,14 @@ function! s:CacheErrors(...)
|
||||
endif
|
||||
endfor
|
||||
endfor
|
||||
|
||||
if !active_checkers
|
||||
if a:0
|
||||
call syntastic#util#warn('checker ' . a:1 . ' is not active for filetype ' . &filetype)
|
||||
else
|
||||
call syntastic#util#info('no active checkers for filetype ' . &filetype)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
let b:syntastic_loclist = newLoclist
|
||||
|
Loading…
x
Reference in New Issue
Block a user