Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Commit eb2b9cf

Browse files
committed
Cleanup.
1 parent b940830 commit eb2b9cf

6 files changed

Lines changed: 27 additions & 37 deletions

File tree

plugin/syntastic.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if has('reltime')
1919
lockvar! g:_SYNTASTIC_START
2020
endif
2121

22-
let g:_SYNTASTIC_VERSION = '3.7.0-127'
22+
let g:_SYNTASTIC_VERSION = '3.7.0-128'
2323
lockvar g:_SYNTASTIC_VERSION
2424

2525
" Sanity checks {{{1

syntax_checkers/haskell/ghc-mod.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ let s:ghc_mod_new = -1
2020
let s:save_cpo = &cpo
2121
set cpo&vim
2222

23-
function! SyntaxCheckers_haskell_ghc_mod_IsAvailable() dict
23+
function! SyntaxCheckers_haskell_ghc_mod_IsAvailable() dict " {{{1
2424
if !executable(self.getExec())
2525
return 0
2626
endif
@@ -59,9 +59,9 @@ function! SyntaxCheckers_haskell_ghc_mod_IsAvailable() dict
5959
let s:ghc_mod_bailout = syntastic#util#versionIsAtLeast(parsed_ver, [5, 4])
6060

6161
return (s:ghc_mod_new >= 0) && (v:version >= 704 || s:ghc_mod_new) && !s:ghc_mod_bailout
62-
endfunction
62+
endfunction " }}}1
6363

64-
function! SyntaxCheckers_haskell_ghc_mod_GetLocList() dict
64+
function! SyntaxCheckers_haskell_ghc_mod_GetLocList() dict " {{{1
6565
let makeprg = self.makeprgBuild({
6666
\ 'exe': self.getExecEscaped() . ' check' . (s:ghc_mod_new ? ' --boundary=""' : '') })
6767

@@ -81,7 +81,7 @@ function! SyntaxCheckers_haskell_ghc_mod_GetLocList() dict
8181
\ 'preprocess': 'iconv',
8282
\ 'postprocess': ['compressWhitespace'],
8383
\ 'returns': [0] })
84-
endfunction
84+
endfunction " }}}1
8585

8686
call g:SyntasticRegistry.CreateAndRegisterChecker({
8787
\ 'filetype': 'haskell',

syntax_checkers/javascript/jsxhint.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ let g:loaded_syntastic_javascript_jsxhint_checker = 1
1717
let s:save_cpo = &cpo
1818
set cpo&vim
1919

20-
function! SyntaxCheckers_javascript_jsxhint_IsAvailable() dict
20+
function! SyntaxCheckers_javascript_jsxhint_IsAvailable() dict " {{{1
2121
if !executable(self.getExec())
2222
return 0
2323
endif
@@ -32,9 +32,9 @@ function! SyntaxCheckers_javascript_jsxhint_IsAvailable() dict
3232
endif
3333

3434
return syntastic#util#versionIsAtLeast(parsed_ver, [0, 4, 1])
35-
endfunction
35+
endfunction " }}}1
3636

37-
function! SyntaxCheckers_javascript_jsxhint_GetLocList() dict
37+
function! SyntaxCheckers_javascript_jsxhint_GetLocList() dict " {{{1
3838
let makeprg = self.makeprgBuild({
3939
\ 'args_after': '--verbose' })
4040

@@ -44,7 +44,7 @@ function! SyntaxCheckers_javascript_jsxhint_GetLocList() dict
4444
\ 'makeprg': makeprg,
4545
\ 'errorformat': errorformat,
4646
\ 'defaults': {'bufnr': bufnr('')} })
47-
endfunction
47+
endfunction " }}}1
4848

4949
call g:SyntasticRegistry.CreateAndRegisterChecker({
5050
\ 'filetype': 'javascript',

syntax_checkers/ocaml/camlp4o.vim

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ set cpo&vim
2020

2121
" Checker options {{{1
2222

23-
let s:ocamlpp = get(g:, 'syntastic_ocaml_camlp4r', 0) ? 'camlp4r' : 'camlp4o'
24-
2523
if !exists('g:syntastic_ocaml_use_ocamlc') || !executable('ocamlc')
2624
let g:syntastic_ocaml_use_ocamlc = 0
2725
endif
@@ -41,6 +39,7 @@ endif
4139
" }}}1
4240

4341
function! SyntaxCheckers_ocaml_camlp4o_IsAvailable() dict " {{{1
42+
let s:ocamlpp = get(g:, 'syntastic_ocaml_camlp4r', 0) ? 'camlp4r' : 'camlp4o'
4443
return executable(s:ocamlpp)
4544
endfunction " }}}1
4645

@@ -81,31 +80,22 @@ endfunction " }}}1
8180
" Utilities {{{1
8281

8382
function! s:GetMakeprg() " {{{2
84-
if g:syntastic_ocaml_use_ocamlc
85-
return s:GetOcamlcMakeprg()
86-
endif
87-
88-
if g:syntastic_ocaml_use_ocamlbuild && isdirectory('_build')
89-
return s:GetOcamlBuildMakeprg()
90-
endif
91-
92-
return s:GetOtherMakeprg()
83+
return
84+
\ g:syntastic_ocaml_use_ocamlc ? g:syntastic_ocaml_use_ocamlc :
85+
\ (g:syntastic_ocaml_use_ocamlbuild && isdirectory('_build')) ? s:GetOcamlcMakeprg() :
86+
\ s:GetOtherMakeprg()
9387
endfunction " }}}2
9488

9589
function! s:GetOcamlcMakeprg() " {{{2
96-
if g:syntastic_ocaml_use_janestreet_core
97-
let build_cmd = 'ocamlc -I '
98-
let build_cmd .= syntastic#util#shexpand(g:syntastic_ocaml_janestreet_core_dir)
99-
let build_cmd .= ' -c ' . syntastic#util#shexpand('%')
100-
return build_cmd
101-
else
102-
return 'ocamlc -c ' . syntastic#util#shexpand('%')
103-
endif
90+
let build_cmd = g:syntastic_ocaml_use_janestreet_core ?
91+
\ 'ocamlc -I ' . syntastic#util#shexpand(g:syntastic_ocaml_janestreet_core_dir) : 'ocamlc'
92+
let build_cmd .= ' -c ' . syntastic#util#shexpand('%')
93+
return build_cmd
10494
endfunction " }}}2
10595

10696
function! s:GetOcamlBuildMakeprg() " {{{2
10797
return 'ocamlbuild -quiet -no-log -tag annot,' . s:ocamlpp . ' -no-links -no-hygiene -no-sanitize ' .
108-
\ syntastic#util#shexpand('%:r') . '.cmi'
98+
\ syntastic#util#shexpand('%:r') . '.cmi'
10999
endfunction " }}}2
110100

111101
function! s:GetOtherMakeprg() " {{{2

syntax_checkers/perl/perl.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ endif
3939
let s:save_cpo = &cpo
4040
set cpo&vim
4141

42-
function! SyntaxCheckers_perl_perl_IsAvailable() dict
42+
function! SyntaxCheckers_perl_perl_IsAvailable() dict " {{{1
4343
if !exists('g:syntastic_perl_perl_exec') && exists('g:syntastic_perl_interpreter')
4444
let g:syntastic_perl_perl_exec = g:syntastic_perl_interpreter
4545
endif
@@ -48,9 +48,9 @@ function! SyntaxCheckers_perl_perl_IsAvailable() dict
4848
" let g:syntastic_perl_interpreter='/usr/bin/env perl'
4949
silent! call syntastic#util#system(self.getExecEscaped() . ' -e ' . syntastic#util#shescape('exit(0)'))
5050
return v:shell_error == 0
51-
endfunction
51+
endfunction " }}}1
5252

53-
function! SyntaxCheckers_perl_perl_GetLocList() dict
53+
function! SyntaxCheckers_perl_perl_GetLocList() dict " {{{1
5454
if type(g:syntastic_perl_lib_path) == type('')
5555
call syntastic#log#oneTimeWarn('variable g:syntastic_perl_lib_path should be a list')
5656
let includes = split(g:syntastic_perl_lib_path, ',')
@@ -81,7 +81,7 @@ function! SyntaxCheckers_perl_perl_GetLocList() dict
8181
\ 'errorformat': errorformat,
8282
\ 'preprocess': 'perl',
8383
\ 'defaults': {'type': 'W'} })
84-
endfunction
84+
endfunction " }}}1
8585

8686
call g:SyntasticRegistry.CreateAndRegisterChecker({
8787
\ 'filetype': 'perl',

syntax_checkers/python/pylint.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ set cpo&vim
1919

2020
let s:pylint_new = -1
2121

22-
function! SyntaxCheckers_python_pylint_IsAvailable() dict
22+
function! SyntaxCheckers_python_pylint_IsAvailable() dict " {{{1
2323
if !executable(self.getExec())
2424
return 0
2525
endif
@@ -45,9 +45,9 @@ function! SyntaxCheckers_python_pylint_IsAvailable() dict
4545
endtry
4646

4747
return s:pylint_new >= 0
48-
endfunction
48+
endfunction " }}}1
4949

50-
function! SyntaxCheckers_python_pylint_GetLocList() dict
50+
function! SyntaxCheckers_python_pylint_GetLocList() dict " {{{1
5151
let makeprg = self.makeprgBuild({
5252
\ 'args_after': (s:pylint_new ?
5353
\ '-f text --msg-template="{path}:{line}:{column}:{C}: [{symbol}] {msg}" -r n' :
@@ -86,7 +86,7 @@ function! SyntaxCheckers_python_pylint_GetLocList() dict
8686
endfor
8787

8888
return loclist
89-
endfunction
89+
endfunction " }}}1
9090

9191
call g:SyntasticRegistry.CreateAndRegisterChecker({
9292
\ 'filetype': 'python',

0 commit comments

Comments
 (0)