Make b:syntastic_skip_checks
suitable for general use.
Document `b:syntastic_skip_checks`. Minor cleanup.
This commit is contained in:
parent
7cdfd91c99
commit
aac0775c39
@ -239,7 +239,7 @@ the order specified. The rules of |syntastic_aggregate_errors| still apply.
|
||||
Example: >
|
||||
:SyntasticCheck flake8 pylint
|
||||
<
|
||||
:SyntasticInfo *:SyntasticInfo*
|
||||
:SyntasticInfo *:SyntasticInfo*
|
||||
|
||||
The command takes an optional argument, and outputs information about the
|
||||
checkers available for the filetype named by said argument, or for the current
|
||||
@ -518,6 +518,12 @@ statusline: >
|
||||
<
|
||||
If the buffer had 2 warnings, starting on line 5 then this would appear: >
|
||||
[Warn: 5 #2]
|
||||
<
|
||||
*'b:syntastic_skip_checks'*
|
||||
Default: unset
|
||||
Only the local form |'b:syntastic_skip_checks'| is used. When set to a true
|
||||
value, no checks are run against the corresponding buffer. Example: >
|
||||
let b:syntastic_skip_checks = 1
|
||||
<
|
||||
*'syntastic_full_redraws'*
|
||||
Default: 0 in GUI Vim and MacVim, 1 otherwise
|
||||
|
@ -19,7 +19,7 @@ if has('reltime')
|
||||
lockvar! g:syntastic_start
|
||||
endif
|
||||
|
||||
let g:syntastic_version = '3.5.0-7'
|
||||
let g:syntastic_version = '3.5.0-10'
|
||||
lockvar g:syntastic_version
|
||||
|
||||
" Sanity checks {{{1
|
||||
@ -230,7 +230,7 @@ endfunction " }}}2
|
||||
function! s:QuitPreHook() " {{{2
|
||||
call syntastic#log#debug(g:SyntasticDebugAutocommands,
|
||||
\ 'autocmd: QuitPre, buffer ' . bufnr("") . ' = ' . string(bufname(str2nr(bufnr("")))))
|
||||
let b:syntastic_skip_checks = !g:syntastic_check_on_wq
|
||||
let b:syntastic_skip_checks = get(b:, 'syntastic_skip_checks', 0) || !syntastic#util#var('check_on_wq')
|
||||
call SyntasticLoclistHide()
|
||||
endfunction " }}}2
|
||||
|
||||
@ -557,9 +557,9 @@ endfunction " }}}2
|
||||
" Skip running in special buffers
|
||||
function! s:skipFile() " {{{2
|
||||
let fname = expand('%')
|
||||
let skip = (exists('b:syntastic_skip_checks') ? b:syntastic_skip_checks : 0) ||
|
||||
\ (&buftype != '') || !filereadable(fname) || getwinvar(0, '&diff') ||
|
||||
\ s:ignoreFile(fname) || fnamemodify(fname, ':e') =~? g:syntastic_ignore_extensions
|
||||
let skip = get(b:, 'syntastic_skip_checks', 0) || (&buftype != '') ||
|
||||
\ !filereadable(fname) || getwinvar(0, '&diff') || s:ignoreFile(fname) ||
|
||||
\ fnamemodify(fname, ':e') =~? g:syntastic_ignore_extensions
|
||||
if skip
|
||||
call syntastic#log#debug(g:SyntasticDebugTrace, 'skipFile: skipping')
|
||||
endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user