refactor all the syntax checkers to use the new API and dir layout
This commit is contained in:
parent
58ba8d3161
commit
e0b8e87c93
@ -10,12 +10,19 @@ let g:SyntasticChecker = {}
|
||||
function! g:SyntasticChecker.New(args)
|
||||
let newObj = copy(self)
|
||||
|
||||
let newObj._locListFunc = a:args['loclistFunc']
|
||||
let newObj._isAvailableFunc = a:args['isAvailableFunc']
|
||||
let newObj._filetype = a:args['filetype']
|
||||
let newObj._name = a:args['name']
|
||||
|
||||
let newObj._highlightRegexFunc = get(a:args, 'highlightRegexFunc', '')
|
||||
|
||||
let prefix = 'SyntaxCheckers_' . newObj._filetype . '_' . newObj._name . '_'
|
||||
let newObj._locListFunc = function(prefix . 'GetLocList')
|
||||
let newObj._isAvailableFunc = function(prefix . 'IsAvailable')
|
||||
|
||||
if exists('*' . prefix . 'GetHighlightRegex')
|
||||
let newObj._highlightRegexFunc = function(prefix. 'GetHighlightRegex')
|
||||
else
|
||||
let newObj._highlightRegexFunc = ''
|
||||
endif
|
||||
|
||||
return newObj
|
||||
endfunction
|
||||
|
@ -67,7 +67,11 @@ if !exists('g:syntastic_ada_config_file')
|
||||
let g:syntastic_ada_config_file = '.syntastic_ada_config'
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_ada_GetLocList()
|
||||
function! SyntaxCheckers_ada_gcc_IsAvailable()
|
||||
return executable('gcc')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_ada_gcc_GetLocList()
|
||||
let makeprg = 'gcc -c -fsyntax-only '
|
||||
let errorformat = '%-G%f:%s:,%f:%l:%c: %m,%f:%l: %m'
|
||||
|
||||
@ -121,6 +125,10 @@ function! SyntaxCheckers_ada_GetLocList()
|
||||
endif
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'ada',
|
||||
\ 'name': 'gcc'})
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
@ -24,13 +24,11 @@
|
||||
" Hocevar. See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"
|
||||
"============================================================================
|
||||
function! SyntaxCheckers_applescript_osacompile_IsAvailable()
|
||||
return executable('osacompile')
|
||||
endfunction
|
||||
|
||||
"bail if the user doesnt have osacompile installed
|
||||
if !executable("osacompile")
|
||||
finish
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_applescript_GetLocList()
|
||||
function! SyntaxCheckers_applescript_osacompile_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'osacompile',
|
||||
\ 'args': '-o ' . tempname() . '.scpt ' })
|
||||
@ -38,3 +36,7 @@ function! SyntaxCheckers_applescript_GetLocList()
|
||||
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'applescript',
|
||||
\ 'name': 'osacompile'})
|
@ -18,11 +18,14 @@ if executable("checkpatch.pl")
|
||||
let g:syntastic_c_checker_checkpatch_location = 'checkpatch.pl'
|
||||
elseif executable("./scripts/checkpatch.pl")
|
||||
let g:syntastic_c_checker_checkpatch_location = './scripts/checkpatch.pl'
|
||||
else
|
||||
finish
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_c_GetLocList()
|
||||
function SyntaxCheckers_c_checkpatch_IsAvailable()
|
||||
exists("g:syntastic_c_checker_checkpatch_location")
|
||||
endfunction
|
||||
|
||||
|
||||
function! SyntaxCheckers_c_checkpatch_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': g:syntastic_c_checker_checkpatch_location,
|
||||
\ 'args': '--no-summary --no-tree --terse --file',
|
||||
@ -30,8 +33,11 @@ function! SyntaxCheckers_c_GetLocList()
|
||||
|
||||
let errorformat = '%f:%l: %tARNING: %m,%f:%l: %tRROR: %m'
|
||||
|
||||
let oclist = SyntasticMake({ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'defaults': {'bufnr': bufnr("")} })
|
||||
return loclist
|
||||
return SyntasticMake({ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'defaults': {'bufnr': bufnr("")} })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'c',
|
||||
\ 'name': 'checkpatch'})
|
||||
|
@ -73,8 +73,8 @@ if exists('loaded_gcc_syntax_checker')
|
||||
endif
|
||||
let loaded_gcc_syntax_checker = 1
|
||||
|
||||
if !executable(g:syntastic_c_checker)
|
||||
finish
|
||||
function SyntaxCheckers_c_gcc_IsAvailable()
|
||||
return executable(g:syntastic_c_checker)
|
||||
endif
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
@ -88,7 +88,7 @@ if !exists('g:syntastic_c_config_file')
|
||||
let g:syntastic_c_config_file = '.syntastic_c_config'
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_c_GetLocList()
|
||||
function! SyntaxCheckers_c_gcc_GetLocList()
|
||||
let makeprg = g:syntastic_c_checker . ' -x c -fsyntax-only '
|
||||
let errorformat = '%-G%f:%s:,%-G%f:%l: %#error: %#(Each undeclared '.
|
||||
\ 'identifier is reported only%.%#,%-G%f:%l: %#error: %#for '.
|
||||
@ -159,6 +159,10 @@ function! SyntaxCheckers_c_GetLocList()
|
||||
endif
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'c',
|
||||
\ 'name': 'gcc'})
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
|
@ -13,12 +13,11 @@ if exists("loaded_sparse_syntax_checker")
|
||||
endif
|
||||
let loaded_sparse_syntax_checker = 1
|
||||
|
||||
" Bail if the user doesn't have `sparse.pl` or ./scripts/checkpatch.pl installed.
|
||||
if !executable("sparse")
|
||||
finish
|
||||
endif
|
||||
function! SyntaxCheckers_c_sparse_IsAvailable()
|
||||
return executable("sparse")
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_c_GetLocList()
|
||||
function! SyntaxCheckers_c_sparse_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'sparse',
|
||||
\ 'args': syntastic#c#ReadConfig(g:syntastic_sparse_config_file) })
|
||||
@ -31,3 +30,7 @@ function! SyntaxCheckers_c_GetLocList()
|
||||
\ 'defaults': {'bufnr': bufnr("")} })
|
||||
return loclist
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'c',
|
||||
\ 'name': 'sparse'})
|
||||
|
@ -15,7 +15,11 @@ if !executable("coco")
|
||||
finish
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_co_GetLocList()
|
||||
function! SyntaxCheckers_co_coco_GetLocList()
|
||||
return executable('coco')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_co_coco_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'coco',
|
||||
\ 'args': '-c -o /tmp' })
|
||||
@ -23,3 +27,7 @@ function! SyntaxCheckers_co_GetLocList()
|
||||
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'co',
|
||||
\ 'name': 'coco'})
|
@ -10,17 +10,17 @@
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
"bail if the user doesnt have coffee installed
|
||||
if !executable("coffee")
|
||||
finish
|
||||
endif
|
||||
|
||||
if !exists('g:syntastic_coffee_lint_options')
|
||||
let g:syntastic_coffee_lint_options = ""
|
||||
endif
|
||||
|
||||
|
||||
function! SyntaxCheckers_coffee_GetLocList()
|
||||
function! SyntaxCheckers_coffee_coffee_IsAvailable()
|
||||
return executable("coffee") && executable('coffeelint')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_coffee_coffee_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'coffee',
|
||||
\ 'args': '-c -l -o /tmp' })
|
||||
@ -45,3 +45,7 @@ function s:GetCoffeeLintErrors()
|
||||
|
||||
return lint_results
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'coffee',
|
||||
\ 'name': 'coffee'})
|
@ -80,10 +80,6 @@ if !exists('g:syntastic_cpp_compiler_options')
|
||||
let g:syntastic_cpp_compiler_options = ''
|
||||
endif
|
||||
|
||||
if !executable(g:syntastic_cpp_compiler)
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
@ -91,7 +87,11 @@ if !exists('g:syntastic_cpp_config_file')
|
||||
let g:syntastic_cpp_config_file = '.syntastic_cpp_config'
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_cpp_GetLocList()
|
||||
function! SyntaxCheckers_cpp_gpp_IsAvailable()
|
||||
return executable(g:syntastic_cpp_compiler)
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_cpp_gpp_GetLocList()
|
||||
let makeprg = g:syntastic_cpp_compiler . ' -x c++ -fsyntax-only ' .
|
||||
\ g:syntastic_cpp_compiler_options
|
||||
let errorformat = '%-G%f:%s:,%f:%l:%c: %trror: %m,%f:%l:%c: %tarning: '.
|
||||
@ -150,6 +150,10 @@ function! SyntaxCheckers_cpp_GetLocList()
|
||||
endif
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'cpp',
|
||||
\ 'name': 'gpp'})
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
@ -10,11 +10,11 @@
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
if !executable('mcs')
|
||||
finish
|
||||
endif
|
||||
function! SyntaxCheckers_cs_mcs_IsAvailable()
|
||||
return executable('mcs')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_cs_GetLocList()
|
||||
function! SyntaxCheckers_cs_mcs_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'mcs',
|
||||
\ 'args': '--parse' })
|
||||
@ -24,3 +24,6 @@ function! SyntaxCheckers_cs_GetLocList()
|
||||
\ 'defaults': {'bufnr': bufnr("")} })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'cs',
|
||||
\ 'name': 'mcs'})
|
@ -18,12 +18,11 @@ if !exists('g:syntastic_csslint_options')
|
||||
let g:syntastic_csslint_options = ""
|
||||
endif
|
||||
|
||||
" Bail if the user doesn't have `csslint` installed.
|
||||
if !executable("csslint")
|
||||
finish
|
||||
endif
|
||||
function! SyntaxCheckers_css_csslint_IsAvailable()
|
||||
return executable('csslint')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_css_GetLocList()
|
||||
function! SyntaxCheckers_css_csslint_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'csslint',
|
||||
\ 'args': '--format=compact ' . g:syntastic_csslint_options })
|
||||
@ -32,7 +31,11 @@ function! SyntaxCheckers_css_GetLocList()
|
||||
let errorformat = '%-G,%-G%f: lint free!,%f: line %l\, col %c\, %trror - %m,%f: line %l\, col %c\, %tarning - %m,%f: line %l\, col %c\, %m,'
|
||||
|
||||
return SyntasticMake({ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'defaults': {'bufnr': bufnr("")} })
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'defaults': {'bufnr': bufnr("")} })
|
||||
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'css',
|
||||
\ 'name': 'csslint'})
|
@ -10,12 +10,11 @@
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
"bail if the user doesnt have cucumber installed
|
||||
if !executable("cucumber")
|
||||
finish
|
||||
endif
|
||||
function! SyntaxCheckers_cucumber_cucumber_IsAvailable()
|
||||
return executable('cucumber')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_cucumber_GetLocList()
|
||||
function! SyntaxCheckers_cucumber_cucumber_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'cucumber',
|
||||
\ 'args': '--dry-run --quiet --strict --format pretty' })
|
||||
@ -23,3 +22,7 @@ function! SyntaxCheckers_cucumber_GetLocList()
|
||||
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'cucumber',
|
||||
\ 'name': 'cucumber'})
|
@ -18,11 +18,12 @@
|
||||
"
|
||||
" let g:syntastic_cuda_arch = "sm_20"
|
||||
|
||||
if !executable('nvcc')
|
||||
finish
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_cuda_GetLocList()
|
||||
function! SyntaxCheckers_cuda_nvcc_IsAvailable()
|
||||
return executable('nvcc')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_cuda_nvcc_GetLocList()
|
||||
if exists('g:syntastic_cuda_arch')
|
||||
let arch_flag = '-arch='.g:syntastic_cuda_arch
|
||||
else
|
||||
@ -42,3 +43,7 @@ function! SyntaxCheckers_cuda_GetLocList()
|
||||
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'cuda',
|
||||
\ 'name': 'nvcc'})
|
@ -64,10 +64,6 @@
|
||||
"
|
||||
" let g:syntastic_d_remove_include_errors = 1
|
||||
|
||||
if !executable('dmd')
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
@ -75,7 +71,11 @@ if !exists('g:syntastic_d_config_file')
|
||||
let g:syntastic_d_config_file = '.syntastic_d_config'
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_d_GetLocList()
|
||||
function! SyntaxCheckers_d_dmd_IsAvailable()
|
||||
return executable('dmd')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_d_dmd_GetLocList()
|
||||
let makeprg = 'dmd -of/dev/null -c '
|
||||
let errorformat = '%-G%f:%s:,%f(%l): %m,%f:%l: %m'
|
||||
|
||||
@ -129,6 +129,10 @@ function! SyntaxCheckers_d_GetLocList()
|
||||
endif
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'd',
|
||||
\ 'name': 'dmd'})
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
@ -1,14 +0,0 @@
|
||||
"============================================================================
|
||||
"File: dart.vim
|
||||
"Description: Figures out which dart syntax checker (if any) to load
|
||||
" from the dart directory.
|
||||
"Maintainer: Maksim Ryzhikov <rv.maksim 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.
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
call SyntasticLoadChecker('dart')
|
@ -12,7 +12,11 @@ if !exists("g:syntastic_dart_analyzer_conf")
|
||||
let g:syntastic_dart_analyzer_conf = ''
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_dart_GetLocList()
|
||||
function! SyntaxCheckers_dart_dart_analyser_IsAvailable()
|
||||
return executable("dart_analyser")
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_dart_dart_analyser_GetLocList()
|
||||
let args = !empty(g:syntastic_dart_analyzer_conf) ? ' ' . g:syntastic_dart_analyzer_conf : ''
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'dart_analyzer',
|
||||
@ -22,3 +26,7 @@ function! SyntaxCheckers_dart_GetLocList()
|
||||
let errorformat = '%Efile:%f:%l:%c: %m'
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'dart',
|
||||
\ 'name': 'dart_analyser'})
|
||||
|
@ -10,12 +10,12 @@
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
"bail if the user doesnt have tidy or grep installed
|
||||
if !executable("xmllint")
|
||||
finish
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_docbk_GetLocList()
|
||||
function! SyntaxCheckers_docbk_xmllint_IsAvailable()
|
||||
return executable('xmllint')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_docbk_xmllint_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'xmllint',
|
||||
\ 'args': '--xinclude --noout --postvalid' })
|
||||
@ -24,3 +24,7 @@ function! SyntaxCheckers_docbk_GetLocList()
|
||||
|
||||
return loclist
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'docbk',
|
||||
\ 'name': 'xmllint'})
|
@ -9,12 +9,11 @@
|
||||
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"
|
||||
"============================================================================
|
||||
function! SyntaxCheckers_elixir_elixir_IsAvailable()
|
||||
return executable('elixir')
|
||||
endfunction
|
||||
|
||||
if !executable('elixir')
|
||||
finish
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_elixir_GetLocList()
|
||||
function! SyntaxCheckers_elixir_elixir_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({ 'exe': 'elixir' })
|
||||
let errorformat = '** %*[^\ ] %f:%l: %m'
|
||||
|
||||
@ -24,3 +23,7 @@ function! SyntaxCheckers_elixir_GetLocList()
|
||||
return elixir_results
|
||||
endif
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'elixir',
|
||||
\ 'name': 'elixir'})
|
@ -10,18 +10,16 @@
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
"bail if the user doesnt have escript installed
|
||||
if !executable("escript")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:check_file = expand('<sfile>:p:h') . '/erlang_check_file.erl'
|
||||
if !exists("g:syntastic_erlc_include_path")
|
||||
let g:syntastic_erlc_include_path=""
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_erlang_escript_IsAvailable()
|
||||
return executable('escript')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_erlang_GetLocList()
|
||||
function! SyntaxCheckers_erlang_escript_GetLocList()
|
||||
let extension = expand('%:e')
|
||||
if match(extension, 'hrl') >= 0
|
||||
return []
|
||||
@ -40,3 +38,7 @@ function! SyntaxCheckers_erlang_GetLocList()
|
||||
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'erlang',
|
||||
\ 'name': 'escript'})
|
@ -14,12 +14,12 @@ if !exists("g:syntastic_ruby_exec")
|
||||
let g:syntastic_ruby_exec = "ruby"
|
||||
endif
|
||||
|
||||
"bail if the user doesnt have ruby installed
|
||||
if !executable(expand(g:syntastic_ruby_exec))
|
||||
finish
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_eruby_GetLocList()
|
||||
function! SyntaxCheckers_eruby_ruby_IsAvailable()
|
||||
executable(expand(g:syntastic_ruby_exec))
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_eruby_ruby_GetLocList()
|
||||
let ruby_exec=expand(g:syntastic_ruby_exec)
|
||||
if !has('win32')
|
||||
let ruby_exec='RUBYOPT= ' . ruby_exec
|
||||
@ -34,3 +34,7 @@ function! SyntaxCheckers_eruby_GetLocList()
|
||||
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat})
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'erlang',
|
||||
\ 'name': 'ruby'})
|
@ -18,16 +18,15 @@
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
"bail if the user doesnt have fortran installed
|
||||
if !executable("gfortran")
|
||||
finish
|
||||
endif
|
||||
|
||||
if !exists('g:syntastic_fortran_flags')
|
||||
let g:syntastic_fortran_flags = ''
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_fortran_GetLocList()
|
||||
function! SyntaxCheckers_fortran_gfortran_IsAvailable()
|
||||
return executable('gfortran')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_fortran_gfortran_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'gfortran',
|
||||
\ 'args': s:args() })
|
||||
@ -42,3 +41,7 @@ function s:args()
|
||||
endif
|
||||
return rv
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'fortran',
|
||||
\ 'name': 'gfortran'})
|
@ -20,13 +20,8 @@
|
||||
" See xmlcatalog(1) and http://www.xmlsoft.org/catalog.html for more
|
||||
" information.
|
||||
|
||||
"bail if the user doesn't have xmllint installed
|
||||
if !executable("xmllint")
|
||||
finish
|
||||
endif
|
||||
runtime syntax_checkers/xml/xmllint.vim
|
||||
|
||||
runtime syntax_checkers/xml.vim
|
||||
|
||||
function! SyntaxCheckers_gentoo_metadata_GetLocList()
|
||||
return SyntaxCheckers_xml_GetLocList()
|
||||
function! SyntaxCheckers_gentoo_metadata_xmllint_GetLocList()
|
||||
return SyntaxCheckers_xml_xmllint_GetLocList()
|
||||
endfunction
|
@ -1,17 +0,0 @@
|
||||
"============================================================================
|
||||
"File: go.vim
|
||||
"Description: Loads a go syntax checker from the go directory
|
||||
"Maintainer: Martin Grenfell <martin.grenfell 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.
|
||||
"
|
||||
" Use g:syntastic_go_checker option to specify which go executable
|
||||
" should be used (see below for a list of supported checkers).
|
||||
" If g:syntastic_go_checker is not set, just use the first syntax
|
||||
" checker that we find installed.
|
||||
"============================================================================
|
||||
|
||||
call SyntasticLoadChecker('go')
|
@ -12,7 +12,11 @@
|
||||
" Use a BufWritePre autocommand to that end:
|
||||
" autocmd FileType go autocmd BufWritePre <buffer> Fmt
|
||||
"============================================================================
|
||||
function! SyntaxCheckers_go_GetLocList()
|
||||
function! SyntaxCheckers_go_go_IsAvailable()
|
||||
return executable('go')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_go_go_GetLocList()
|
||||
" Check with gofmt first, since `go build` and `go test` might not report
|
||||
" syntax errors in the current file if another file with syntax error is
|
||||
" compiled first.
|
||||
@ -49,3 +53,7 @@ function! SyntaxCheckers_go_GetLocList()
|
||||
|
||||
return errors
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'go',
|
||||
\ 'name': 'go'})
|
||||
|
@ -12,7 +12,11 @@
|
||||
" Use a BufWritePre autocommand to that end:
|
||||
" autocmd FileType go autocmd BufWritePre <buffer> Fmt
|
||||
"============================================================================
|
||||
function! SyntaxCheckers_go_GetLocList()
|
||||
function! SyntaxCheckers_go_gofmt_IsAvailable()
|
||||
return executable('go')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_go_gofmt_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'gofmt',
|
||||
\ 'args': '-l',
|
||||
@ -21,3 +25,7 @@ function! SyntaxCheckers_go_GetLocList()
|
||||
let errorformat = '%f:%l:%c: %m,%-G%.%#'
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'defaults': {'type': 'e'} })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'go',
|
||||
\ 'name': 'gofmt'})
|
||||
|
@ -10,15 +10,18 @@
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
"bail if the user doesnt have the haml binary installed
|
||||
if !executable("haml")
|
||||
finish
|
||||
endif
|
||||
function! SyntaxCheckers_haml_haml_IsAvailable()
|
||||
return executable('haml')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_haml_GetLocList()
|
||||
function! SyntaxCheckers_haml_haml_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'haml',
|
||||
\ 'args': '-c' })
|
||||
let errorformat = 'Haml error on line %l: %m,Syntax error on line %l: %m,%-G%.%#'
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'haml',
|
||||
\ 'name': 'haml'})
|
@ -1,27 +0,0 @@
|
||||
"============================================================================
|
||||
"File: haskell.vim
|
||||
"Description: Syntax checking plugin for syntastic.vim
|
||||
"Maintainer: Anthony Carapetis <anthony.carapetis 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:syntastic_haskell_checker')
|
||||
if executable('hdevtools')
|
||||
runtime! syntax_checkers/haskell/hdevtools.vim
|
||||
elseif executable('ghc-mod')
|
||||
runtime! syntax_checkers/haskell/ghc-mod.vim
|
||||
endif
|
||||
elseif g:syntastic_haskell_checker == 'hdevtools'
|
||||
if executable('hdevtools')
|
||||
runtime! syntax_checkers/haskell/hdevtools.vim
|
||||
endif
|
||||
elseif g:syntastic_haskell_checker == 'ghc-mod'
|
||||
if executable('ghc-mod')
|
||||
runtime! syntax_checkers/haskell/ghc-mod.vim
|
||||
endif
|
||||
endif
|
@ -14,7 +14,11 @@ if !exists('g:syntastic_haskell_checker_args')
|
||||
let g:syntastic_haskell_checker_args = '--ghcOpt="-fno-code" --hlintOpt="--language=XmlSyntax"'
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_haskell_GetLocList()
|
||||
function! SyntaxCheckers_haskell_ghc_mod_IsAvailable()
|
||||
return executable('ghc-mod')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_haskell_ghc_mod_GetLocList()
|
||||
let ghcmod = 'ghc-mod ' . g:syntastic_haskell_checker_args
|
||||
let makeprg =
|
||||
\ "{ ".
|
||||
@ -28,6 +32,6 @@ function! SyntaxCheckers_haskell_GetLocList()
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_lhaskell_GetLocList()
|
||||
return SyntaxCheckers_haskell_GetLocList()
|
||||
endfunction
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'haskell',
|
||||
\ 'name': 'ghc_mod'})
|
||||
|
@ -10,7 +10,11 @@
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
function! SyntaxCheckers_haskell_GetLocList()
|
||||
function! SyntaxCheckers_haskell_hdevtools_IsAvailable()
|
||||
return executable('hdevtools')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_haskell_hdevtools_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'hdevtools check',
|
||||
\ 'args': get(g:, 'hdevtools_options', ''),
|
||||
@ -27,6 +31,7 @@ function! SyntaxCheckers_haskell_GetLocList()
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_lhaskell_GetLocList()
|
||||
return SyntaxCheckers_haskell_GetLocList()
|
||||
endfunction
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'haskell',
|
||||
\ 'name': 'hdevtools'})
|
||||
|
||||
|
@ -10,10 +10,9 @@
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
"bail if the user doesn't have haxe installed
|
||||
if !executable("haxe")
|
||||
finish
|
||||
endif
|
||||
function! SyntaxCheckers_haxe_haxe_IsAvailable()
|
||||
return executable('haxe')
|
||||
endfunction
|
||||
|
||||
" s:FindInParent
|
||||
" find the file argument and returns the path to it.
|
||||
@ -39,7 +38,7 @@ function! s:FindInParent(fln,flsrt,flstp)
|
||||
return ['fail', '', '']
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_haxe_GetLocList()
|
||||
function! SyntaxCheckers_haxe_haxe_GetLocList()
|
||||
let [success, hxmldir, hxmlname] = s:FindInParent('*.hxml', expand('%:p:h'), '/')
|
||||
if success == 'ok'
|
||||
let makeprg = 'cd ' . hxmldir . '; haxe ' . hxmlname
|
||||
@ -49,3 +48,7 @@ function! SyntaxCheckers_haxe_GetLocList()
|
||||
return SyntasticMake({})
|
||||
endif
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'haxe',
|
||||
\ 'name': 'haxe'})
|
@ -1,25 +0,0 @@
|
||||
"============================================================================
|
||||
"File: html.vim
|
||||
"Description: Syntax checking plugin for syntastic.vim
|
||||
"Maintainer: Martin Grenfell <martin.grenfell 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:syntastic_html_checker')
|
||||
let g:syntastic_html_checker = "tidy"
|
||||
endif
|
||||
|
||||
if g:syntastic_html_checker == "tidy"
|
||||
if executable("tidy") && executable("grep")
|
||||
runtime! syntax_checkers/html/tidy.vim
|
||||
endif
|
||||
elseif g:syntastic_html_checker == "w3"
|
||||
if executable("curl") && executable("sed")
|
||||
runtime! syntax_checkers/html/w3.vim
|
||||
endif
|
||||
endif
|
@ -57,7 +57,11 @@ function s:Args()
|
||||
let args .= " -e"
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_html_GetLocList()
|
||||
function! SyntaxCheckers_html_tidy_IsAvailable()
|
||||
return executable('tidy')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_html_tidy_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'tidy',
|
||||
\ 'args': s:Args(),
|
||||
@ -85,3 +89,8 @@ function! SyntaxCheckers_html_GetLocList()
|
||||
|
||||
return loclist
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'html',
|
||||
\ 'name': 'tidy'})
|
||||
|
||||
|
@ -9,7 +9,11 @@
|
||||
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"
|
||||
"============================================================================
|
||||
function! SyntaxCheckers_html_GetLocList()
|
||||
function! SyntaxCheckers_html_w3_IsAvailable()
|
||||
return executable('curl') && executable('sed')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_html_w3_GetLocList()
|
||||
let makeprg2="curl -s -F output=text -F \"uploaded_file=@".expand('%:p').";type=text/html\" http://validator.w3.org/check \\| sed -n -e '/\<em\>Line\.\*/ \{ N; s/\\n//; N; s/\\n//; /msg/p; \}' -e ''/msg_warn/p'' -e ''/msg_info/p'' \\| sed -e 's/[ ]\\+/ /g' -e 's/\<[\^\>]\*\>//g' -e 's/\^[ ]//g'"
|
||||
let errorformat2='Line %l\, Column %c: %m'
|
||||
let loclist = SyntasticMake({ 'makeprg': makeprg2, 'errorformat': errorformat2 })
|
||||
@ -30,3 +34,8 @@ function! SyntaxCheckers_html_GetLocList()
|
||||
|
||||
return loclist
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'html',
|
||||
\ 'name': 'w3'})
|
||||
|
||||
|
@ -1,18 +0,0 @@
|
||||
"============================================================================
|
||||
"File: java.vim
|
||||
"Description: Figures out which java syntax checker (if any) to load
|
||||
" from the java directory.
|
||||
"Maintainer: Dmitry Geurkov <d.geurkov 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.
|
||||
"
|
||||
" Use g:syntastic_java_checker option to specify which java syntax checker
|
||||
" should be used (see below for a list of supported checkers).
|
||||
" If g:syntastic_java_checker is not set, just use the first syntax
|
||||
" checker that we find installed.
|
||||
"============================================================================
|
||||
|
||||
call SyntasticLoadChecker('java')
|
@ -17,7 +17,12 @@ endif
|
||||
if !exists("g:syntastic_java_checkstyle_conf_file")
|
||||
let g:syntastic_java_checkstyle_conf_file = 'sun_checks.xml'
|
||||
endif
|
||||
function! SyntaxCheckers_java_GetLocList()
|
||||
|
||||
function! SyntaxCheckers_java_checkstyle_IsAvailable()
|
||||
return executable('java')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_java_checkstyle_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'java',
|
||||
\ 'args': '-cp ' . g:syntastic_java_checkstyle_classpath . ' com.puppycrawl.tools.checkstyle.Main -c ' . g:syntastic_java_checkstyle_conf_file,
|
||||
@ -31,3 +36,8 @@ function! SyntaxCheckers_java_GetLocList()
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'java',
|
||||
\ 'name': 'checkstyle'})
|
||||
|
||||
|
@ -158,7 +158,11 @@ function! s:GetMavenClasspath()
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_java_GetLocList()
|
||||
function! SyntaxCheckers_java_javac_IsAvailable()
|
||||
return executable(g:syntastic_java_javac_executable)
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_java_javac_GetLocList()
|
||||
|
||||
let javac_opts = g:syntastic_java_javac_options
|
||||
|
||||
@ -232,3 +236,8 @@ function! SyntaxCheckers_java_GetLocList()
|
||||
return r
|
||||
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'java',
|
||||
\ 'name': 'javac'})
|
||||
|
||||
|
@ -1,18 +0,0 @@
|
||||
"============================================================================
|
||||
"File: javascript.vim
|
||||
"Description: Figures out which javascript syntax checker (if any) to load
|
||||
" from the javascript directory.
|
||||
"Maintainer: Martin Grenfell <martin.grenfell 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.
|
||||
"
|
||||
" Use g:syntastic_javascript_checker option to specify which jslint executable
|
||||
" should be used (see below for a list of supported checkers).
|
||||
" If g:syntastic_javascript_checker is not set, just use the first syntax
|
||||
" checker that we find installed.
|
||||
"============================================================================
|
||||
|
||||
call SyntasticLoadChecker('javascript')
|
@ -25,12 +25,11 @@ if !exists("g:syntastic_javascript_closure_compiler_options")
|
||||
let g:syntastic_javascript_closure_compiler_options = ""
|
||||
endif
|
||||
|
||||
"bail if the user does not specify the path to closure compiler.
|
||||
if !exists("g:syntastic_javascript_closure_compiler_path")
|
||||
finish
|
||||
endif
|
||||
function! SyntaxCheckers_javascript_closurecompiler_IsAvailable()
|
||||
return exists("g:syntastic_javascript_closure_compiler_path")
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_javascript_GetLocList()
|
||||
function! SyntaxCheckers_javascript_closurecompiler_GetLocList()
|
||||
if exists("g:syntastic_javascript_closure_compiler_file_list")
|
||||
let file_list = join(readfile(g:syntastic_javascript_closure_compiler_file_list), ' ')
|
||||
else
|
||||
@ -46,3 +45,8 @@ function! SyntaxCheckers_javascript_GetLocList()
|
||||
let errorformat = '%-GOK,%E%f:%l: ERROR - %m,%Z%p^,%W%f:%l: WARNING - %m,%Z%p^'
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'javascript',
|
||||
\ 'name': 'closurecompiler'})
|
||||
|
||||
|
@ -12,7 +12,11 @@ if !exists("g:syntastic_javascript_gjslint_conf")
|
||||
let g:syntastic_javascript_gjslint_conf = ""
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_javascript_GetLocList()
|
||||
function! SyntaxCheckers_javascript_gjslint_IsAvailable()
|
||||
return executable('gjslint')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_javascript_gjslint_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'gjslint',
|
||||
\ 'args': g:syntastic_javascript_gjslint_conf . " --nosummary --unix_mode --nodebug_indentation --nobeep",
|
||||
@ -21,3 +25,7 @@ function! SyntaxCheckers_javascript_GetLocList()
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'javascript',
|
||||
\ 'name': 'gjslint'})
|
||||
|
||||
|
@ -12,7 +12,11 @@ if !exists("g:syntastic_javascript_jshint_conf")
|
||||
let g:syntastic_javascript_jshint_conf = ""
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_javascript_GetLocList()
|
||||
function! SyntaxCheckers_javascript_jshint_IsAvailable()
|
||||
return executable('jshint')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_javascript_jshint_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'jshint',
|
||||
\ 'post_args': s:Args(),
|
||||
@ -26,3 +30,8 @@ function s:Args()
|
||||
" node-jshint uses .jshintrc as config unless --config arg is present
|
||||
return !empty(g:syntastic_javascript_jshint_conf) ? ' --config ' . g:syntastic_javascript_jshint_conf : ''
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'javascript',
|
||||
\ 'name': 'jshint'})
|
||||
|
||||
|
@ -20,7 +20,11 @@ function s:ConfFlag()
|
||||
return ""
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_javascript_GetLocList()
|
||||
function! SyntaxCheckers_javascript_jsl_IsAvailable()
|
||||
return executable('jsl')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_javascript_jsl_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'jsl',
|
||||
\ 'args': s:ConfFlag() . " -nologo -nofilelisting -nosummary -nocontext -process",
|
||||
@ -29,3 +33,7 @@ function! SyntaxCheckers_javascript_GetLocList()
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'javascript',
|
||||
\ 'name': 'jsl'})
|
||||
|
||||
|
@ -14,13 +14,17 @@ if !exists("g:syntastic_javascript_jslint_conf")
|
||||
let g:syntastic_javascript_jslint_conf = "--white --undef --nomen --regexp --plusplus --bitwise --newcap --sloppy --vars"
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_javascript_HighlightTerm(error)
|
||||
function! SyntaxCheckers_javascript_jslint_IsAvailable()
|
||||
return executable('jslint')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_javascript_jslint_HighlightTerm(error)
|
||||
let unexpected = matchstr(a:error['text'], 'Expected.*and instead saw \'\zs.*\ze\'')
|
||||
if len(unexpected) < 1 | return '' | end
|
||||
return '\V'.split(unexpected, "'")[1]
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_javascript_GetLocList()
|
||||
function! SyntaxCheckers_javascript_jslint_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'jslint',
|
||||
\ 'args': g:syntastic_javascript_jslint_conf,
|
||||
@ -29,3 +33,7 @@ function! SyntaxCheckers_javascript_GetLocList()
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'defaults': {'bufnr': bufnr("")} })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'javascript',
|
||||
\ 'name': 'jslint'})
|
||||
|
||||
|
@ -1,18 +0,0 @@
|
||||
"============================================================================
|
||||
"File: json.vim
|
||||
"Description: Figures out which json syntax checker (if any) to load
|
||||
" from the json directory.
|
||||
"Maintainer: Miller Medeiros <contact at millermedeiros 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.
|
||||
"
|
||||
" Use g:syntastic_json_checker option to specify which jsonlint executable
|
||||
" should be used (see below for a list of supported checkers).
|
||||
" If g:syntastic_json_checker is not set, just use the first syntax
|
||||
" checker that we find installed.
|
||||
"============================================================================
|
||||
|
||||
call SyntasticLoadChecker('json')
|
@ -1,7 +1,5 @@
|
||||
"============================================================================
|
||||
"File: jsonlint.vim
|
||||
"Description: JSON syntax checker - using jsonlint
|
||||
"Maintainer: Miller Medeiros <contact at millermedeiros dot com>
|
||||
"File: jsonlint.vim "Description: JSON syntax checker - using jsonlint "Maintainer: Miller Medeiros <contact at millermedeiros 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
|
||||
@ -9,7 +7,11 @@
|
||||
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"============================================================================
|
||||
|
||||
function! SyntaxCheckers_json_GetLocList()
|
||||
function! SyntaxCheckers_json_jsonlint_IsAvailable()
|
||||
return executable('jsonlint')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_json_jsonlint_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'jsonlint',
|
||||
\ 'post_args': '--compact',
|
||||
@ -17,3 +19,7 @@ function! SyntaxCheckers_json_GetLocList()
|
||||
let errorformat = '%ELine %l:%c,%Z\\s%#Reason: %m,%C%.%#,%f: line %l\, col %c\, %m,%-G%.%#'
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'defaults': {'bufnr': bufnr('')} })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'json',
|
||||
\ 'name': 'jsonlint'})
|
||||
|
@ -9,9 +9,17 @@
|
||||
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"============================================================================
|
||||
|
||||
function! SyntaxCheckers_json_GetLocList()
|
||||
function! SyntaxCheckers_json_jsonlint_IsAvailable()
|
||||
return executable('jsonval')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_json_jsonval_GetLocList()
|
||||
" based on https://gist.github.com/1196345
|
||||
let makeprg = syntastic#makeprg#build({ 'exe': 'jsonval', 'subchecker': 'jsonval' })
|
||||
let errorformat = '%E%f:\ %m\ at\ line\ %l,%-G%.%#'
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'defaults': {'bufnr': bufnr('')} })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'json',
|
||||
\ 'name': 'jsonval'})
|
||||
|
@ -17,11 +17,6 @@
|
||||
" To use less-lint instead of less set the variable
|
||||
" g:syntastic_less_use_less_lint.
|
||||
|
||||
"bail if the user doesnt have the lessc binary installed
|
||||
if !executable("lessc")
|
||||
finish
|
||||
endif
|
||||
|
||||
if !exists("g:syntastic_less_options")
|
||||
let g:syntastic_less_options = "--no-color"
|
||||
endif
|
||||
@ -36,7 +31,11 @@ else
|
||||
let s:check_file = 'lessc'
|
||||
end
|
||||
|
||||
function! SyntaxCheckers_less_GetLocList()
|
||||
function! SyntaxCheckers_less_lessc_GetLocList()
|
||||
return executable('lessc')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_less_lessc_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': s:check_file,
|
||||
\ 'args': g:syntastic_less_options,
|
||||
@ -48,3 +47,6 @@ function! SyntaxCheckers_less_GetLocList()
|
||||
\ 'defaults': {'bufnr': bufnr(""), 'text': "Syntax error"} })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'less',
|
||||
\ 'name': 'lessc'})
|
@ -9,13 +9,11 @@
|
||||
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"
|
||||
"============================================================================
|
||||
function! SyntaxCheckers_lisp_clisp_IsAvailable()
|
||||
return executable("clisp")
|
||||
endfunction
|
||||
|
||||
" Bail if the user doesnt have clisp installed
|
||||
if !executable("clisp")
|
||||
finish
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_lisp_GetLocList()
|
||||
function! SyntaxCheckers_lisp_clisp_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'clisp',
|
||||
\ 'args': '-c'
|
||||
@ -26,3 +24,7 @@ function! SyntaxCheckers_lisp_GetLocList()
|
||||
let efm .= '%-G%.%#'
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': efm })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'lisp',
|
||||
\ 'name': 'clisp'})
|
@ -10,10 +10,9 @@
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
" check if the lua compiler is installed
|
||||
if !executable('luac')
|
||||
finish
|
||||
endif
|
||||
function! SyntaxCheckers_lua_luac_IsAvailable()
|
||||
return executable('luac')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_lua_GetHighlightRegex(pos)
|
||||
let near = matchstr(a:pos['text'], "near '[^']\\+'")
|
||||
@ -38,7 +37,8 @@ function! SyntaxCheckers_lua_GetHighlightRegex(pos)
|
||||
return result
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_lua_GetLocList()
|
||||
|
||||
function! SyntaxCheckers_lua_luac_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({ 'exe': 'luac', 'args': '-p' })
|
||||
let errorformat = 'luac: %#%f:%l: %m'
|
||||
|
||||
@ -48,3 +48,6 @@ function! SyntaxCheckers_lua_GetLocList()
|
||||
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'lua',
|
||||
\ 'name': 'luac'})
|
@ -10,14 +10,16 @@
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
"bail if the user doesn't have mlint installed
|
||||
if !executable("mlint")
|
||||
finish
|
||||
endif
|
||||
function! SyntaxCheckers_matlab_mlint_IsAvailable()
|
||||
return executable("mlint")
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_matlab_GetLocList()
|
||||
function! SyntaxCheckers_matlab_mlint_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({ 'exe': 'mlint', 'args': '-id $*' })
|
||||
let errorformat = 'L %l (C %c): %*[a-zA-Z0-9]: %m,L %l (C %c-%*[0-9]): %*[a-zA-Z0-9]: %m'
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'defaults': {'bufnr': bufnr("")} })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'matlab',
|
||||
\ 'name': 'mlint'})
|
@ -9,13 +9,11 @@
|
||||
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"
|
||||
"============================================================================
|
||||
function! SyntaxCheckers_nasm_nasm_GetLocList()
|
||||
return executable("nasm")
|
||||
endfunction
|
||||
|
||||
"bail if the user doesnt have nasm installed
|
||||
if !executable("nasm")
|
||||
finish
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_nasm_GetLocList()
|
||||
function! SyntaxCheckers_nasm_nasm_GetLocList()
|
||||
if has("win32")
|
||||
let outfile="NUL"
|
||||
else
|
||||
@ -28,3 +26,7 @@ function! SyntaxCheckers_nasm_GetLocList()
|
||||
let errorformat = '%f:%l: %t%*[^:]: %m'
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'nasm',
|
||||
\ 'name': 'nasm'})
|
@ -64,10 +64,6 @@
|
||||
"
|
||||
" let g:syntastic_objc_errorformat = '%f:%l:%c: %trror: %m'
|
||||
|
||||
if !executable('gcc')
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
@ -79,7 +75,11 @@ if !exists('g:syntastic_objc_config_file')
|
||||
let g:syntastic_objc_config_file = '.syntastic_objc_config'
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_objc_GetLocList()
|
||||
function! SyntaxCheckers_objc_gcc_IsAvailable()
|
||||
return executable('gcc')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_objc_gcc_GetLocList()
|
||||
let makeprg = 'gcc -fsyntax-only -lobjc'
|
||||
let errorformat =
|
||||
\ '%-G%f:%s:,'.
|
||||
@ -149,6 +149,10 @@ function! SyntaxCheckers_objc_GetLocList()
|
||||
endif
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'objc',
|
||||
\ 'name': 'gcc'})
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
@ -55,10 +55,9 @@ else
|
||||
let s:ocamlpp="camlp4o"
|
||||
endif
|
||||
|
||||
"bail if the user doesnt have the preprocessor
|
||||
if !executable(s:ocamlpp)
|
||||
finish
|
||||
endif
|
||||
function! SyntaxCheckers_ocaml_camlp4o_IsAvailable()
|
||||
return executable(s:ocamlpp)
|
||||
endfunction
|
||||
|
||||
if !exists('g:syntastic_ocaml_use_ocamlc') || !executable('ocamlc')
|
||||
let g:syntastic_ocaml_use_ocamlc = 0
|
||||
@ -72,7 +71,7 @@ if !exists('g:syntastic_ocaml_use_ocamlbuild') || !executable("ocamlbuild")
|
||||
let g:syntastic_ocaml_use_ocamlbuild = 0
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_ocaml_GetLocList()
|
||||
function! SyntaxCheckers_ocaml_camlp4o_GetLocList()
|
||||
let makeprg = s:GetMakeprg()
|
||||
if makeprg == ""
|
||||
return []
|
||||
@ -138,3 +137,7 @@ function s:GetOtherMakeprg()
|
||||
|
||||
return makeprg
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'ocaml',
|
||||
\ 'name': 'camlp4o'})
|
@ -25,16 +25,15 @@
|
||||
" let g:syntastic_perl_efm_program = "foo.pl -o -m -g"
|
||||
"
|
||||
|
||||
"bail if the user doesnt have perl installed
|
||||
if !executable("perl")
|
||||
finish
|
||||
endif
|
||||
function! SyntaxCheckers_perl_perl_IsAvailable()
|
||||
return executable("perl")
|
||||
endfunction
|
||||
|
||||
if !exists("g:syntastic_perl_efm_program")
|
||||
let g:syntastic_perl_efm_program = 'perl ' . shellescape(expand('<sfile>:p:h') . '/efm_perl.pl') . ' -c -w'
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_perl_GetLocList()
|
||||
function! SyntaxCheckers_perl_perl_GetLocList()
|
||||
if exists("g:syntastic_perl_lib_path")
|
||||
let makeprg = g:syntastic_perl_efm_program . ' -I' . g:syntastic_perl_lib_path . ' ' . shellescape(expand('%'))
|
||||
else
|
||||
@ -55,3 +54,7 @@ function! s:ExtraMakeprgArgs()
|
||||
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'perl',
|
||||
\ 'name': 'perl'})
|
@ -21,11 +21,9 @@
|
||||
"
|
||||
"There are options below to config and disable phpcs and phpmd.
|
||||
|
||||
|
||||
"bail if the user doesnt have php installed
|
||||
if !executable("php")
|
||||
finish
|
||||
endif
|
||||
function! SyntaxCheckers_php_php_IsAvailable()
|
||||
return executable("php")
|
||||
endfunction
|
||||
|
||||
"Support passing configuration directives to phpcs
|
||||
if !exists("g:syntastic_phpcs_conf")
|
||||
@ -55,7 +53,7 @@ function! SyntaxCheckers_php_GetHighlightRegex(item)
|
||||
return '\V'.split(unexpected, "'")[1]
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_php_GetLocList()
|
||||
function! SyntaxCheckers_php_php_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'php',
|
||||
\ 'args': '-l -d error_reporting=E_ALL -d display_errors=1 -d log_errors=0',
|
||||
@ -94,3 +92,7 @@ function! s:GetPHPMDErrors()
|
||||
let errorformat = '%E%f:%l%m'
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'subtype' : 'Style' })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'php',
|
||||
\ 'name': 'php'})
|
@ -10,10 +10,9 @@
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
"bail if the user doesnt have puppet installed
|
||||
if !executable("puppet")
|
||||
finish
|
||||
endif
|
||||
function! SyntaxCheckers_puppet_puppetlint_IsAvailable()
|
||||
return executable("puppet")
|
||||
endfunction
|
||||
|
||||
if !exists("g:syntastic_puppet_validate_disable")
|
||||
let g:syntastic_puppet_validate_disable = 0
|
||||
@ -90,7 +89,7 @@ function! s:getPuppetEfm()
|
||||
return errorformat
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_puppet_GetLocList()
|
||||
function! SyntaxCheckers_puppet_puppetlint_GetLocList()
|
||||
let errors = []
|
||||
|
||||
if !g:syntastic_puppet_validate_disable
|
||||
@ -104,3 +103,6 @@ function! SyntaxCheckers_puppet_GetLocList()
|
||||
return errors
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'puppet',
|
||||
\ 'name': 'puppetlint'})
|
@ -1,21 +0,0 @@
|
||||
"============================================================================
|
||||
"File: python.vim
|
||||
"Description: Syntax checking plugin for syntastic.vim
|
||||
"
|
||||
"Authors: Martin Grenfell <martin.grenfell@gmail.com>
|
||||
" kstep <me@kstep.me>
|
||||
" Parantapa Bhattacharya <parantapa@gmail.com>
|
||||
"
|
||||
"
|
||||
" For forcing the use of flake8, pyflakes, or pylint set
|
||||
"
|
||||
" let g:syntastic_python_checker = 'pyflakes'
|
||||
"
|
||||
" in your .vimrc. Default is flake8.
|
||||
"============================================================================
|
||||
|
||||
if !exists('g:syntastic_python_checker_args')
|
||||
let g:syntastic_python_checker_args = ''
|
||||
endif
|
||||
|
||||
call SyntasticLoadChecker('python')
|
@ -34,8 +34,5 @@ function! SyntaxCheckers_python_flake8_GetLocList()
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'loclistFunc': function("SyntaxCheckers_python_flake8_GetLocList"),
|
||||
\ 'highlightRegexFunc': function("SyntaxCheckers_python_flake8_GetHighlightRegex"),
|
||||
\ 'filetype': 'python',
|
||||
\ 'name': 'flake8',
|
||||
\ 'isAvailableFunc': function("SyntaxCheckers_python_flake8_IsAvailable")} )
|
||||
\ 'name': 'flake8'})
|
||||
|
@ -29,7 +29,6 @@ endfunction
|
||||
function! SyntaxCheckers_python_pyflakes_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'pyflakes',
|
||||
\ 'args': g:syntastic_python_checker_args,
|
||||
\ 'subchecker': 'pyflakes' })
|
||||
let errorformat = '%E%f:%l: could not compile,%-Z%p^,%E%f:%l:%c: %m,%E%f:%l: %m,%-G%.%#'
|
||||
|
||||
@ -39,8 +38,5 @@ function! SyntaxCheckers_python_pyflakes_GetLocList()
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'loclistFunc': function('SyntaxCheckers_python_pyflakes_GetLocList'),
|
||||
\ 'highlightRegexFunc': function('SyntaxCheckers_python_pyflakes_GetHighlightRegex'),
|
||||
\ 'filetype': 'python',
|
||||
\ 'name': 'pyflakes',
|
||||
\ 'isAvailableFunc': function('SyntaxCheckers_python_pyflakes_IsAvailable')} )
|
||||
\ 'name': 'pyflakes'})
|
||||
|
@ -11,7 +11,7 @@ endfunction
|
||||
function! SyntaxCheckers_python_pylint_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'pylint',
|
||||
\ 'args': g:syntastic_python_checker_args. ' -f parseable -r n -i y',
|
||||
\ 'args': ' -f parseable -r n -i y',
|
||||
\ 'tail': s:MakeprgTail(),
|
||||
\ 'subchecker': 'pylint' })
|
||||
let errorformat = '%f:%l: [%t] %m,%Z,%-GNo config %m'
|
||||
@ -25,7 +25,5 @@ function! s:MakeprgTail()
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'loclistFunc': function('SyntaxCheckers_python_pylint_GetLocList'),
|
||||
\ 'filetype': 'python',
|
||||
\ 'name': 'pylint',
|
||||
\ 'isAvailableFunc': function('SyntaxCheckers_python_pylint_IsAvailable')} )
|
||||
\ 'name': 'pylint' })
|
||||
|
@ -7,11 +7,11 @@
|
||||
" http://www.vim.org/scripts/download_script.php?src_id=1392
|
||||
"
|
||||
"============================================================================
|
||||
function! SyntaxCheckers_python_pyflakes_IsAvailable()
|
||||
function! SyntaxCheckers_python_python_IsAvailable()
|
||||
return executable('python')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_python_pyflakes_GetLocList()
|
||||
function! SyntaxCheckers_python_python_GetLocList()
|
||||
let l:path = shellescape(expand('%'))
|
||||
let l:cmd = "compile(open(" . l:path . ").read(), " . l:path . ", 'exec')"
|
||||
let l:makeprg = 'python -c "' . l:cmd . '"'
|
||||
@ -30,7 +30,5 @@ function! SyntaxCheckers_python_pyflakes_GetLocList()
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'loclistFunc': function('SyntaxCheckers_python_pyflakes_GetLocList'),
|
||||
\ 'filetype': 'python',
|
||||
\ 'name': 'python',
|
||||
\ 'isAvailableFunc': function('SyntaxCheckers_python_pyflakes_IsAvailable')} )
|
||||
\ 'name': 'python'})
|
||||
|
@ -13,12 +13,11 @@
|
||||
" We use rst2pseudoxml.py, as it is ever so marginally faster than the other
|
||||
" rst2${x} tools in docutils.
|
||||
|
||||
"bail if the user doesn't have rst2pseudoxml.py installed
|
||||
if !executable("rst2pseudoxml.py")
|
||||
finish
|
||||
endif
|
||||
function! SyntaxCheckers_rst_rst2pseudoxml_IsAvailable()
|
||||
return executable("rst2pseudoxml.py")
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_rst_GetLocList()
|
||||
function! SyntaxCheckers_rst_rst2pseudoxml_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'rst2pseudoxml.py',
|
||||
\ 'args': '--report=2 --exit-status=1',
|
||||
@ -32,3 +31,7 @@ function! SyntaxCheckers_rst_GetLocList()
|
||||
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'rst',
|
||||
\ 'name': 'rst2pseudoxml'})
|
@ -1,21 +0,0 @@
|
||||
"============================================================================
|
||||
"File: ruby.vim
|
||||
"Description: Syntax checking plugin for syntastic.vim
|
||||
"Maintainer: Martin Grenfell <martin.grenfell 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.
|
||||
"
|
||||
"Supports MRI and JRuby but loads the MRI syntax checker by default.
|
||||
"
|
||||
"Use the g:syntastic_ruby_checker option to specify which checker to load -
|
||||
"set it to "jruby" to load the jruby checker.
|
||||
"============================================================================
|
||||
|
||||
if !exists("g:syntastic_ruby_checker")
|
||||
let g:syntastic_ruby_checker = "mri"
|
||||
endif
|
||||
exec "runtime! syntax_checkers/ruby/" . g:syntastic_ruby_checker . ".vim"
|
||||
|
@ -9,7 +9,11 @@
|
||||
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"
|
||||
"============================================================================
|
||||
function! SyntaxCheckers_ruby_GetLocList()
|
||||
function! SyntaxCheckers_ruby_jruby_IsAvailable()
|
||||
return executable('jruby')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_ruby_jruby_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': s:exe(),
|
||||
\ 'args': s:args(),
|
||||
@ -27,3 +31,7 @@ endfunction
|
||||
function s:exe()
|
||||
return has('win32') ? 'jruby' : 'RUBYOPT= jruby'
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'ruby',
|
||||
\ 'name': 'jruby'})
|
||||
|
@ -8,7 +8,11 @@
|
||||
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"
|
||||
"============================================================================
|
||||
function! SyntaxCheckers_ruby_GetLocList()
|
||||
function! SyntaxCheckers_ruby_macruby_GetLocList()
|
||||
return executable('macruby')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_ruby_macruby_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'RUBYOPT= macruby',
|
||||
\ 'args': '-W1 -c',
|
||||
@ -16,3 +20,7 @@ function! SyntaxCheckers_ruby_GetLocList()
|
||||
let errorformat = '%-GSyntax OK,%E%f:%l: syntax error\, %m,%Z%p^,%W%f:%l: warning: %m,%Z%p^,%W%f:%l: %m,%-C%.%#'
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'ruby',
|
||||
\ 'name': 'macruby'})
|
||||
|
@ -21,12 +21,11 @@ if !exists("g:syntastic_ruby_exec")
|
||||
let g:syntastic_ruby_exec = s:FindRubyExec()
|
||||
endif
|
||||
|
||||
"bail if the user doesnt have ruby installed where they said it is
|
||||
if !executable(expand(g:syntastic_ruby_exec))
|
||||
finish
|
||||
endif
|
||||
function! SyntaxCheckers_ruby_mri_GetLocList()
|
||||
return executable(expand(g:syntastic_ruby_exec))
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_ruby_GetLocList()
|
||||
function! SyntaxCheckers_ruby_mri_GetLocList()
|
||||
let exe = expand(g:syntastic_ruby_exec)
|
||||
if !has('win32')
|
||||
let exe = 'RUBYOPT= ' . exe
|
||||
@ -55,3 +54,7 @@ function! SyntaxCheckers_ruby_GetLocList()
|
||||
let errorformat .= ',%Z%p^,%W%f:%l: warning: %m,%Z%p^,%W%f:%l: %m,%-C%.%#'
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'ruby',
|
||||
\ 'name': 'mri'})
|
||||
|
@ -10,12 +10,11 @@
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
"bail if the user doesnt have rustc installed
|
||||
if !executable("rustc")
|
||||
finish
|
||||
endif
|
||||
function! SyntaxCheckers_rust_rustc_IsAvailable()
|
||||
return executable("rustc")
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_rust_GetLocList()
|
||||
function! SyntaxCheckers_rust_rustc_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'rustc',
|
||||
\ 'args': '--parse-only' })
|
||||
@ -28,4 +27,6 @@ function! SyntaxCheckers_rust_GetLocList()
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
endfunction
|
||||
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'rust',
|
||||
\ 'name': 'rustc'})
|
@ -10,10 +10,9 @@
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
"bail if the user doesnt have the sass binary installed
|
||||
if !executable("sass")
|
||||
finish
|
||||
endif
|
||||
function! SyntaxCheckers_sass_sass_IsAvailable()
|
||||
return executable("sass")
|
||||
endfunction
|
||||
|
||||
"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
|
||||
@ -30,7 +29,7 @@ if executable("compass")
|
||||
let s:imports = "--compass"
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_sass_GetLocList()
|
||||
function! SyntaxCheckers_sass_sass_GetLocList()
|
||||
if !g:syntastic_sass_check_partials && expand('%:t')[0] == '_'
|
||||
return []
|
||||
end
|
||||
@ -43,3 +42,7 @@ function! SyntaxCheckers_sass_GetLocList()
|
||||
|
||||
return loclist
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'sass',
|
||||
\ 'name': 'sass'})
|
@ -10,16 +10,16 @@
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
"bail if the user doesnt have the scala binary installed
|
||||
if !executable("scalac")
|
||||
finish
|
||||
endif
|
||||
function! SyntaxCheckers_scala_scalac_IsAvailable()
|
||||
return executable("scalac")
|
||||
endfunction
|
||||
|
||||
if !exists("g:syntastic_scala_options")
|
||||
let g:syntastic_scala_options = " "
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_scala_GetLocList()
|
||||
|
||||
function! SyntaxCheckers_scala_scalac_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'scalac',
|
||||
\ 'args': '-Ystop-after:parser '. g:syntastic_scala_options })
|
||||
@ -29,3 +29,6 @@ function! SyntaxCheckers_scala_GetLocList()
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'scala',
|
||||
\ 'name': 'scalac'})
|
@ -11,13 +11,16 @@
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
"bail if the user doesnt have the sass binary installed
|
||||
if !executable("sass")
|
||||
finish
|
||||
endif
|
||||
runtime syntax_checkers/sass/sass.vim
|
||||
|
||||
runtime syntax_checkers/sass.vim
|
||||
|
||||
function! SyntaxCheckers_scss_GetLocList()
|
||||
return SyntaxCheckers_sass_GetLocList()
|
||||
function! SyntaxCheckers_scss_sass_IsAvailable()
|
||||
return executable("sass")
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_scss_sass_GetLocList()
|
||||
return SyntaxCheckers_sass_sass_GetLocList()
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'scss',
|
||||
\ 'name': 'sass'})
|
@ -29,18 +29,24 @@ endfunction
|
||||
|
||||
function! s:ForwardToZshChecker()
|
||||
if SyntasticCheckable('zsh')
|
||||
return SyntaxCheckers_zsh_GetLocList()
|
||||
return SyntaxCheckers_zsh_zsh_GetLocList()
|
||||
else
|
||||
return []
|
||||
endif
|
||||
|
||||
endfunction
|
||||
|
||||
|
||||
function! s:IsShellValid()
|
||||
return len(s:GetShell()) > 0 && executable(s:GetShell())
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_sh_GetLocList()
|
||||
|
||||
function! SyntaxCheckers_sh_sh_IsAvailable()
|
||||
return s:IsShellValid()
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_sh_sh_GetLocList()
|
||||
if s:GetShell() == 'zsh'
|
||||
return s:ForwardToZshChecker()
|
||||
endif
|
||||
@ -56,3 +62,7 @@ function! SyntaxCheckers_sh_GetLocList()
|
||||
let errorformat = '%f: line %l: %m'
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat})
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'sh',
|
||||
\ 'name': 'sh'})
|
@ -10,10 +10,9 @@
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
"bail if the user doesnt have the slim binary installed
|
||||
if !executable("slimrb")
|
||||
finish
|
||||
endif
|
||||
function! SyntaxCheckers_slim_slimrb_IsAvailable()
|
||||
return executable("slimrb")
|
||||
endfunction
|
||||
|
||||
function! s:SlimrbVersion()
|
||||
if !exists('s:slimrb_version')
|
||||
@ -25,7 +24,7 @@ function! s:SlimrbVersion()
|
||||
return s:slimrb_version
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_slim_GetLocList()
|
||||
function! SyntaxCheckers_slim_slimrb_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'slimrb',
|
||||
\ 'args': '-c' })
|
||||
@ -36,3 +35,7 @@ function! SyntaxCheckers_slim_GetLocList()
|
||||
endif
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'slim',
|
||||
\ 'name': 'slimrb'})
|
@ -1,17 +0,0 @@
|
||||
"============================================================================
|
||||
"File: tcl.vim
|
||||
"Description: Figures out which tcl syntax checker (if any) to load
|
||||
" from the tcl directory.
|
||||
"Maintainer: James Pickard <james.pickard 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.
|
||||
"
|
||||
" Use g:syntastic_tcl_checker option to specify which tcl checker executable
|
||||
" should be used (see below for a list of supported checkers).
|
||||
" If g:syntastic_tcl_checker is not set, just use the first syntax
|
||||
" checker that we find installed.
|
||||
"============================================================================
|
||||
call SyntasticLoadChecker('tcl')
|
@ -11,7 +11,11 @@
|
||||
" See nagelfar homepage http://nagelfar.berlios.de/.
|
||||
"
|
||||
"============================================================================
|
||||
function! SyntaxCheckers_tcl_GetLocList()
|
||||
function! SyntaxCheckers_tcl_nagelfar_IsAvailable()
|
||||
return executable('nagelfar')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_tcl_nagelfar_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'nagelfar',
|
||||
\ 'args': '-H ' . g:syntastic_tcl_nagelfar_conf,
|
||||
@ -20,3 +24,7 @@ function! SyntaxCheckers_tcl_GetLocList()
|
||||
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'tcl',
|
||||
\ 'name': 'nagelfar'})
|
||||
|
@ -10,14 +10,17 @@
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
"bail if the user doesnt have tclsh installed
|
||||
if !executable("tclsh")
|
||||
finish
|
||||
endif
|
||||
function! SyntaxCheckers_tcl_tclsh_IsAvailable()
|
||||
return executable('tclsh')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_tclsh_GetLocList()
|
||||
function! SyntaxCheckers_tcl_tclsh_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({'exe': 'tclsh'})
|
||||
let errorformat = '%f:%l:%m'
|
||||
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'tcl',
|
||||
\ 'name': 'tclsh'})
|
||||
|
@ -10,13 +10,16 @@
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
"bail if the user doesnt have lacheck installed
|
||||
if !executable("lacheck")
|
||||
finish
|
||||
endif
|
||||
function! SyntaxCheckers_tex_lacheck_IsAvailable()
|
||||
return executable("lacheck")
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_tex_GetLocList()
|
||||
function! SyntaxCheckers_tex_lacheck_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({ 'exe': 'lacheck' })
|
||||
let errorformat = '%-G** %f:,%E"%f"\, line %l: %m'
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'tex',
|
||||
\ 'name': 'lacheck'})
|
@ -15,8 +15,16 @@ function! SyntaxCheckers_twig_GetHighlightRegex(item)
|
||||
return '\V'
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_twig_GetLocList()
|
||||
function! SyntaxCheckers_twig_twiglint_IsAvailable()
|
||||
return executable('twig-lint')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_twig_twiglint_GetLocList()
|
||||
let makeprg = "twig-lint lint --format=csv ".shellescape(expand('%'))
|
||||
let errorformat = '"%f"\,%l\,%m'
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat})
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'twig',
|
||||
\ 'name': 'twiglint'})
|
@ -4,15 +4,19 @@
|
||||
"Maintainer: Bill Casarin <bill@casarin.ca>
|
||||
"============================================================================
|
||||
|
||||
"bail if the user doesnt have tsc installed
|
||||
if !executable("tsc")
|
||||
finish
|
||||
endif
|
||||
function! SyntaxCheckers_typescript_tsc_IsAvailable()
|
||||
return executable("tsc")
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_typescript_GetLocList()
|
||||
|
||||
function! SyntaxCheckers_typescript_tsc_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'tsc',
|
||||
\ 'post_args': '--out ' . syntastic#util#DevNull() })
|
||||
let errorformat = '%f %#(%l\,%c): %m'
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'typescript',
|
||||
\ 'name': 'tsc'})
|
@ -22,15 +22,11 @@
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
if !executable('valac')
|
||||
finish
|
||||
endif
|
||||
function! SyntaxCheckers_vala_valac_IsAvailable()
|
||||
return executable('valac') || (exists('g:syntastic_vala_check_disabled') && g:syntastic_vala_check_disabled)
|
||||
endfunction
|
||||
|
||||
if exists('g:syntastic_vala_check_disabled') && g:syntastic_vala_check_disabled
|
||||
finish
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_vala_GetHighlightRegex(pos)
|
||||
function! SyntaxCheckers_vala_valac_GetHighlightRegex(pos)
|
||||
let strlength = strlen(matchstr(a:pos['text'], '\^\+$'))
|
||||
return '\%>'.(a:pos.col-1).'c.*\%<'.(a:pos.col+strlength+1).'c'
|
||||
endfunction
|
||||
@ -51,7 +47,7 @@ function! s:GetValaModules()
|
||||
return split(strpart(modules_str, 12), '\s\+')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_vala_GetLocList()
|
||||
function! SyntaxCheckers_vala_valac_GetLocList()
|
||||
let vala_pkg_args = join(map(s:GetValaModules(), '"--pkg ".v:val'), ' ')
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'valac',
|
||||
@ -63,3 +59,6 @@ function! SyntaxCheckers_vala_GetLocList()
|
||||
\ 'defaults': {'force_highlight_callback': 1} })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'vala',
|
||||
\ 'name': 'valac'})
|
@ -10,10 +10,9 @@
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
"bail if the user doesnt have tidy or grep installed
|
||||
if !executable("tidy")
|
||||
finish
|
||||
endif
|
||||
function! SyntaxCheckers_xhtml_tidy_IsAvailable()
|
||||
return executable("tidy")
|
||||
endfunction
|
||||
|
||||
" TODO: join this with html.vim DRY's sake?
|
||||
function! s:TidyEncOptByFenc()
|
||||
@ -33,7 +32,7 @@ function! s:TidyEncOptByFenc()
|
||||
return get(tidy_opts, &fileencoding, '-utf8')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_xhtml_GetLocList()
|
||||
function! SyntaxCheckers_xhtml_tidy_GetLocList()
|
||||
let encopt = s:TidyEncOptByFenc()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'tidy',
|
||||
@ -41,3 +40,7 @@ function! SyntaxCheckers_xhtml_GetLocList()
|
||||
let errorformat='%Wline %l column %c - Warning: %m,%Eline %l column %c - Error: %m,%-G%.%#,%-G%.%#'
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'defaults': {'bufnr': bufnr("")} })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'xhtml',
|
||||
\ 'name': 'tidy'})
|
@ -14,12 +14,11 @@
|
||||
" and allow you to validate XML data without network access, see xmlcatalog(1)
|
||||
" and http://www.xmlsoft.org/catalog.html for more information.
|
||||
|
||||
"bail if the user doesnt have tidy or grep installed
|
||||
if !executable("xmllint")
|
||||
finish
|
||||
endif
|
||||
function! SyntaxCheckers_xml_xmllint_IsAvailable()
|
||||
return executable("xmllint")
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_xml_GetLocList()
|
||||
function! SyntaxCheckers_xml_xmllint_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'xmllint',
|
||||
\ 'args': '--xinclude --noout --postvalid' })
|
||||
@ -36,3 +35,7 @@ function! SyntaxCheckers_xml_GetLocList()
|
||||
|
||||
return loclist
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'xml',
|
||||
\ 'name': 'xmllint'})
|
@ -10,13 +10,11 @@
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
"bail if the user doesnt have tidy or grep installed
|
||||
if !executable("xmllint")
|
||||
finish
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_xslt_GetLocList()
|
||||
function! SyntaxCheckers_xslt_xmllint_GetLocList()
|
||||
return executable("xmllint")
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_xslt_xmllint_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'xmllint',
|
||||
\ 'args': '--xinclude --noout --postvalid' })
|
||||
@ -34,3 +32,7 @@ function! SyntaxCheckers_xslt_GetLocList()
|
||||
|
||||
return loclist
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'xslt',
|
||||
\ 'name': 'xmllint'})
|
@ -13,11 +13,11 @@
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
if !executable("js-yaml")
|
||||
finish
|
||||
endif
|
||||
function! SyntaxCheckers_yaml_jsyaml_GetLocList()
|
||||
return executable("js-yaml")
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_yaml_GetLocList()
|
||||
function! SyntaxCheckers_yaml_jsyaml_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'js-yaml',
|
||||
\ 'args': '--compact' })
|
||||
@ -26,3 +26,7 @@ function! SyntaxCheckers_yaml_GetLocList()
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'defaults': {'bufnr': bufnr("")} })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'yaml',
|
||||
\ 'name': 'jsyaml'})
|
@ -14,14 +14,17 @@
|
||||
"To obtain this application there are two solutions:
|
||||
" - Install this python package: https://github.com/rgiot/pycpcdemotools
|
||||
" - Copy/paste this script in your search path: https://raw.github.com/rgiot/pycpcdemotools/master/cpcdemotools/source_checker/z80_syntax_checker.py
|
||||
if !executable("z80_syntax_checker.py")
|
||||
finish
|
||||
endif
|
||||
function! SyntaxCheckers_z80_z80syntaxchecker_IsAvailable()
|
||||
return executable("z80_syntax_checker.py")
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_z80_GetLocList()
|
||||
function! SyntaxCheckers_z80_z80syntaxchecker_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({ 'exe': 'z80_syntax_checker.py' })
|
||||
let errorformat = '%f:%l %m'
|
||||
let loclist = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
return loclist
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'z80',
|
||||
\ 'name': 'z80syntaxchecker'})
|
@ -19,13 +19,16 @@
|
||||
" Then install the zptlint program, found on pypi:
|
||||
" http://pypi.python.org/pypi/zptlint
|
||||
|
||||
" Bail if the user doesn't have zptlint installed
|
||||
if !executable("zptlint")
|
||||
finish
|
||||
endif
|
||||
function! SyntaxCheckers_zpt_zptlint_GetLocList()
|
||||
return executable("zptlint")
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_zpt_GetLocList()
|
||||
function! SyntaxCheckers_zpt_zptlint_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({ 'exe': 'zptlint' })
|
||||
let errorformat='%-P*** Error in: %f,%Z%*\s\, at line %l\, column %c,%E%*\s%m,%-Q'
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'zpt',
|
||||
\ 'name': 'zptlint'})
|
@ -10,13 +10,16 @@
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
"bail if the user doesnt have zsh installed
|
||||
if !executable("zsh")
|
||||
finish
|
||||
endif
|
||||
function! SyntaxCheckers_zsh_zsh_IsAvailable()
|
||||
return executable("zsh")
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_zsh_GetLocList()
|
||||
function! SyntaxCheckers_zsh_zsh_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({ 'exe': 'zsh', 'args': '-n' })
|
||||
let errorformat = '%f:%l: %m'
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat})
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'zsh',
|
||||
\ 'name': 'zsh'})
|
Loading…
Reference in New Issue
Block a user