Minor cleanup.
This commit is contained in:
parent
9648145ab1
commit
ee4f39a67d
@ -68,7 +68,7 @@ function! syntastic#log#debug(level, msg, ...) abort " {{{2
|
||||
let leader = s:_log_timestamp()
|
||||
call s:_logRedirect(1)
|
||||
|
||||
if a:0 > 0
|
||||
if a:0
|
||||
" filter out dictionary functions
|
||||
echomsg leader . a:msg . ' ' .
|
||||
\ strtrans(string(type(a:1) == type({}) || type(a:1) == type([]) ?
|
||||
|
@ -132,7 +132,7 @@ endfunction " }}}2
|
||||
|
||||
" Get the value of a Vim variable. Allow buffer variables to override global ones.
|
||||
function! syntastic#util#bufRawVar(buf, name, ...) abort " {{{2
|
||||
return s:_getbufvar(a:buf, a:name, get(g:, a:name, a:0 > 0 ? a:1 : ''))
|
||||
return s:_getbufvar(a:buf, a:name, get(g:, a:name, a:0 ? a:1 : ''))
|
||||
endfunction "}}}2
|
||||
|
||||
" Get the value of a syntastic variable. Allow buffer variables to override global ones.
|
||||
@ -142,7 +142,7 @@ endfunction "}}}2
|
||||
|
||||
" Get the value of a Vim variable. Allow local variables to override global ones.
|
||||
function! syntastic#util#rawVar(name, ...) abort " {{{2
|
||||
return get(b:, a:name, get(g:, a:name, a:0 > 0 ? a:1 : ''))
|
||||
return get(b:, a:name, get(g:, a:name, a:0 ? a:1 : ''))
|
||||
endfunction " }}}2
|
||||
|
||||
" Get the value of a syntastic variable. Allow local variables to override global ones.
|
||||
@ -588,7 +588,7 @@ lockvar s:_float2str
|
||||
|
||||
function! s:_getbufvar_dumb(buf, name, ...) abort " {{{2
|
||||
let ret = getbufvar(a:buf, a:name)
|
||||
if a:0 > 0 && ret ==# ''
|
||||
if a:0 && ret ==# ''
|
||||
unlet! ret
|
||||
let ret = a:1
|
||||
endif
|
||||
|
@ -19,7 +19,7 @@ if has('reltime')
|
||||
lockvar! g:_SYNTASTIC_START
|
||||
endif
|
||||
|
||||
let g:_SYNTASTIC_VERSION = '3.7.0-227'
|
||||
let g:_SYNTASTIC_VERSION = '3.7.0-228'
|
||||
lockvar g:_SYNTASTIC_VERSION
|
||||
|
||||
" Sanity checks {{{1
|
||||
|
@ -68,10 +68,15 @@ endfunction " }}}2
|
||||
" getExec() or getExecEscaped(). Normally isAvailable() does that for you
|
||||
" automatically, but you should keep still this in mind if you change the
|
||||
" current checker workflow.
|
||||
function! g:SyntasticChecker.syncExec() abort " {{{2
|
||||
let suffix = self._name . '_exec'
|
||||
let user_exec = expand( syntastic#util#var(self._filetype . '_' . suffix, syntastic#util#var(suffix)), 1 )
|
||||
let self._exec = user_exec !=# '' ? user_exec : self._exec_default
|
||||
function! g:SyntasticChecker.syncExec(...) abort " {{{2
|
||||
if a:0
|
||||
let self._exec = a:1
|
||||
else
|
||||
let suffix = self._name . '_exec'
|
||||
let self._exec = expand(
|
||||
\ syntastic#util#var(self._filetype . '_' . suffix,
|
||||
\ syntastic#util#var(suffix, self._exec_default)), 1 )
|
||||
endif
|
||||
endfunction " }}}2
|
||||
|
||||
function! g:SyntasticChecker.getExec() abort " {{{2
|
||||
@ -157,7 +162,7 @@ endfunction " }}}2
|
||||
|
||||
function! g:SyntasticChecker.log(msg, ...) abort " {{{2
|
||||
let leader = self._filetype . '/' . self._name . ': '
|
||||
if a:0 > 0
|
||||
if a:0
|
||||
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_CHECKERS, leader . a:msg, a:1)
|
||||
else
|
||||
call syntastic#log#debug(g:_SYNTASTIC_DEBUG_CHECKERS, leader . a:msg)
|
||||
|
@ -28,7 +28,7 @@ function! g:SyntasticLoclist.New(rawLoclist) abort " {{{2
|
||||
endfunction " }}}2
|
||||
|
||||
function! g:SyntasticLoclist.current(...) abort " {{{2
|
||||
let buf = a:0 > 1 ? a:1 : bufnr('')
|
||||
let buf = a:0 ? a:1 : bufnr('')
|
||||
let loclist = syntastic#util#getbufvar(buf, 'syntastic_loclist', {})
|
||||
if type(loclist) != type({}) || empty(loclist)
|
||||
unlet! loclist
|
||||
|
Loading…
x
Reference in New Issue
Block a user