Cleanup.
This commit is contained in:
parent
b940830756
commit
eb2b9cfcd9
@ -19,7 +19,7 @@ if has('reltime')
|
||||
lockvar! g:_SYNTASTIC_START
|
||||
endif
|
||||
|
||||
let g:_SYNTASTIC_VERSION = '3.7.0-127'
|
||||
let g:_SYNTASTIC_VERSION = '3.7.0-128'
|
||||
lockvar g:_SYNTASTIC_VERSION
|
||||
|
||||
" Sanity checks {{{1
|
||||
|
@ -20,7 +20,7 @@ let s:ghc_mod_new = -1
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_haskell_ghc_mod_IsAvailable() dict
|
||||
function! SyntaxCheckers_haskell_ghc_mod_IsAvailable() dict " {{{1
|
||||
if !executable(self.getExec())
|
||||
return 0
|
||||
endif
|
||||
@ -59,9 +59,9 @@ function! SyntaxCheckers_haskell_ghc_mod_IsAvailable() dict
|
||||
let s:ghc_mod_bailout = syntastic#util#versionIsAtLeast(parsed_ver, [5, 4])
|
||||
|
||||
return (s:ghc_mod_new >= 0) && (v:version >= 704 || s:ghc_mod_new) && !s:ghc_mod_bailout
|
||||
endfunction
|
||||
endfunction " }}}1
|
||||
|
||||
function! SyntaxCheckers_haskell_ghc_mod_GetLocList() dict
|
||||
function! SyntaxCheckers_haskell_ghc_mod_GetLocList() dict " {{{1
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe': self.getExecEscaped() . ' check' . (s:ghc_mod_new ? ' --boundary=""' : '') })
|
||||
|
||||
@ -81,7 +81,7 @@ function! SyntaxCheckers_haskell_ghc_mod_GetLocList() dict
|
||||
\ 'preprocess': 'iconv',
|
||||
\ 'postprocess': ['compressWhitespace'],
|
||||
\ 'returns': [0] })
|
||||
endfunction
|
||||
endfunction " }}}1
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'haskell',
|
||||
|
@ -17,7 +17,7 @@ let g:loaded_syntastic_javascript_jsxhint_checker = 1
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_javascript_jsxhint_IsAvailable() dict
|
||||
function! SyntaxCheckers_javascript_jsxhint_IsAvailable() dict " {{{1
|
||||
if !executable(self.getExec())
|
||||
return 0
|
||||
endif
|
||||
@ -32,9 +32,9 @@ function! SyntaxCheckers_javascript_jsxhint_IsAvailable() dict
|
||||
endif
|
||||
|
||||
return syntastic#util#versionIsAtLeast(parsed_ver, [0, 4, 1])
|
||||
endfunction
|
||||
endfunction " }}}1
|
||||
|
||||
function! SyntaxCheckers_javascript_jsxhint_GetLocList() dict
|
||||
function! SyntaxCheckers_javascript_jsxhint_GetLocList() dict " {{{1
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args_after': '--verbose' })
|
||||
|
||||
@ -44,7 +44,7 @@ function! SyntaxCheckers_javascript_jsxhint_GetLocList() dict
|
||||
\ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'defaults': {'bufnr': bufnr('')} })
|
||||
endfunction
|
||||
endfunction " }}}1
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'javascript',
|
||||
|
@ -20,8 +20,6 @@ set cpo&vim
|
||||
|
||||
" Checker options {{{1
|
||||
|
||||
let s:ocamlpp = get(g:, 'syntastic_ocaml_camlp4r', 0) ? 'camlp4r' : 'camlp4o'
|
||||
|
||||
if !exists('g:syntastic_ocaml_use_ocamlc') || !executable('ocamlc')
|
||||
let g:syntastic_ocaml_use_ocamlc = 0
|
||||
endif
|
||||
@ -41,6 +39,7 @@ endif
|
||||
" }}}1
|
||||
|
||||
function! SyntaxCheckers_ocaml_camlp4o_IsAvailable() dict " {{{1
|
||||
let s:ocamlpp = get(g:, 'syntastic_ocaml_camlp4r', 0) ? 'camlp4r' : 'camlp4o'
|
||||
return executable(s:ocamlpp)
|
||||
endfunction " }}}1
|
||||
|
||||
@ -81,31 +80,22 @@ endfunction " }}}1
|
||||
" Utilities {{{1
|
||||
|
||||
function! s:GetMakeprg() " {{{2
|
||||
if g:syntastic_ocaml_use_ocamlc
|
||||
return s:GetOcamlcMakeprg()
|
||||
endif
|
||||
|
||||
if g:syntastic_ocaml_use_ocamlbuild && isdirectory('_build')
|
||||
return s:GetOcamlBuildMakeprg()
|
||||
endif
|
||||
|
||||
return s:GetOtherMakeprg()
|
||||
return
|
||||
\ g:syntastic_ocaml_use_ocamlc ? g:syntastic_ocaml_use_ocamlc :
|
||||
\ (g:syntastic_ocaml_use_ocamlbuild && isdirectory('_build')) ? s:GetOcamlcMakeprg() :
|
||||
\ s:GetOtherMakeprg()
|
||||
endfunction " }}}2
|
||||
|
||||
function! s:GetOcamlcMakeprg() " {{{2
|
||||
if g:syntastic_ocaml_use_janestreet_core
|
||||
let build_cmd = 'ocamlc -I '
|
||||
let build_cmd .= syntastic#util#shexpand(g:syntastic_ocaml_janestreet_core_dir)
|
||||
let build_cmd .= ' -c ' . syntastic#util#shexpand('%')
|
||||
return build_cmd
|
||||
else
|
||||
return 'ocamlc -c ' . syntastic#util#shexpand('%')
|
||||
endif
|
||||
let build_cmd = g:syntastic_ocaml_use_janestreet_core ?
|
||||
\ 'ocamlc -I ' . syntastic#util#shexpand(g:syntastic_ocaml_janestreet_core_dir) : 'ocamlc'
|
||||
let build_cmd .= ' -c ' . syntastic#util#shexpand('%')
|
||||
return build_cmd
|
||||
endfunction " }}}2
|
||||
|
||||
function! s:GetOcamlBuildMakeprg() " {{{2
|
||||
return 'ocamlbuild -quiet -no-log -tag annot,' . s:ocamlpp . ' -no-links -no-hygiene -no-sanitize ' .
|
||||
\ syntastic#util#shexpand('%:r') . '.cmi'
|
||||
\ syntastic#util#shexpand('%:r') . '.cmi'
|
||||
endfunction " }}}2
|
||||
|
||||
function! s:GetOtherMakeprg() " {{{2
|
||||
|
@ -39,7 +39,7 @@ endif
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_perl_perl_IsAvailable() dict
|
||||
function! SyntaxCheckers_perl_perl_IsAvailable() dict " {{{1
|
||||
if !exists('g:syntastic_perl_perl_exec') && exists('g:syntastic_perl_interpreter')
|
||||
let g:syntastic_perl_perl_exec = g:syntastic_perl_interpreter
|
||||
endif
|
||||
@ -48,9 +48,9 @@ function! SyntaxCheckers_perl_perl_IsAvailable() dict
|
||||
" let g:syntastic_perl_interpreter='/usr/bin/env perl'
|
||||
silent! call syntastic#util#system(self.getExecEscaped() . ' -e ' . syntastic#util#shescape('exit(0)'))
|
||||
return v:shell_error == 0
|
||||
endfunction
|
||||
endfunction " }}}1
|
||||
|
||||
function! SyntaxCheckers_perl_perl_GetLocList() dict
|
||||
function! SyntaxCheckers_perl_perl_GetLocList() dict " {{{1
|
||||
if type(g:syntastic_perl_lib_path) == type('')
|
||||
call syntastic#log#oneTimeWarn('variable g:syntastic_perl_lib_path should be a list')
|
||||
let includes = split(g:syntastic_perl_lib_path, ',')
|
||||
@ -81,7 +81,7 @@ function! SyntaxCheckers_perl_perl_GetLocList() dict
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'preprocess': 'perl',
|
||||
\ 'defaults': {'type': 'W'} })
|
||||
endfunction
|
||||
endfunction " }}}1
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'perl',
|
||||
|
@ -19,7 +19,7 @@ set cpo&vim
|
||||
|
||||
let s:pylint_new = -1
|
||||
|
||||
function! SyntaxCheckers_python_pylint_IsAvailable() dict
|
||||
function! SyntaxCheckers_python_pylint_IsAvailable() dict " {{{1
|
||||
if !executable(self.getExec())
|
||||
return 0
|
||||
endif
|
||||
@ -45,9 +45,9 @@ function! SyntaxCheckers_python_pylint_IsAvailable() dict
|
||||
endtry
|
||||
|
||||
return s:pylint_new >= 0
|
||||
endfunction
|
||||
endfunction " }}}1
|
||||
|
||||
function! SyntaxCheckers_python_pylint_GetLocList() dict
|
||||
function! SyntaxCheckers_python_pylint_GetLocList() dict " {{{1
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args_after': (s:pylint_new ?
|
||||
\ '-f text --msg-template="{path}:{line}:{column}:{C}: [{symbol}] {msg}" -r n' :
|
||||
@ -86,7 +86,7 @@ function! SyntaxCheckers_python_pylint_GetLocList() dict
|
||||
endfor
|
||||
|
||||
return loclist
|
||||
endfunction
|
||||
endfunction " }}}1
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'python',
|
||||
|
Loading…
Reference in New Issue
Block a user