Bug fix: checker ordering. Formatting.
This commit is contained in:
parent
47e5739f2e
commit
2940b0c721
@ -285,10 +285,12 @@ function! s:CacheErrors(checkers) " {{{2
|
|||||||
if !s:skipFile()
|
if !s:skipFile()
|
||||||
let names = []
|
let names = []
|
||||||
|
|
||||||
|
" debug logging {{{3
|
||||||
call syntastic#log#debugShowOptions(g:SyntasticDebugTrace, s:debug_dump_options)
|
call syntastic#log#debugShowOptions(g:SyntasticDebugTrace, s:debug_dump_options)
|
||||||
call syntastic#log#debugDump(g:SyntasticDebugVariables)
|
call syntastic#log#debugDump(g:SyntasticDebugVariables)
|
||||||
call syntastic#log#debugShowVariables(g:SyntasticDebugTrace, 'aggregate_errors')
|
call syntastic#log#debugShowVariables(g:SyntasticDebugTrace, 'aggregate_errors')
|
||||||
call syntastic#log#debug(g:SyntasticDebugTrace, 'getcwd() = ' . getcwd())
|
call syntastic#log#debug(g:SyntasticDebugTrace, 'getcwd() = ' . getcwd())
|
||||||
|
" }}}3
|
||||||
|
|
||||||
let filetypes = s:resolveFiletypes()
|
let filetypes = s:resolveFiletypes()
|
||||||
let aggregate_errors = syntastic#util#var('aggregate_errors')
|
let aggregate_errors = syntastic#util#var('aggregate_errors')
|
||||||
@ -296,7 +298,8 @@ function! s:CacheErrors(checkers) " {{{2
|
|||||||
|
|
||||||
let clist = []
|
let clist = []
|
||||||
for ft in filetypes
|
for ft in filetypes
|
||||||
let clist = s:registry.getCheckers(ft, a:checkers)
|
call extend(clist, s:registry.getCheckers(ft, a:checkers))
|
||||||
|
endfor
|
||||||
|
|
||||||
for checker in clist
|
for checker in clist
|
||||||
call syntastic#log#debug(g:SyntasticDebugTrace, 'CacheErrors: Invoking checker: ' . checker.getName())
|
call syntastic#log#debug(g:SyntasticDebugTrace, 'CacheErrors: Invoking checker: ' . checker.getName())
|
||||||
@ -316,8 +319,8 @@ function! s:CacheErrors(checkers) " {{{2
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
endfor
|
|
||||||
|
|
||||||
|
" set names {{{3
|
||||||
if !empty(names)
|
if !empty(names)
|
||||||
if len(syntastic#util#unique(map(copy(names), 'v:val[1]'))) == 1
|
if len(syntastic#util#unique(map(copy(names), 'v:val[1]'))) == 1
|
||||||
let type = names[0][1]
|
let type = names[0][1]
|
||||||
@ -328,7 +331,9 @@ function! s:CacheErrors(checkers) " {{{2
|
|||||||
call newLoclist.setName(join(map(names, 'v:val[1] . "/" . v:val[0]'), ', '))
|
call newLoclist.setName(join(map(names, 'v:val[1] . "/" . v:val[0]'), ', '))
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
" }}}3
|
||||||
|
|
||||||
|
" issue warning about no active checkers {{{3
|
||||||
if empty(clist)
|
if empty(clist)
|
||||||
if !empty(a:checkers)
|
if !empty(a:checkers)
|
||||||
if len(a:checkers) == 1
|
if len(a:checkers) == 1
|
||||||
@ -340,6 +345,7 @@ function! s:CacheErrors(checkers) " {{{2
|
|||||||
call syntastic#log#debug(g:SyntasticDebugTrace, 'CacheErrors: no active checkers for filetype ' . &filetype)
|
call syntastic#log#debug(g:SyntasticDebugTrace, 'CacheErrors: no active checkers for filetype ' . &filetype)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
" }}}3
|
||||||
|
|
||||||
call syntastic#log#debug(g:SyntasticDebugLoclist, 'aggregated:', newLoclist)
|
call syntastic#log#debug(g:SyntasticDebugLoclist, 'aggregated:', newLoclist)
|
||||||
|
|
||||||
@ -384,6 +390,7 @@ endfunction " }}}2
|
|||||||
function! SyntasticMake(options) " {{{2
|
function! SyntasticMake(options) " {{{2
|
||||||
call syntastic#log#debug(g:SyntasticDebugTrace, 'SyntasticMake: called with options:', a:options)
|
call syntastic#log#debug(g:SyntasticDebugTrace, 'SyntasticMake: called with options:', a:options)
|
||||||
|
|
||||||
|
" save options and locale env variables {{{3
|
||||||
let old_shell = &shell
|
let old_shell = &shell
|
||||||
let old_shellredir = &shellredir
|
let old_shellredir = &shellredir
|
||||||
let old_local_errorformat = &l:errorformat
|
let old_local_errorformat = &l:errorformat
|
||||||
@ -391,6 +398,7 @@ function! SyntasticMake(options) " {{{2
|
|||||||
let old_cwd = getcwd()
|
let old_cwd = getcwd()
|
||||||
let old_lc_messages = $LC_MESSAGES
|
let old_lc_messages = $LC_MESSAGES
|
||||||
let old_lc_all = $LC_ALL
|
let old_lc_all = $LC_ALL
|
||||||
|
" }}}3
|
||||||
|
|
||||||
call s:bashHack()
|
call s:bashHack()
|
||||||
|
|
||||||
@ -423,10 +431,13 @@ function! SyntasticMake(options) " {{{2
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
silent! lolder
|
silent! lolder
|
||||||
|
|
||||||
|
" restore options {{{3
|
||||||
let &errorformat = old_errorformat
|
let &errorformat = old_errorformat
|
||||||
let &l:errorformat = old_local_errorformat
|
let &l:errorformat = old_local_errorformat
|
||||||
let &shellredir = old_shellredir
|
let &shellredir = old_shellredir
|
||||||
let &shell = old_shell
|
let &shell = old_shell
|
||||||
|
" }}}3
|
||||||
|
|
||||||
if !s:running_windows && (s:uname() =~ "FreeBSD" || s:uname() =~ "OpenBSD")
|
if !s:running_windows && (s:uname() =~ "FreeBSD" || s:uname() =~ "OpenBSD")
|
||||||
call syntastic#util#redraw(g:syntastic_full_redraws)
|
call syntastic#util#redraw(g:syntastic_full_redraws)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user