mirror of
https://github.com/amix/vimrc
synced 2025-06-24 07:44:59 +08:00
Updated plugins. Removed the tabstop merge that 010c2940ce
introduced
This commit is contained in:
@ -18,15 +18,30 @@ let g:loaded_syntastic_bro_bro_checker = 1
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_bro_bro_GetHighlightRegex(item)
|
||||
let term = matchstr(a:item['text'], '\m at or near "\zs[^"]\+\ze"')
|
||||
return term != '' ? '\V\<' . escape(term, '\') . '\>' : ''
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_bro_bro_IsAvailable() dict
|
||||
return system(self.getExecEscaped() . ' --help') =~# '--parse-only'
|
||||
if !executable(self.getExec())
|
||||
return 0
|
||||
endif
|
||||
|
||||
if system(self.getExecEscaped() . ' --help') !~# '--parse-only'
|
||||
call self.log('unknown option "--parse-only"')
|
||||
return 0
|
||||
endif
|
||||
|
||||
return 1
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_bro_bro_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args_before': '--parse-only' })
|
||||
|
||||
"example: error in ./foo.bro, line 3: unknown identifier banana, at or "near "banana"
|
||||
"example: error in ./foo.bro, line 3: unknown identifier banana, at or near "banana"
|
||||
let errorformat =
|
||||
\ 'fatal %trror in %f\, line %l: %m,' .
|
||||
\ '%trror in %f\, line %l: %m,' .
|
||||
\ '%tarning in %f\, line %l: %m'
|
||||
|
||||
|
@ -18,18 +18,20 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_c_checkpatch_IsAvailable() dict
|
||||
call syntastic#log#deprecationWarn('c_checker_checkpatch_location', 'c_checkpatch_exe')
|
||||
call syntastic#log#deprecationWarn('c_checker_checkpatch_location', 'c_checkpatch_exec')
|
||||
|
||||
if !exists('g:syntastic_c_checkpatch_exe') && !executable(self.getExec())
|
||||
if !exists('g:syntastic_c_checkpatch_exec') && !executable(self.getExec())
|
||||
if executable('checkpatch')
|
||||
let g:syntastic_c_checkpatch_exe = 'checkpatch'
|
||||
let g:syntastic_c_checkpatch_exec = 'checkpatch'
|
||||
elseif executable('./scripts/checkpatch.pl')
|
||||
let g:syntastic_c_checkpatch_exe = fnamemodify('./scripts/checkpatch.pl', ':p')
|
||||
let g:syntastic_c_checkpatch_exec = fnamemodify('./scripts/checkpatch.pl', ':p')
|
||||
elseif executable('./scripts/checkpatch')
|
||||
let g:syntastic_c_checkpatch_exe = fnamemodify('./scripts/checkpatch', ':p')
|
||||
let g:syntastic_c_checkpatch_exec = fnamemodify('./scripts/checkpatch', ':p')
|
||||
endif
|
||||
endif
|
||||
|
||||
call self.log('exec =', self.getExec())
|
||||
|
||||
return executable(self.getExec())
|
||||
endfunction
|
||||
|
||||
|
@ -21,10 +21,6 @@ endif
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_c_clang_check_IsAvailable() dict
|
||||
return executable(self.getExec())
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_c_clang_check_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'post_args':
|
||||
|
@ -21,10 +21,6 @@ endif
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_c_clang_tidy_IsAvailable() dict
|
||||
return executable(self.getExec())
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_c_clang_tidy_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'post_args':
|
||||
|
@ -26,6 +26,7 @@ function! SyntaxCheckers_c_gcc_IsAvailable() dict
|
||||
if !exists('g:syntastic_c_compiler')
|
||||
let g:syntastic_c_compiler = executable(self.getExec()) ? self.getExec() : 'clang'
|
||||
endif
|
||||
call self.log('g:syntastic_c_compiler =', g:syntastic_c_compiler)
|
||||
return executable(expand(g:syntastic_c_compiler))
|
||||
endfunction
|
||||
|
||||
|
@ -24,6 +24,7 @@ endif
|
||||
|
||||
function! SyntaxCheckers_c_pc_lint_GetLocList() dict
|
||||
let config = findfile(g:syntastic_pc_lint_config_file, '.;')
|
||||
call self.log('config =', config)
|
||||
|
||||
" -hFs1 - show filename, add space after messages, try to make message 1 line
|
||||
" -width(0,0) - make sure there are no line breaks
|
||||
|
@ -19,7 +19,7 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_co_coco_GetLocList() dict
|
||||
let tmpdir = $TMPDIR != '' ? $TMPDIR : $TMP != '' ? $TMP : '/tmp'
|
||||
let tmpdir = syntastic#util#tmpdir()
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '-c -o ' . tmpdir })
|
||||
|
||||
let errorformat =
|
||||
@ -28,9 +28,13 @@ function! SyntaxCheckers_co_coco_GetLocList() dict
|
||||
\ '%EFailed at: %f,'.
|
||||
\ '%Z%trror: Parse error on line %l: %m'
|
||||
|
||||
return SyntasticMake({
|
||||
let loclist = SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat })
|
||||
|
||||
call syntastic#util#rmrf(tmpdir)
|
||||
|
||||
return loclist
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
|
@ -27,6 +27,7 @@ function! SyntaxCheckers_cobol_cobc_IsAvailable() dict
|
||||
if !exists('g:syntastic_cobol_compiler')
|
||||
let g:syntastic_cobol_compiler = self.getExec()
|
||||
endif
|
||||
call self.log('g:syntastic_cobol_compiler =', g:syntastic_cobol_compiler)
|
||||
return executable(expand(g:syntastic_cobol_compiler))
|
||||
endfunction
|
||||
|
||||
|
@ -22,9 +22,14 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_coffee_coffee_IsAvailable() dict
|
||||
return executable(self.getExec()) &&
|
||||
\ syntastic#util#versionIsAtLeast(syntastic#util#getVersion(
|
||||
\ self.getExecEscaped() . ' --version 2>' . syntastic#util#DevNull()), [1,6,2])
|
||||
if !executable(self.getExec())
|
||||
return 0
|
||||
endif
|
||||
|
||||
let ver = syntastic#util#getVersion(self.getExecEscaped() . ' --version 2>' . syntastic#util#DevNull())
|
||||
call self.log(self.getExec() . ' version = ', ver)
|
||||
|
||||
return syntastic#util#versionIsAtLeast(ver, [1, 6, 2])
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_coffee_coffee_GetLocList() dict
|
||||
|
@ -20,8 +20,9 @@ set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_coffee_coffeelint_GetLocList() dict
|
||||
if !exists('s:coffeelint_new')
|
||||
let s:coffeelint_new = syntastic#util#versionIsAtLeast(syntastic#util#getVersion(
|
||||
\ self.getExecEscaped() . ' --version'), [1, 4])
|
||||
let ver = syntastic#util#getVersion(self.getExecEscaped() . ' --version')
|
||||
call self.log(self.getExec() . ' version =', ver)
|
||||
let s:coffeelint_new = syntastic#util#versionIsAtLeast(ver, [1, 4])
|
||||
endif
|
||||
let makeprg = self.makeprgBuild({ 'args_after': (s:coffeelint_new ? '--reporter csv' : '--csv') })
|
||||
|
||||
|
@ -26,6 +26,7 @@ function! SyntaxCheckers_cpp_gcc_IsAvailable() dict
|
||||
if !exists('g:syntastic_cpp_compiler')
|
||||
let g:syntastic_cpp_compiler = executable(self.getExec()) ? self.getExec() : 'clang++'
|
||||
endif
|
||||
call self.log('g:syntastic_cpp_compiler =', g:syntastic_cpp_compiler)
|
||||
return executable(expand(g:syntastic_cpp_compiler))
|
||||
endfunction
|
||||
|
||||
|
@ -31,6 +31,7 @@ function! SyntaxCheckers_d_dmd_IsAvailable() dict
|
||||
if !exists('g:syntastic_d_compiler')
|
||||
let g:syntastic_d_compiler = self.getExec()
|
||||
endif
|
||||
call self.log('g:syntastic_d_compiler =', g:syntastic_d_compiler)
|
||||
return executable(expand(g:syntastic_d_compiler))
|
||||
endfunction
|
||||
|
||||
|
55
sources_non_forked/syntastic/syntax_checkers/docbk/igor.vim
Normal file
55
sources_non_forked/syntastic/syntax_checkers/docbk/igor.vim
Normal file
@ -0,0 +1,55 @@
|
||||
"============================================================================
|
||||
"File: igor.vim
|
||||
"Description: Syntax checking plugin for syntastic.vim
|
||||
"Maintainer: LCD 47 <lcd047 at gmail dot com>
|
||||
"License: This program is free software. It comes without any warranty,
|
||||
" to the extent permitted by applicable law. You can redistribute
|
||||
" it and/or modify it under the terms of the Do What The Fuck You
|
||||
" Want To Public License, Version 2, as published by Sam Hocevar.
|
||||
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
if exists('g:loaded_syntastic_docbk_igor_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_docbk_igor_checker = 1
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_docbk_igor_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({})
|
||||
|
||||
let errorformat = '%f:%l:%m'
|
||||
|
||||
let loclist = SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'defaults': { 'type': 'W' },
|
||||
\ 'subtype': 'Style',
|
||||
\ 'returns': [0] })
|
||||
|
||||
let buf = bufnr('')
|
||||
for e in loclist
|
||||
" XXX: igor strips directories from filenames
|
||||
let e['bufnr'] = buf
|
||||
|
||||
let e['hl'] = '\V' . escape( substitute(e['text'], '\m[^:]*:', '', ''), '\' )
|
||||
let e['hl'] = substitute(e['hl'], '\V[', '\\zs', 'g')
|
||||
let e['hl'] = substitute(e['hl'], '\V]', '\\ze', 'g')
|
||||
|
||||
" let e['text'] = substitute(e['text'], '\m:.*$', '', '')
|
||||
endfor
|
||||
|
||||
return loclist
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'docbk',
|
||||
\ 'name': 'igor'})
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
@ -20,6 +20,9 @@ set cpo&vim
|
||||
|
||||
" TODO: we should probably split this into separate checkers
|
||||
function! SyntaxCheckers_elixir_elixir_IsAvailable() dict
|
||||
call self.log(g:SyntasticDebugCheckers,
|
||||
\ 'executable("elixir") = ' . executable('elixir') . ', ' .
|
||||
\ 'executable("mix") = ' . executable('mix'))
|
||||
return executable('elixir') && executable('mix')
|
||||
endfunction
|
||||
|
||||
|
@ -21,6 +21,7 @@ set cpo&vim
|
||||
function! SyntaxCheckers_eruby_ruby_IsAvailable() dict
|
||||
if !exists('g:syntastic_eruby_ruby_exec') && exists('g:syntastic_ruby_exec')
|
||||
let g:syntastic_eruby_ruby_exec = g:syntastic_ruby_exec
|
||||
call self.log('g:syntastic_eruby_ruby_exec =', g:syntastic_eruby_ruby_exec)
|
||||
endif
|
||||
return executable(self.getExec())
|
||||
endfunction
|
||||
|
@ -26,6 +26,7 @@ function! SyntaxCheckers_fortran_gfortran_IsAvailable() dict
|
||||
if !exists('g:syntastic_fortran_compiler')
|
||||
let g:syntastic_fortran_compiler = self.getExec()
|
||||
endif
|
||||
call self.log('g:syntastic_fortran_compiler = ', g:syntastic_fortran_compiler)
|
||||
return executable(expand(g:syntastic_fortran_compiler))
|
||||
endfunction
|
||||
|
||||
|
@ -21,7 +21,9 @@ set cpo&vim
|
||||
function! SyntaxCheckers_go_golint_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({})
|
||||
|
||||
let errorformat = '%f:%l:%c: %m,%-G%.%#'
|
||||
let errorformat =
|
||||
\ '%f:%l:%c: %m,' .
|
||||
\ '%-G%.%#'
|
||||
|
||||
return SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
|
@ -29,13 +29,11 @@ function! SyntaxCheckers_go_gotype_GetLocList() dict
|
||||
" the package for the same reasons specified in go.vim ("figuring out
|
||||
" the import path is fickle").
|
||||
|
||||
let errors = SyntasticMake({
|
||||
return SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'cwd': expand('%:p:h'),
|
||||
\ 'defaults': {'type': 'e'} })
|
||||
|
||||
return errors
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
|
@ -24,19 +24,21 @@ endfunction
|
||||
|
||||
function! SyntaxCheckers_go_govet_GetLocList() dict
|
||||
let makeprg = 'go vet'
|
||||
let errorformat = '%Evet: %.%\+: %f:%l:%c: %m,%W%f:%l: %m,%-G%.%#'
|
||||
|
||||
let errorformat =
|
||||
\ '%Evet: %.%\+: %f:%l:%c: %m,' .
|
||||
\ '%W%f:%l: %m,' .
|
||||
\ '%-G%.%#'
|
||||
|
||||
" The go compiler needs to either be run with an import path as an
|
||||
" argument or directly from the package directory. Since figuring out
|
||||
" the proper import path is fickle, just cwd to the package.
|
||||
|
||||
let errors = SyntasticMake({
|
||||
return SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'cwd': expand('%:p:h'),
|
||||
\ 'defaults': {'type': 'w'} })
|
||||
|
||||
return errors
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
|
@ -21,10 +21,33 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_haskell_ghc_mod_IsAvailable() dict
|
||||
" We need either a Vim version that can handle NULs in system() output,
|
||||
" or a ghc-mod version that has the --boundary option.
|
||||
let exe = self.getExec()
|
||||
let s:ghc_mod_new = executable(exe) ? s:GhcModNew(exe) : -1
|
||||
if !executable(self.getExec())
|
||||
return 0
|
||||
endif
|
||||
|
||||
" ghc-mod 5.0.0 and later needs the "version" command to print the
|
||||
" version. But the "version" command appeared in 4.1.0. Thus, we need to
|
||||
" know the version in order to know how to find out the version. :)
|
||||
|
||||
" Try "ghc-mod version".
|
||||
let ver = filter(split(system(self.getExecEscaped() . ' version'), '\n'), 'v:val =~# ''\m^ghc-mod version''')
|
||||
if !len(ver)
|
||||
" That didn't work. Try "ghc-mod" alone.
|
||||
let ver = filter(split(system(self.getExecEscaped()), '\n'), 'v:val =~# ''\m^ghc-mod version''')
|
||||
endif
|
||||
|
||||
if len(ver)
|
||||
" Encouraged by the great success in finding out the version, now we
|
||||
" need either a Vim that can handle NULs in system() output, or a
|
||||
" ghc-mod that has the "--boundary" option.
|
||||
let parsed_ver = syntastic#util#parseVersion(ver[0])
|
||||
call self.log(self.getExec() . ' version =', parsed_ver)
|
||||
let s:ghc_mod_new = syntastic#util#versionIsAtLeast(parsed_ver, [2, 1, 2])
|
||||
else
|
||||
call syntastic#log#error("checker haskell/ghc_mod: can't parse version string (abnormal termination?)")
|
||||
let s:ghc_mod_new = -1
|
||||
endif
|
||||
|
||||
return (s:ghc_mod_new >= 0) && (v:version >= 704 || s:ghc_mod_new)
|
||||
endfunction
|
||||
|
||||
@ -49,18 +72,6 @@ function! SyntaxCheckers_haskell_ghc_mod_GetLocList() dict
|
||||
\ 'returns': [0] })
|
||||
endfunction
|
||||
|
||||
function! s:GhcModNew(exe)
|
||||
let exe = syntastic#util#shescape(a:exe)
|
||||
try
|
||||
let ghc_mod_version = filter(split(system(exe), '\n'), 'v:val =~# ''\m^ghc-mod version''')[0]
|
||||
let ret = syntastic#util#versionIsAtLeast(syntastic#util#parseVersion(ghc_mod_version), [2, 1, 2])
|
||||
catch /\m^Vim\%((\a\+)\)\=:E684/
|
||||
call syntastic#log#error("checker haskell/ghc_mod: can't parse version string (abnormal termination?)")
|
||||
let ret = -1
|
||||
endtry
|
||||
return ret
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'haskell',
|
||||
\ 'name': 'ghc_mod',
|
||||
|
@ -28,6 +28,8 @@ function! SyntaxCheckers_haxe_haxe_GetLocList() dict
|
||||
endif
|
||||
let hxml = fnamemodify(hxml, ':p')
|
||||
|
||||
call self.log('hxml =', hxml)
|
||||
|
||||
if hxml != ''
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'fname': syntastic#util#shescape(fnamemodify(hxml, ':t')) })
|
||||
|
@ -19,8 +19,14 @@ set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_html_jshint_IsAvailable() dict
|
||||
call syntastic#log#deprecationWarn('jshint_exec', 'html_jshint_exec')
|
||||
return executable(self.getExec()) &&
|
||||
\ syntastic#util#versionIsAtLeast(syntastic#util#getVersion(self.getExecEscaped() . ' --version'), [2,4])
|
||||
if !executable(self.getExec())
|
||||
return 0
|
||||
endif
|
||||
|
||||
let ver = syntastic#util#getVersion(self.getExecEscaped() . ' --version')
|
||||
call self.log(self.getExec() . ' version =', ver)
|
||||
|
||||
return syntastic#util#versionIsAtLeast(ver, [2, 4])
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_html_jshint_GetLocList() dict
|
||||
|
@ -164,8 +164,8 @@ let s:empty_tags = [
|
||||
lockvar! s:empty_tags
|
||||
|
||||
function! s:IgnoreError(text)
|
||||
for i in s:ignore_errors + g:syntastic_html_tidy_ignore_errors
|
||||
if stridx(a:text, i) != -1
|
||||
for item in s:ignore_errors + g:syntastic_html_tidy_ignore_errors
|
||||
if stridx(a:text, item) != -1
|
||||
return 1
|
||||
endif
|
||||
endfor
|
||||
|
@ -28,10 +28,17 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_java_checkstyle_IsAvailable() dict
|
||||
return
|
||||
\ executable(self.getExec()) &&
|
||||
\ filereadable(expand(g:syntastic_java_checkstyle_classpath)) &&
|
||||
\ filereadable(expand(g:syntastic_java_checkstyle_conf_file))
|
||||
if !executable(self.getExec())
|
||||
return 0
|
||||
endif
|
||||
|
||||
let classpath = expand(g:syntastic_java_checkstyle_classpath)
|
||||
let conf_file = expand(g:syntastic_java_checkstyle_conf_file)
|
||||
call self.log(
|
||||
\ 'filereadable(' . string(classpath) . ') = ' . filereadable(classpath) . ', ' .
|
||||
\ 'filereadable(' . string(conf_file) . ') = ' . filereadable(conf_file))
|
||||
|
||||
return filereadable(classpath) && filereadable(conf_file)
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_java_checkstyle_GetLocList() dict
|
||||
|
@ -51,15 +51,7 @@ function! s:CygwinPath(path)
|
||||
endfunction
|
||||
|
||||
if !exists('g:syntastic_java_javac_temp_dir')
|
||||
if has('win32') || has('win64')
|
||||
let g:syntastic_java_javac_temp_dir = $TEMP . syntastic#util#Slash() . 'vim-syntastic-javac'
|
||||
elseif has('win32unix')
|
||||
let g:syntastic_java_javac_temp_dir = s:CygwinPath('/tmp/vim-syntastic-javac')
|
||||
elseif $TMPDIR != ''
|
||||
let g:syntastic_java_javac_temp_dir = $TMPDIR . '/vim-syntastic-javac'
|
||||
else
|
||||
let g:syntastic_java_javac_temp_dir = '/tmp/vim-syntastic-javac'
|
||||
endif
|
||||
let g:syntastic_java_javac_temp_dir = syntastic#util#tmpdir()
|
||||
endif
|
||||
|
||||
if !exists('g:syntastic_java_javac_autoload_maven_classpath')
|
||||
@ -90,18 +82,6 @@ function! s:RemoveCarriageReturn(line)
|
||||
return substitute(a:line, "\r", '', 'g')
|
||||
endfunction
|
||||
|
||||
" recursively remove directory and all it's sub-directories
|
||||
function! s:RemoveDir(dir)
|
||||
if isdirectory(a:dir)
|
||||
for f in split(globpath(a:dir, '*'), "\n")
|
||||
call s:RemoveDir(f)
|
||||
endfor
|
||||
silent! call system('rmdir ' . syntastic#util#shescape(a:dir))
|
||||
else
|
||||
silent! call delete(a:dir)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:ClassSep()
|
||||
return (syntastic#util#isRunningWindows() || has('win32unix')) ? ';' : ':'
|
||||
endfunction
|
||||
@ -419,7 +399,7 @@ function! SyntaxCheckers_java_javac_GetLocList() dict
|
||||
\ 'postprocess': ['cygwinRemoveCR'] })
|
||||
|
||||
if g:syntastic_java_javac_delete_output
|
||||
call s:RemoveDir(output_dir)
|
||||
call syntastic#util#rmrf(output_dir)
|
||||
endif
|
||||
return errors
|
||||
|
||||
|
@ -20,25 +20,33 @@ set cpo&vim
|
||||
function! SyntaxCheckers_javascript_closurecompiler_IsAvailable() dict
|
||||
call syntastic#log#deprecationWarn('javascript_closure_compiler_path', 'javascript_closurecompiler_path')
|
||||
|
||||
return
|
||||
\ executable("java") &&
|
||||
\ exists("g:syntastic_javascript_closurecompiler_path") &&
|
||||
\ filereadable(g:syntastic_javascript_closurecompiler_path)
|
||||
if !executable(self.getExec())
|
||||
return 0
|
||||
endif
|
||||
|
||||
let cp = get(g:, 'syntastic_javascript_closurecompiler_path', '')
|
||||
call self.log('g:syntastic_javascript_closurecompiler_path =', cp)
|
||||
|
||||
let jar = expand(cp)
|
||||
call self.log('filereadable(' . string(jar) . ') = ' . filereadable(jar))
|
||||
|
||||
return filereadable(jar)
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_javascript_closurecompiler_GetLocList() dict
|
||||
call syntastic#log#deprecationWarn('javascript_closure_compiler_options', 'javascript_closurecompiler_args')
|
||||
call syntastic#log#deprecationWarn('javascript_closure_compiler_file_list', 'javascript_closurecompiler_file_list')
|
||||
|
||||
if exists("g:syntastic_javascript_closurecompiler_file_list")
|
||||
let file_list = join(readfile(g:syntastic_javascript_closurecompiler_file_list))
|
||||
let flist = expand(get(g:, 'syntastic_javascript_closurecompiler_file_list', ''))
|
||||
if filereadable(flist)
|
||||
let file_list = map( readfile(flist), 'expand(v:var)' )
|
||||
else
|
||||
let file_list = syntastic#util#shexpand('%')
|
||||
let file_list = [expand('%')]
|
||||
endif
|
||||
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe_after': '-jar ' . g:syntastic_javascript_closurecompiler_path,
|
||||
\ 'args_after': '--js' ,
|
||||
\ 'exe_after': ['-jar', expand(g:syntastic_javascript_closurecompiler_path)],
|
||||
\ 'args_after': '--js',
|
||||
\ 'fname': file_list })
|
||||
|
||||
let errorformat =
|
||||
|
@ -18,9 +18,14 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_javascript_eslint_IsAvailable() dict
|
||||
return
|
||||
\ executable(self.getExec()) &&
|
||||
\ syntastic#util#versionIsAtLeast(syntastic#util#getVersion(self.getExecEscaped() . ' --version'), [0, 1])
|
||||
if !executable(self.getExec())
|
||||
return 0
|
||||
endif
|
||||
|
||||
let ver = syntastic#util#getVersion(self.getExecEscaped() . ' --version')
|
||||
call self.log(self.getExec() . ' version =', ver)
|
||||
|
||||
return syntastic#util#versionIsAtLeast(ver, [0, 1])
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_javascript_eslint_GetLocList() dict
|
||||
|
@ -22,7 +22,10 @@ function! SyntaxCheckers_javascript_jshint_IsAvailable() dict
|
||||
if !executable(self.getExec())
|
||||
return 0
|
||||
endif
|
||||
|
||||
let s:jshint_version = syntastic#util#getVersion(self.getExecEscaped() . ' --version')
|
||||
call self.log(self.getExec() . ' version =', s:jshint_version)
|
||||
|
||||
return syntastic#util#versionIsAtLeast(s:jshint_version, [1])
|
||||
endfunction
|
||||
|
||||
|
@ -19,10 +19,14 @@ set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_javascript_jsxhint_IsAvailable() dict
|
||||
let jsxhint_version = system(self.getExecEscaped() . ' --version')
|
||||
return
|
||||
\ v:shell_error == 0 &&
|
||||
\ jsxhint_version =~# '\m^JSXHint\>' &&
|
||||
\ syntastic#util#versionIsAtLeast(syntastic#util#parseVersion(jsxhint_version), [0, 4, 1])
|
||||
if v:shell_error || (jsxhint_version !~# '\m^JSXHint\>')
|
||||
return 0
|
||||
endif
|
||||
|
||||
let ver = syntastic#util#parseVersion(jsxhint_version)
|
||||
call self.log(self.getExec() . ' version =', ver)
|
||||
|
||||
return syntastic#util#versionIsAtLeast(ver, [0, 4, 1])
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_javascript_jsxhint_GetLocList() dict
|
||||
|
@ -36,6 +36,7 @@ set cpo&vim
|
||||
let s:node_file = 'node ' . syntastic#util#shescape(expand('<sfile>:p:h') . syntastic#util#Slash() . 'less-lint.js')
|
||||
|
||||
function! SyntaxCheckers_less_lessc_IsAvailable() dict
|
||||
call self.log('g:syntastic_less_use_less_lint =', g:syntastic_less_use_less_lint)
|
||||
return g:syntastic_less_use_less_lint ? executable('node') : executable(self.getExec())
|
||||
endfunction
|
||||
|
||||
|
@ -47,7 +47,7 @@ endfunction
|
||||
function! SyntaxCheckers_lua_luac_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '-p' })
|
||||
|
||||
let errorformat = 'luac: %#%f:%l: %m'
|
||||
let errorformat = 'luac: %#%f:%l: %m'
|
||||
|
||||
return SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
|
@ -0,0 +1,45 @@
|
||||
"============================================================================
|
||||
"File: mdl.vim
|
||||
"Description: Syntax checking plugin for syntastic.vim
|
||||
"Maintainer: Charles Beynon <etothepiipower at gmail dot com>
|
||||
"License: This program is free software. It comes without any warranty,
|
||||
" to the extent permitted by applicable law. You can redistribute
|
||||
" it and/or modify it under the terms of the Do What The Fuck You
|
||||
" Want To Public License, Version 2, as published by Sam Hocevar.
|
||||
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
if exists("g:loaded_syntastic_markdown_mdl_checker")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_markdown_mdl_checker = 1
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_markdown_mdl_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args': '--warnings' })
|
||||
|
||||
let errorformat =
|
||||
\ '%E%f:%l: %m,'.
|
||||
\ '%W%f: Kramdown Warning: %m found on line %l'
|
||||
|
||||
let loclist = SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'subtype': 'Style' })
|
||||
|
||||
call self.setWantSort(1)
|
||||
|
||||
return loclist
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'markdown',
|
||||
\ 'name': 'mdl'})
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
25
sources_non_forked/syntastic/syntax_checkers/nroff/igor.vim
Normal file
25
sources_non_forked/syntastic/syntax_checkers/nroff/igor.vim
Normal file
@ -0,0 +1,25 @@
|
||||
"============================================================================
|
||||
"File: igor.vim
|
||||
"Description: Syntax checking plugin for syntastic.vim
|
||||
"Maintainer: LCD 47 <lcd047 at gmail dot com>
|
||||
"License: This program is free software. It comes without any warranty,
|
||||
" to the extent permitted by applicable law. You can redistribute
|
||||
" it and/or modify it under the terms of the Do What The Fuck You
|
||||
" Want To Public License, Version 2, as published by Sam Hocevar.
|
||||
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
if exists('g:loaded_syntastic_nroff_igor_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_nroff_igor_checker = 1
|
||||
|
||||
runtime! syntax_checkers/docbk/*.vim
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'nroff',
|
||||
\ 'name': 'igor',
|
||||
\ 'redirect': 'docbk/igor'})
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
@ -26,6 +26,7 @@ function! SyntaxCheckers_objc_gcc_IsAvailable() dict
|
||||
if !exists('g:syntastic_objc_compiler')
|
||||
let g:syntastic_objc_compiler = executable(self.getExec()) ? self.getExec() : 'clang'
|
||||
endif
|
||||
call self.log('g:syntastic_objc_compiler =', g:syntastic_objc_compiler)
|
||||
return executable(expand(g:syntastic_objc_compiler))
|
||||
endfunction
|
||||
|
||||
|
@ -26,6 +26,7 @@ function! SyntaxCheckers_objcpp_gcc_IsAvailable() dict
|
||||
if !exists('g:syntastic_c_compiler')
|
||||
let g:syntastic_objcpp_compiler = executable(self.getExec()) ? self.getExec() : 'clang'
|
||||
endif
|
||||
call self.log('g:syntastic_objcpp_compiler =', g:syntastic_objcpp_compiler)
|
||||
return executable(expand(g:syntastic_objcpp_compiler))
|
||||
endfunction
|
||||
|
||||
|
@ -19,9 +19,12 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_puppet_puppet_GetLocList() dict
|
||||
let ver = syntastic#util#getVersion(self.getExecEscaped() . ' --version 2>' . syntastic#util#DevNull())
|
||||
if !exists('s:puppet_version')
|
||||
let s:puppet_version = syntastic#util#getVersion(self.getExecEscaped() . ' --version 2>' . syntastic#util#DevNull())
|
||||
call self.log(self.getExec() . ' version =', s:puppet_version)
|
||||
endif
|
||||
|
||||
if syntastic#util#versionIsAtLeast(ver, [2,7,0])
|
||||
if syntastic#util#versionIsAtLeast(s:puppet_version, [2,7,0])
|
||||
let args = 'parser validate --color=false'
|
||||
else
|
||||
let args = '--color=false --parseonly'
|
||||
|
@ -19,11 +19,16 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_puppet_puppetlint_IsAvailable() dict
|
||||
return
|
||||
\ executable("puppet") &&
|
||||
\ executable(self.getExec()) &&
|
||||
\ syntastic#util#versionIsAtLeast(syntastic#util#getVersion(
|
||||
\ self.getExecEscaped() . ' --version 2>' . syntastic#util#DevNull()), [0,1,10])
|
||||
call self.log("executable('puppet') = " . executable('puppet') . ', ' .
|
||||
\ "executable(" . string(self.getExec()) . ") = " . executable(self.getExec()))
|
||||
if !executable('puppet') || !executable(self.getExec())
|
||||
return 0
|
||||
endif
|
||||
|
||||
let ver = syntastic#util#getVersion(self.getExecEscaped() . ' --version 2>' . syntastic#util#DevNull())
|
||||
call self.log(self.getExec() . ' version =', ver)
|
||||
|
||||
return syntastic#util#versionIsAtLeast(ver, [0, 1, 10])
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_puppet_puppetlint_GetLocList() dict
|
||||
|
35
sources_non_forked/syntastic/syntax_checkers/python/mypy.vim
Normal file
35
sources_non_forked/syntastic/syntax_checkers/python/mypy.vim
Normal file
@ -0,0 +1,35 @@
|
||||
"============================================================================
|
||||
"File: mypy.vim
|
||||
"Description: Syntax checking plugin for syntastic.vim
|
||||
"Author: Russ Hewgill <Russ dot Hewgill at gmail dot com>
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
if exists("g:loaded_syntastic_python_mypy_checker")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_python_mypy_checker = 1
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_python_mypy_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({})
|
||||
|
||||
let errorformat = '%f\, line %l: %m'
|
||||
|
||||
return SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'defaults': { 'type': 'E' },
|
||||
\ 'returns': [0, 1] })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'python',
|
||||
\ 'name': 'mypy'})
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
@ -15,8 +15,9 @@ set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_python_pep257_GetLocList() dict
|
||||
if !exists('s:pep257_new')
|
||||
let s:pep257_new = syntastic#util#versionIsAtLeast(syntastic#util#getVersion(
|
||||
\ self.getExecEscaped() . ' --version'), [0, 3])
|
||||
let ver = syntastic#util#getVersion(self.getExecEscaped() . ' --version')
|
||||
call self.log(self.getExec() . ' version =', ver)
|
||||
let s:pep257_new = syntastic#util#versionIsAtLeast(ver, [0, 3])
|
||||
endif
|
||||
|
||||
let makeprg = self.makeprgBuild({})
|
||||
|
@ -16,14 +16,38 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_python_pylint_IsAvailable() dict
|
||||
let exe = self.getExec()
|
||||
let s:pylint_new = executable(exe) ? s:PylintNew(exe) : -1
|
||||
if !executable(self.getExec())
|
||||
return 0
|
||||
endif
|
||||
|
||||
try
|
||||
" On Windows the version is shown as "pylint-script.py 1.0.0".
|
||||
" On Gentoo Linux it's "pylint-python2.7 0.28.0".
|
||||
" On NixOS, that would be ".pylint-wrapped 0.26.0".
|
||||
" On Arch Linux it's "pylint2 1.1.0".
|
||||
" On new-ish Fedora it's "python3-pylint 1.2.0".
|
||||
" Have you guys considered switching to creative writing yet? ;)
|
||||
|
||||
let pylint_version = filter( split(system(self.getExecEscaped() . ' --version'), '\m, \=\|\n'),
|
||||
\ 'v:val =~# ''\m^\(python[-0-9]*-\|\.\)\=pylint[-0-9]*\>''' )[0]
|
||||
let ver = syntastic#util#parseVersion(substitute(pylint_version, '\v^\S+\s+', '', ''))
|
||||
|
||||
call self.log(self.getExec() . ' version =', ver)
|
||||
|
||||
let s:pylint_new = syntastic#util#versionIsAtLeast(ver, [1])
|
||||
catch /\m^Vim\%((\a\+)\)\=:E684/
|
||||
call syntastic#log#error("checker python/pylint: can't parse version string (abnormal termination?)")
|
||||
let s:pylint_new = -1
|
||||
endtry
|
||||
|
||||
return s:pylint_new >= 0
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_python_pylint_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args_after': (s:pylint_new ? '-f text --msg-template="{path}:{line}:{column}:{C}: [{symbol}] {msg}" -r n' : '-f parseable -r n -i y') })
|
||||
\ 'args_after': (s:pylint_new ?
|
||||
\ '-f text --msg-template="{path}:{line}:{column}:{C}: [{symbol}] {msg}" -r n' :
|
||||
\ '-f parseable -r n -i y') })
|
||||
|
||||
let errorformat =
|
||||
\ '%A%f:%l:%c:%t: %m,' .
|
||||
@ -62,26 +86,6 @@ function! SyntaxCheckers_python_pylint_GetLocList() dict
|
||||
return loclist
|
||||
endfunction
|
||||
|
||||
function! s:PylintNew(exe)
|
||||
let exe = syntastic#util#shescape(a:exe)
|
||||
try
|
||||
" On Windows the version is shown as "pylint-script.py 1.0.0".
|
||||
" On Gentoo Linux it's "pylint-python2.7 0.28.0".
|
||||
" On NixOS, that would be ".pylint-wrapped 0.26.0".
|
||||
" On Arch Linux it's "pylint2 1.1.0".
|
||||
" On new-ish Fedora it's "python3-pylint 1.2.0".
|
||||
" Have you guys considered switching to creative writing yet? ;)
|
||||
let pylint_version = filter( split(system(exe . ' --version'), '\m, \=\|\n'),
|
||||
\ 'v:val =~# ''\m^\(python[-0-9]*-\|\.\)\=pylint[-0-9]*\>''' )[0]
|
||||
let pylint_version = substitute(pylint_version, '\v^\S+\s+', '', '')
|
||||
let ret = syntastic#util#versionIsAtLeast(syntastic#util#parseVersion(pylint_version), [1])
|
||||
catch /\m^Vim\%((\a\+)\)\=:E684/
|
||||
call syntastic#log#error("checker python/pylint: can't parse version string (abnormal termination?)")
|
||||
let ret = -1
|
||||
endtry
|
||||
return ret
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'python',
|
||||
\ 'name': 'pylint' })
|
||||
|
@ -21,8 +21,14 @@ set cpo&vim
|
||||
let s:compiler = expand('<sfile>:p:h') . syntastic#util#Slash() . 'compile.py'
|
||||
|
||||
function! SyntaxCheckers_python_python_IsAvailable() dict
|
||||
return executable(self.getExec()) &&
|
||||
\ syntastic#util#versionIsAtLeast(syntastic#util#getVersion(self.getExecEscaped() . ' --version'), [2, 6])
|
||||
if !executable(self.getExec())
|
||||
return 0
|
||||
endif
|
||||
|
||||
let ver = syntastic#util#getVersion(self.getExecEscaped() . ' --version')
|
||||
call self.log(self.getExec() . ' version =', ver)
|
||||
|
||||
return syntastic#util#versionIsAtLeast(ver, [2, 6])
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_python_python_GetLocList() dict
|
||||
|
38
sources_non_forked/syntastic/syntax_checkers/rnc/rnv.vim
Normal file
38
sources_non_forked/syntastic/syntax_checkers/rnc/rnv.vim
Normal file
@ -0,0 +1,38 @@
|
||||
"============================================================================
|
||||
"File: rnv.vim
|
||||
"Description: RelaxNG RNV syntax checking plugin for syntastic.vim
|
||||
"Maintainer: Remko Tronçon <remko at el-tramo dot be>
|
||||
"License: This program is free software. It comes without any warranty,
|
||||
" to the extent permitted by applicable law. You can redistribute
|
||||
" it and/or modify it under the terms of the Do What The Fuck You
|
||||
" Want To Public License, Version 2, as published by Sam Hocevar.
|
||||
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"============================================================================
|
||||
|
||||
if exists("g:loaded_syntastic_rnc_rnv_checker")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_rnc_rnv_checker = 1
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_rnc_rnv_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args': '-c' })
|
||||
|
||||
let errorformat =
|
||||
\ '%f:%l:%c: %trror: %m'
|
||||
|
||||
return SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'rnc',
|
||||
\ 'name': 'rnv'})
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
@ -1,6 +1,6 @@
|
||||
"============================================================================
|
||||
"File: rst.vim
|
||||
"Description: Syntax checking plugin for docutil's reStructuredText files
|
||||
"Description: Syntax checking plugin for docutils' reStructuredText files
|
||||
"Maintainer: James Rowe <jnrowe at gmail dot com>
|
||||
"License: This program is free software. It comes without any warranty,
|
||||
" to the extent permitted by applicable law. You can redistribute
|
||||
|
@ -21,6 +21,7 @@ set cpo&vim
|
||||
function! SyntaxCheckers_ruby_mri_IsAvailable() dict
|
||||
if !exists('g:syntastic_ruby_mri_exec') && exists('g:syntastic_ruby_exec')
|
||||
let g:syntastic_ruby_mri_exec = g:syntastic_ruby_exec
|
||||
call self.log('g:syntastic_ruby_exec =', g:syntastic_ruby_exec)
|
||||
endif
|
||||
return executable(self.getExec())
|
||||
endfunction
|
||||
|
@ -22,9 +22,14 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_ruby_rubocop_IsAvailable() dict
|
||||
return
|
||||
\ executable(self.getExec()) &&
|
||||
\ syntastic#util#versionIsAtLeast(syntastic#util#getVersion(self.getExecEscaped() . ' --version'), [0, 9, 0])
|
||||
if !executable(self.getExec())
|
||||
return 0
|
||||
endif
|
||||
|
||||
let ver = syntastic#util#getVersion(self.getExecEscaped() . ' --version')
|
||||
call self.log(self.getExec() . ' version =', ver)
|
||||
|
||||
return syntastic#util#versionIsAtLeast(ver, [0, 9, 0])
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_ruby_rubocop_GetLocList() dict
|
||||
|
@ -21,8 +21,9 @@ set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_ruby_rubylint_GetLocList() dict
|
||||
if !exists('s:rubylint_new')
|
||||
let s:rubylint_new = syntastic#util#versionIsAtLeast(syntastic#util#getVersion(
|
||||
\ self.getExecEscaped() . ' --version'), [2])
|
||||
let ver = syntastic#util#getVersion(self.getExecEscaped() . ' --version')
|
||||
call self.log(self.getExec() . ' version =', ver)
|
||||
let s:rubylint_new = syntastic#util#versionIsAtLeast(ver, [2])
|
||||
endif
|
||||
let makeprg = self.makeprgBuild({ 'args': (s:rubylint_new ? '' : 'analyze ') . '--presenter=syntastic' })
|
||||
|
||||
|
@ -17,9 +17,13 @@ let g:loaded_syntastic_sass_sass_checker = 1
|
||||
|
||||
"sass caching for large files drastically speeds up the checking, but store it
|
||||
"in a temp location otherwise sass puts .sass_cache dirs in the users project
|
||||
let s:sass_cache_location = tempname()
|
||||
let s:sass_cache_location = syntastic#util#tmpdir()
|
||||
lockvar s:sass_cache_location
|
||||
|
||||
augroup syntastic
|
||||
autocmd VimLeave * call syntastic#util#rmrf(s:sass_cache_location)
|
||||
augroup END
|
||||
|
||||
"By default do not check partials as unknown variables are a syntax error
|
||||
if !exists("g:syntastic_sass_check_partials")
|
||||
let g:syntastic_sass_check_partials = 0
|
||||
|
@ -27,10 +27,16 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_scala_scalastyle_IsAvailable() dict
|
||||
return
|
||||
\ executable(self.getExec()) &&
|
||||
\ filereadable(expand(g:syntastic_scala_scalastyle_jar)) &&
|
||||
\ filereadable(expand(g:syntastic_scala_scalastyle_config_file))
|
||||
if !executable(self.getExec())
|
||||
return 0
|
||||
endif
|
||||
|
||||
let jar = expand(g:syntastic_scala_scalastyle_jar)
|
||||
let conf_file = expand(g:syntastic_scala_scalastyle_config_file)
|
||||
call self.log('filereadable(' . string(jar) . ') = ' . filereadable(jar) . ', ' .
|
||||
\ 'filereadable(' . string(conf_file) . ') = ' . filereadable(conf_file))
|
||||
|
||||
return filereadable(jar) && filereadable(conf_file)
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_scala_scalastyle_GetLocList() dict
|
||||
|
@ -18,10 +18,14 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_scss_scss_lint_IsAvailable() dict
|
||||
return
|
||||
\ executable(self.getExec()) &&
|
||||
\ syntastic#util#versionIsAtLeast(syntastic#util#getVersion(
|
||||
\ self.getExecEscaped() . ' --version'), [0, 12])
|
||||
if !executable(self.getExec())
|
||||
return 0
|
||||
endif
|
||||
|
||||
let ver = syntastic#util#getVersion(self.getExecEscaped() . ' --version')
|
||||
call self.log(self.getExec() . ' version =', ver)
|
||||
|
||||
return syntastic#util#versionIsAtLeast(ver, [0, 12])
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_scss_scss_lint_GetLocList() dict
|
||||
|
@ -19,6 +19,7 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_sh_sh_IsAvailable() dict
|
||||
call self.log('shell =', s:GetShell())
|
||||
return s:IsShellValid()
|
||||
endfunction
|
||||
|
||||
|
@ -20,8 +20,9 @@ set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_slim_slimrb_GetLocList() dict
|
||||
if !exists('s:slimrb_new')
|
||||
let s:slimrb_new = syntastic#util#versionIsAtLeast(syntastic#util#getVersion(
|
||||
\ self.getExecEscaped() . ' --version 2>'. syntastic#util#DevNull()), [1, 3, 1])
|
||||
let ver = syntastic#util#getVersion(self.getExecEscaped() . ' --version 2>'. syntastic#util#DevNull())
|
||||
call self.log(self.getExec() . ' version =', ver)
|
||||
let s:slimrb_new = syntastic#util#versionIsAtLeast(ver, [1, 3, 1])
|
||||
endif
|
||||
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '-c' })
|
||||
|
@ -9,19 +9,6 @@
|
||||
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"
|
||||
"============================================================================
|
||||
"
|
||||
" For details about ChkTeX see:
|
||||
"
|
||||
" http://baruch.ev-en.org/proj/chktex/
|
||||
"
|
||||
" Checker options:
|
||||
"
|
||||
" - g:syntastic_tex_chktex_showmsgs (boolean; default: 1)
|
||||
" whether to show informational messages (chktex option "-m");
|
||||
" by default informational messages are shown as warnings
|
||||
"
|
||||
" - g:syntastic_tex_chktex_args (string; default: empty)
|
||||
" command line options to pass to chktex
|
||||
|
||||
if exists('g:loaded_syntastic_tex_chktex_checker')
|
||||
finish
|
||||
|
25
sources_non_forked/syntastic/syntax_checkers/text/igor.vim
Normal file
25
sources_non_forked/syntastic/syntax_checkers/text/igor.vim
Normal file
@ -0,0 +1,25 @@
|
||||
"============================================================================
|
||||
"File: igor.vim
|
||||
"Description: Syntax checking plugin for syntastic.vim
|
||||
"Maintainer: LCD 47 <lcd047 at gmail dot com>
|
||||
"License: This program is free software. It comes without any warranty,
|
||||
" to the extent permitted by applicable law. You can redistribute
|
||||
" it and/or modify it under the terms of the Do What The Fuck You
|
||||
" Want To Public License, Version 2, as published by Sam Hocevar.
|
||||
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
if exists('g:loaded_syntastic_text_igor_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_text_igor_checker = 1
|
||||
|
||||
runtime! syntax_checkers/docbk/*.vim
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'text',
|
||||
\ 'name': 'igor',
|
||||
\ 'redirect': 'docbk/igor'})
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
@ -63,7 +63,7 @@ function! s:GetValaVapiDirs()
|
||||
elseif type(g:syntastic_vala_vapi_dirs) == type([])
|
||||
return copy(g:syntastic_vala_vapi_dirs)
|
||||
else
|
||||
echoerr 'g:syntastic_vala_vapi_dirs must be either list or string: fallback to in file modules string'
|
||||
echoerr 'g:syntastic_vala_vapi_dirs must be either a list, or a string: fallback to in-file modules string'
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -20,6 +20,7 @@ function! SyntaxCheckers_verilog_verilator_IsAvailable() dict
|
||||
if !exists('g:syntastic_verilog_compiler')
|
||||
let g:syntastic_verilog_compiler = self.getExec()
|
||||
endif
|
||||
call self.log('g:syntastic_verilog_compiler =', g:syntastic_verilog_compiler)
|
||||
return executable(expand(g:syntastic_verilog_compiler))
|
||||
endfunction
|
||||
|
||||
|
@ -36,9 +36,11 @@ function! SyntaxCheckers_vim_vimlint_GetHighlightRegex(item)
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_vim_vimlint_IsAvailable() dict
|
||||
return
|
||||
\ globpath(&runtimepath, 'autoload/vimlparser.vim') != '' &&
|
||||
\ globpath(&runtimepath, 'autoload/vimlint.vim') != ''
|
||||
let vimlparser = globpath(&runtimepath, 'autoload/vimlparser.vim')
|
||||
let vimlint = globpath(&runtimepath, 'autoload/vimlint.vim')
|
||||
call self.log("globpath(&runtimepath, 'autoload/vimlparser.vim') = " . string(vimlparser) . ', ' .
|
||||
\ "globpath(&runtimepath, 'autoload/vimlint.vim') = " . string(vimlint))
|
||||
return vimlparser != '' && vimlint != ''
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_vim_vimlint_GetLocList() dict
|
||||
|
@ -47,8 +47,8 @@ function! s:TidyEncOptByFenc()
|
||||
endfunction
|
||||
|
||||
function! s:IgnoreError(text)
|
||||
for i in g:syntastic_xhtml_tidy_ignore_errors
|
||||
if stridx(a:text, i) != -1
|
||||
for item in g:syntastic_xhtml_tidy_ignore_errors
|
||||
if stridx(a:text, item) != -1
|
||||
return 1
|
||||
endif
|
||||
endfor
|
||||
|
@ -23,8 +23,9 @@ set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_yaml_jsyaml_GetLocList() dict
|
||||
if !exists('s:js_yaml_new')
|
||||
let s:js_yaml_new =
|
||||
\ syntastic#util#versionIsAtLeast(syntastic#util#getVersion(self.getExecEscaped() . ' --version'), [2])
|
||||
let ver = syntastic#util#getVersion(self.getExecEscaped() . ' --version')
|
||||
call self.log(self.getExec() . ' version =', ver)
|
||||
let s:js_yaml_new = syntastic#util#versionIsAtLeast(ver, [2])
|
||||
endif
|
||||
|
||||
let makeprg = self.makeprgBuild({ 'args_after': (s:js_yaml_new ? '' : '--compact') })
|
||||
|
Reference in New Issue
Block a user