Registry cleanup, stage 1.
Make SyntaxCheckers_*_GetLocList() dictionary functions. Pass a reference to the current checker to syntastic#makeprg#build(). Add an optional 'redirect' argument to CreateAndRegisterChecker(). Change the sh checker to use the new dictionary functions. Add a new registry method getLocListRaw() (needed for the sh checker).
This commit is contained in:
parent
14cb306414
commit
28bce98a68
@ -38,13 +38,12 @@ let g:loaded_syntastic_makeprg_autoload = 1
|
|||||||
"
|
"
|
||||||
function! syntastic#makeprg#build(opts)
|
function! syntastic#makeprg#build(opts)
|
||||||
let builder = g:SyntasticMakeprgBuilder.New(
|
let builder = g:SyntasticMakeprgBuilder.New(
|
||||||
|
\ get(a:opts, 'checker', {}),
|
||||||
\ get(a:opts, 'exe', ''),
|
\ get(a:opts, 'exe', ''),
|
||||||
\ get(a:opts, 'args', ''),
|
\ get(a:opts, 'args', ''),
|
||||||
\ get(a:opts, 'fname', ''),
|
\ get(a:opts, 'fname', ''),
|
||||||
\ get(a:opts, 'post_args', ''),
|
\ get(a:opts, 'post_args', ''),
|
||||||
\ get(a:opts, 'tail', ''),
|
\ get(a:opts, 'tail', '') )
|
||||||
\ get(a:opts, 'filetype', ''),
|
|
||||||
\ get(a:opts, 'subchecker', '') )
|
|
||||||
|
|
||||||
return builder.makeprg()
|
return builder.makeprg()
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -13,8 +13,13 @@ function! g:SyntasticChecker.New(args)
|
|||||||
let newObj._filetype = a:args['filetype']
|
let newObj._filetype = a:args['filetype']
|
||||||
let newObj._name = a:args['name']
|
let newObj._name = a:args['name']
|
||||||
|
|
||||||
|
if has_key(a:args, 'redirect')
|
||||||
|
let [filetype, name] = split(a:args['redirect'], '/')
|
||||||
|
let prefix = 'SyntaxCheckers_' . filetype . '_' . name . '_'
|
||||||
|
else
|
||||||
|
let prefix = 'SyntaxCheckers_' . newObj._filetype . '_' . newObj._name . '_'
|
||||||
|
endif
|
||||||
|
|
||||||
let prefix = 'SyntaxCheckers_' . newObj._filetype . '_' . newObj._name . '_'
|
|
||||||
let newObj._locListFunc = function(prefix . 'GetLocList')
|
let newObj._locListFunc = function(prefix . 'GetLocList')
|
||||||
let newObj._isAvailableFunc = function(prefix . 'IsAvailable')
|
let newObj._isAvailableFunc = function(prefix . 'IsAvailable')
|
||||||
|
|
||||||
@ -47,6 +52,10 @@ function! g:SyntasticChecker.getLocList()
|
|||||||
return g:SyntasticLoclist.New(list)
|
return g:SyntasticLoclist.New(list)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! g:SyntasticChecker.getLocListRaw()
|
||||||
|
return self._locListFunc()
|
||||||
|
endfunction
|
||||||
|
|
||||||
function! g:SyntasticChecker.getHighlightRegexFor(error)
|
function! g:SyntasticChecker.getHighlightRegexFor(error)
|
||||||
if empty(self._highlightRegexFunc)
|
if empty(self._highlightRegexFunc)
|
||||||
return []
|
return []
|
||||||
|
@ -7,15 +7,22 @@ let g:SyntasticMakeprgBuilder = {}
|
|||||||
|
|
||||||
" Public methods {{{1
|
" Public methods {{{1
|
||||||
|
|
||||||
function! g:SyntasticMakeprgBuilder.New(exe, args, fname, post_args, tail, filetype, subchecker)
|
function! g:SyntasticMakeprgBuilder.New(checker, exe, args, fname, post_args, tail)
|
||||||
let newObj = copy(self)
|
let newObj = copy(self)
|
||||||
let newObj._exe = a:exe
|
let newObj._exe = a:exe
|
||||||
let newObj._args = a:args
|
let newObj._args = a:args
|
||||||
let newObj._fname = a:fname
|
let newObj._fname = a:fname
|
||||||
let newObj._post_args = a:post_args
|
let newObj._post_args = a:post_args
|
||||||
let newObj._tail = a:tail
|
let newObj._tail = a:tail
|
||||||
let newObj._filetype = empty(a:filetype) ? &filetype : a:filetype
|
|
||||||
let newObj._subchecker = a:subchecker
|
if has_key(a:checker, 'getName')
|
||||||
|
let newObj._filetype = a:checker.getFiletype()
|
||||||
|
let newObj._subchecker = a:checker.getName()
|
||||||
|
else
|
||||||
|
let newObj._filetype = &filetype
|
||||||
|
let newObj._subchecker = ''
|
||||||
|
endif
|
||||||
|
|
||||||
return newObj
|
return newObj
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ if !exists('g:syntastic_ada_compiler_options')
|
|||||||
let g:syntastic_ada_compiler_options = ''
|
let g:syntastic_ada_compiler_options = ''
|
||||||
endif
|
endif
|
||||||
|
|
||||||
function! SyntaxCheckers_ada_gcc_GetLocList()
|
function! SyntaxCheckers_ada_gcc_GetLocList() dict
|
||||||
return syntastic#c#GetLocList('ada', 'gcc', {
|
return syntastic#c#GetLocList('ada', 'gcc', {
|
||||||
\ 'errorformat':
|
\ 'errorformat':
|
||||||
\ '%-G%f:%s:,' .
|
\ '%-G%f:%s:,' .
|
||||||
|
@ -34,12 +34,11 @@ function! SyntaxCheckers_applescript_osacompile_IsAvailable()
|
|||||||
return executable('osacompile')
|
return executable('osacompile')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_applescript_osacompile_GetLocList()
|
function! SyntaxCheckers_applescript_osacompile_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'osacompile',
|
\ 'exe': 'osacompile',
|
||||||
\ 'args': '-o ' . tempname() . '.scpt ',
|
\ 'args': '-o ' . tempname() . '.scpt ',
|
||||||
\ 'filetype': 'applescript',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'osacompile' })
|
|
||||||
let errorformat = '%f:%l:%m'
|
let errorformat = '%f:%l:%m'
|
||||||
|
|
||||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||||
|
@ -19,12 +19,11 @@ function! SyntaxCheckers_asciidoc_asciidoc_IsAvailable()
|
|||||||
return executable("asciidoc")
|
return executable("asciidoc")
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_asciidoc_asciidoc_GetLocList()
|
function! SyntaxCheckers_asciidoc_asciidoc_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'asciidoc',
|
\ 'exe': 'asciidoc',
|
||||||
\ 'args': syntastic#c#NullOutput(),
|
\ 'args': syntastic#c#NullOutput(),
|
||||||
\ 'filetype': 'asciidoc',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'asciidoc' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%Easciidoc: %tRROR: %f: line %l: %m,' .
|
\ '%Easciidoc: %tRROR: %f: line %l: %m,' .
|
||||||
|
@ -25,12 +25,11 @@ function! SyntaxCheckers_c_checkpatch_IsAvailable()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
function! SyntaxCheckers_c_checkpatch_GetLocList()
|
function! SyntaxCheckers_c_checkpatch_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': g:syntastic_c_checker_checkpatch_location,
|
\ 'exe': g:syntastic_c_checker_checkpatch_location,
|
||||||
\ 'args': '--no-summary --no-tree --terse --file',
|
\ 'args': '--no-summary --no-tree --terse --file',
|
||||||
\ 'filetype': 'c',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'checkpatch' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%f:%l: %tARNING: %m,' .
|
\ '%f:%l: %tARNING: %m,' .
|
||||||
|
@ -31,7 +31,7 @@ if !exists('g:syntastic_c_compiler_options')
|
|||||||
let g:syntastic_c_compiler_options = '-std=gnu99'
|
let g:syntastic_c_compiler_options = '-std=gnu99'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
function! SyntaxCheckers_c_gcc_GetLocList()
|
function! SyntaxCheckers_c_gcc_GetLocList() dict
|
||||||
return syntastic#c#GetLocList('c', 'gcc', {
|
return syntastic#c#GetLocList('c', 'gcc', {
|
||||||
\ 'errorformat':
|
\ 'errorformat':
|
||||||
\ '%-G%f:%s:,' .
|
\ '%-G%f:%s:,' .
|
||||||
|
@ -22,7 +22,7 @@ endfunction
|
|||||||
let s:save_cpo = &cpo
|
let s:save_cpo = &cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
|
|
||||||
function! SyntaxCheckers_c_make_GetLocList()
|
function! SyntaxCheckers_c_make_GetLocList() dict
|
||||||
|
|
||||||
let makeprg = 'make -sk'
|
let makeprg = 'make -sk'
|
||||||
|
|
||||||
|
@ -29,13 +29,12 @@ if !exists('g:syntastic_oclint_config_file')
|
|||||||
let g:syntastic_oclint_config_file = '.syntastic_oclint_config'
|
let g:syntastic_oclint_config_file = '.syntastic_oclint_config'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
function! SyntaxCheckers_c_oclint_GetLocList()
|
function! SyntaxCheckers_c_oclint_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'oclint',
|
\ 'exe': 'oclint',
|
||||||
\ 'args': '-text',
|
\ 'args': '-text',
|
||||||
\ 'post_args': '-- -c ' . syntastic#c#ReadConfig(g:syntastic_oclint_config_file),
|
\ 'post_args': '-- -c ' . syntastic#c#ReadConfig(g:syntastic_oclint_config_file),
|
||||||
\ 'filetype': 'c',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'oclint' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%E%f:%l:%c: %m P1 ,' .
|
\ '%E%f:%l:%c: %m P1 ,' .
|
||||||
|
@ -29,12 +29,11 @@ if !exists('g:syntastic_sparse_config_file')
|
|||||||
let g:syntastic_sparse_config_file = '.syntastic_sparse_config'
|
let g:syntastic_sparse_config_file = '.syntastic_sparse_config'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
function! SyntaxCheckers_c_sparse_GetLocList()
|
function! SyntaxCheckers_c_sparse_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'sparse',
|
\ 'exe': 'sparse',
|
||||||
\ 'args': '-ftabstop=' . &ts . ' ' . syntastic#c#ReadConfig(g:syntastic_sparse_config_file),
|
\ 'args': '-ftabstop=' . &ts . ' ' . syntastic#c#ReadConfig(g:syntastic_sparse_config_file),
|
||||||
\ 'filetype': 'c',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'sparse' })
|
|
||||||
|
|
||||||
let errorformat = '%f:%l:%v: %trror: %m,%f:%l:%v: %tarning: %m,'
|
let errorformat = '%f:%l:%v: %trror: %m,%f:%l:%v: %tarning: %m,'
|
||||||
|
|
||||||
|
@ -29,12 +29,11 @@ if !exists('g:syntastic_splint_config_file')
|
|||||||
let g:syntastic_splint_config_file = '.syntastic_splint_config'
|
let g:syntastic_splint_config_file = '.syntastic_splint_config'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
function! SyntaxCheckers_c_splint_GetLocList()
|
function! SyntaxCheckers_c_splint_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'splint',
|
\ 'exe': 'splint',
|
||||||
\ 'post_args': '-showfunc -hints +quiet ' . syntastic#c#ReadConfig(g:syntastic_splint_config_file),
|
\ 'post_args': '-showfunc -hints +quiet ' . syntastic#c#ReadConfig(g:syntastic_splint_config_file),
|
||||||
\ 'filetype': 'c',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'splint' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%-G%f:%l:%v: %[%#]%[%#]%[%#] Internal Bug %.%#,' .
|
\ '%-G%f:%l:%v: %[%#]%[%#]%[%#] Internal Bug %.%#,' .
|
||||||
|
@ -23,7 +23,7 @@ if !exists('g:loaded_youcompleteme')
|
|||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
function! SyntaxCheckers_c_ycm_GetLocList()
|
function! SyntaxCheckers_c_ycm_GetLocList() dict
|
||||||
return youcompleteme#CurrentFileDiagnostics()
|
return youcompleteme#CurrentFileDiagnostics()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
@ -19,11 +19,10 @@ function! SyntaxCheckers_chef_foodcritic_IsAvailable()
|
|||||||
return executable('foodcritic')
|
return executable('foodcritic')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_chef_foodcritic_GetLocList()
|
function! SyntaxCheckers_chef_foodcritic_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'foodcritic',
|
\ 'exe': 'foodcritic',
|
||||||
\ 'filetype': 'chef',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'foodcritic' })
|
|
||||||
|
|
||||||
" FC023: Prefer conditional attributes: ./recipes/config.rb:49
|
" FC023: Prefer conditional attributes: ./recipes/config.rb:49
|
||||||
let errorformat = 'FC%n: %m: %f:%l'
|
let errorformat = 'FC%n: %m: %f:%l'
|
||||||
|
@ -23,12 +23,11 @@ function! SyntaxCheckers_co_coco_IsAvailable()
|
|||||||
return executable('coco')
|
return executable('coco')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_co_coco_GetLocList()
|
function! SyntaxCheckers_co_coco_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'coco',
|
\ 'exe': 'coco',
|
||||||
\ 'args': '-c -o /tmp',
|
\ 'args': '-c -o /tmp',
|
||||||
\ 'filetype': 'co',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'coco' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%EFailed at: %f,' .
|
\ '%EFailed at: %f,' .
|
||||||
|
@ -31,7 +31,7 @@ if !exists('g:syntastic_cobol_compiler_options')
|
|||||||
let g:syntastic_cobol_compiler_options = ''
|
let g:syntastic_cobol_compiler_options = ''
|
||||||
endif
|
endif
|
||||||
|
|
||||||
function! SyntaxCheckers_cobol_cobc_GetLocList()
|
function! SyntaxCheckers_cobol_cobc_GetLocList() dict
|
||||||
return syntastic#c#GetLocList('cobol', 'cobc', {
|
return syntastic#c#GetLocList('cobol', 'cobc', {
|
||||||
\ 'errorformat': '%f:%l: %trror: %m',
|
\ 'errorformat': '%f:%l: %trror: %m',
|
||||||
\ 'main_flags': '-fsyntax-only' })
|
\ 'main_flags': '-fsyntax-only' })
|
||||||
|
@ -22,12 +22,11 @@ function! SyntaxCheckers_coffee_coffee_IsAvailable()
|
|||||||
\ syntastic#util#versionIsAtLeast(syntastic#util#getVersion('coffee --version 2>' . syntastic#util#DevNull()), [1,6,2])
|
\ syntastic#util#versionIsAtLeast(syntastic#util#getVersion('coffee --version 2>' . syntastic#util#DevNull()), [1,6,2])
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_coffee_coffee_GetLocList()
|
function! SyntaxCheckers_coffee_coffee_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'coffee',
|
\ 'exe': 'coffee',
|
||||||
\ 'args': '-cp',
|
\ 'args': '-cp',
|
||||||
\ 'filetype': 'coffee',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'coffee' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%E%f:%l:%c: %trror: %m,' .
|
\ '%E%f:%l:%c: %trror: %m,' .
|
||||||
|
@ -18,12 +18,11 @@ function! SyntaxCheckers_coffee_coffeelint_IsAvailable()
|
|||||||
return executable('coffeelint')
|
return executable('coffeelint')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_coffee_coffeelint_GetLocList()
|
function! SyntaxCheckers_coffee_coffeelint_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'coffeelint',
|
\ 'exe': 'coffeelint',
|
||||||
\ 'args': '--csv',
|
\ 'args': '--csv',
|
||||||
\ 'filetype': 'coffee',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'coffeelint' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%f\,%l\,%\d%#\,%trror\,%m,' .
|
\ '%f\,%l\,%\d%#\,%trror\,%m,' .
|
||||||
|
@ -19,12 +19,11 @@ function! SyntaxCheckers_coq_coqtop_IsAvailable()
|
|||||||
return executable('coqtop')
|
return executable('coqtop')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_coq_coqtop_GetLocList()
|
function! SyntaxCheckers_coq_coqtop_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'coqtop',
|
\ 'exe': 'coqtop',
|
||||||
\ 'args': '-noglob -batch -load-vernac-source',
|
\ 'args': '-noglob -batch -load-vernac-source',
|
||||||
\ 'filetype': 'coq',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'coqtop' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%AFile \"%f\"\, line %l\, characters %c\-%.%#\:,'.
|
\ '%AFile \"%f\"\, line %l\, characters %c\-%.%#\:,'.
|
||||||
|
@ -39,11 +39,10 @@ function! SyntaxCheckers_cpp_cpplint_IsAvailable()
|
|||||||
return executable('cpplint.py')
|
return executable('cpplint.py')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_cpp_cpplint_GetLocList()
|
function! SyntaxCheckers_cpp_cpplint_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'cpplint.py',
|
\ 'exe': 'cpplint.py',
|
||||||
\ 'filetype': 'cpp',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'cpplint' })
|
|
||||||
|
|
||||||
let errorformat = '%A%f:%l: %m [%t],%-G%.%#'
|
let errorformat = '%A%f:%l: %m [%t],%-G%.%#'
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ if !exists('g:syntastic_cpp_compiler_options')
|
|||||||
let g:syntastic_cpp_compiler_options = ''
|
let g:syntastic_cpp_compiler_options = ''
|
||||||
endif
|
endif
|
||||||
|
|
||||||
function! SyntaxCheckers_cpp_gcc_GetLocList()
|
function! SyntaxCheckers_cpp_gcc_GetLocList() dict
|
||||||
return syntastic#c#GetLocList('cpp', 'gcc', {
|
return syntastic#c#GetLocList('cpp', 'gcc', {
|
||||||
\ 'errorformat':
|
\ 'errorformat':
|
||||||
\ '%-G%f:%s:,' .
|
\ '%-G%f:%s:,' .
|
||||||
|
@ -21,16 +21,9 @@ if exists("g:loaded_syntastic_cpp_oclint_checker")
|
|||||||
endif
|
endif
|
||||||
let g:loaded_syntastic_cpp_oclint_checker = 1
|
let g:loaded_syntastic_cpp_oclint_checker = 1
|
||||||
|
|
||||||
function! SyntaxCheckers_cpp_oclint_IsAvailable()
|
runtime! syntax_checkers/c/*.vim
|
||||||
return SyntaxCheckers_c_oclint_IsAvailable()
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! SyntaxCheckers_cpp_oclint_GetLocList()
|
|
||||||
return SyntaxCheckers_c_oclint_GetLocList()
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||||
\ 'filetype': 'cpp',
|
\ 'filetype': 'cpp',
|
||||||
\ 'name': 'oclint'})
|
\ 'name': 'oclint',
|
||||||
|
\ 'redirect': 'c/oclint'})
|
||||||
runtime! syntax_checkers/c/*.vim
|
|
||||||
|
@ -15,20 +15,13 @@ if exists("g:loaded_syntastic_cpp_ycm_checker")
|
|||||||
endif
|
endif
|
||||||
let g:loaded_syntastic_cpp_ycm_checker = 1
|
let g:loaded_syntastic_cpp_ycm_checker = 1
|
||||||
|
|
||||||
function! SyntaxCheckers_cpp_ycm_IsAvailable()
|
runtime! syntax_checkers/c/*.vim
|
||||||
return SyntaxCheckers_c_ycm_IsAvailable()
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
if !exists('g:loaded_youcompleteme')
|
if !exists('g:loaded_youcompleteme')
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
function! SyntaxCheckers_cpp_ycm_GetLocList()
|
|
||||||
return SyntaxCheckers_c_ycm_GetLocList()
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||||
\ 'filetype': 'cpp',
|
\ 'filetype': 'cpp',
|
||||||
\ 'name': 'ycm'})
|
\ 'name': 'ycm',
|
||||||
|
\ 'redirect': 'c/ycm'})
|
||||||
runtime! syntax_checkers/c/*.vim
|
|
||||||
|
@ -19,12 +19,11 @@ function! SyntaxCheckers_cs_mcs_IsAvailable()
|
|||||||
return executable('mcs')
|
return executable('mcs')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_cs_mcs_GetLocList()
|
function! SyntaxCheckers_cs_mcs_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'mcs',
|
\ 'exe': 'mcs',
|
||||||
\ 'args': '--parse',
|
\ 'args': '--parse',
|
||||||
\ 'filetype': 'cs',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'mcs' })
|
|
||||||
|
|
||||||
let errorformat = '%f(%l\,%c): %trror %m'
|
let errorformat = '%f(%l\,%c): %trror %m'
|
||||||
|
|
||||||
|
@ -31,12 +31,11 @@ function! SyntaxCheckers_css_csslint_IsAvailable()
|
|||||||
return executable(expand(g:syntastic_csslint_exec))
|
return executable(expand(g:syntastic_csslint_exec))
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_css_csslint_GetLocList()
|
function! SyntaxCheckers_css_csslint_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': expand(g:syntastic_csslint_exec),
|
\ 'exe': expand(g:syntastic_csslint_exec),
|
||||||
\ 'args': '--format=compact ' . g:syntastic_csslint_options,
|
\ 'args': '--format=compact ' . g:syntastic_csslint_options,
|
||||||
\ 'filetype': 'css',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'csslint' })
|
|
||||||
|
|
||||||
" Print CSS Lint's error/warning messages from compact format. Ignores blank lines.
|
" Print CSS Lint's error/warning messages from compact format. Ignores blank lines.
|
||||||
let errorformat =
|
let errorformat =
|
||||||
|
@ -18,16 +18,9 @@ if exists("g:loaded_syntastic_css_phpcs_checker")
|
|||||||
endif
|
endif
|
||||||
let g:loaded_syntastic_css_phpcs_checker=1
|
let g:loaded_syntastic_css_phpcs_checker=1
|
||||||
|
|
||||||
function! SyntaxCheckers_css_phpcs_IsAvailable()
|
runtime! syntax_checkers/php/*.vim
|
||||||
return SyntaxCheckers_php_phpcs_IsAvailable()
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! SyntaxCheckers_css_phpcs_GetLocList()
|
|
||||||
return SyntaxCheckers_php_phpcs_GetLocList()
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||||
\ 'filetype': 'css',
|
\ 'filetype': 'css',
|
||||||
\ 'name': 'phpcs'})
|
\ 'name': 'phpcs',
|
||||||
|
\ 'redirect': 'php/phpcs'})
|
||||||
runtime! syntax_checkers/php/*.vim
|
|
||||||
|
@ -32,11 +32,10 @@ function! SyntaxCheckers_css_prettycss_GetHighlightRegex(item)
|
|||||||
return term
|
return term
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_css_prettycss_GetLocList()
|
function! SyntaxCheckers_css_prettycss_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'prettycss',
|
\ 'exe': 'prettycss',
|
||||||
\ 'filetype': 'css',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'prettycss' })
|
|
||||||
|
|
||||||
" Print CSS Lint's error/warning messages from compact format. Ignores blank lines.
|
" Print CSS Lint's error/warning messages from compact format. Ignores blank lines.
|
||||||
let errorformat =
|
let errorformat =
|
||||||
|
@ -19,12 +19,11 @@ function! SyntaxCheckers_cucumber_cucumber_IsAvailable()
|
|||||||
return executable('cucumber')
|
return executable('cucumber')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_cucumber_cucumber_GetLocList()
|
function! SyntaxCheckers_cucumber_cucumber_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'cucumber',
|
\ 'exe': 'cucumber',
|
||||||
\ 'args': '--dry-run --quiet --strict --format pretty',
|
\ 'args': '--dry-run --quiet --strict --format pretty',
|
||||||
\ 'filetype': 'cucumber',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'cucumber' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%f:%l:%c:%m,' .
|
\ '%f:%l:%c:%m,' .
|
||||||
|
@ -28,7 +28,7 @@ function! SyntaxCheckers_cuda_nvcc_IsAvailable()
|
|||||||
return executable('nvcc')
|
return executable('nvcc')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_cuda_nvcc_GetLocList()
|
function! SyntaxCheckers_cuda_nvcc_GetLocList() dict
|
||||||
if exists('g:syntastic_cuda_arch')
|
if exists('g:syntastic_cuda_arch')
|
||||||
let arch_flag = '-arch=' . g:syntastic_cuda_arch
|
let arch_flag = '-arch=' . g:syntastic_cuda_arch
|
||||||
else
|
else
|
||||||
|
@ -35,7 +35,7 @@ if !exists('g:syntastic_d_compiler_options')
|
|||||||
let g:syntastic_d_compiler_options = ''
|
let g:syntastic_d_compiler_options = ''
|
||||||
endif
|
endif
|
||||||
|
|
||||||
function! SyntaxCheckers_d_dmd_GetLocList()
|
function! SyntaxCheckers_d_dmd_GetLocList() dict
|
||||||
return syntastic#c#GetLocList('d', 'dmd', {
|
return syntastic#c#GetLocList('d', 'dmd', {
|
||||||
\ 'errorformat':
|
\ 'errorformat':
|
||||||
\ '%-G%f:%s:,%f(%l): %m,' .
|
\ '%-G%f:%s:,%f(%l): %m,' .
|
||||||
|
@ -28,14 +28,13 @@ function! SyntaxCheckers_dart_dart_analyzer_GetHighlightRegex(error)
|
|||||||
return '\%>'.lcol.'c\%<'.rcol.'c'
|
return '\%>'.lcol.'c\%<'.rcol.'c'
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_dart_dart_analyzer_GetLocList()
|
function! SyntaxCheckers_dart_dart_analyzer_GetLocList() dict
|
||||||
let args = !empty(g:syntastic_dart_analyzer_conf) ? ' ' . g:syntastic_dart_analyzer_conf : ''
|
let args = !empty(g:syntastic_dart_analyzer_conf) ? ' ' . g:syntastic_dart_analyzer_conf : ''
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'dart_analyzer',
|
\ 'exe': 'dart_analyzer',
|
||||||
\ 'args': '--error_format machine',
|
\ 'args': '--error_format machine',
|
||||||
\ 'post_args': args,
|
\ 'post_args': args,
|
||||||
\ 'filetype': 'dart',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'dart_analyzer' })
|
|
||||||
|
|
||||||
" Machine readable format looks like:
|
" Machine readable format looks like:
|
||||||
" SEVERITY|TYPE|ERROR_CODE|file:FILENAME|LINE_NUMBER|COLUMN|LENGTH|MESSAGE
|
" SEVERITY|TYPE|ERROR_CODE|file:FILENAME|LINE_NUMBER|COLUMN|LENGTH|MESSAGE
|
||||||
|
@ -15,16 +15,9 @@ if exists("g:loaded_syntastic_docbk_xmllint_checker")
|
|||||||
endif
|
endif
|
||||||
let g:loaded_syntastic_docbk_xmllint_checker=1
|
let g:loaded_syntastic_docbk_xmllint_checker=1
|
||||||
|
|
||||||
function! SyntaxCheckers_docbk_xmllint_IsAvailable()
|
runtime! syntax_checkers/xml/*.vim
|
||||||
return SyntaxCheckers_xml_xmllint_IsAvailable()
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! SyntaxCheckers_docbk_xmllint_GetLocList()
|
|
||||||
return SyntaxCheckers_xml_xmllint_GetLocList()
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||||
\ 'filetype': 'docbk',
|
\ 'filetype': 'docbk',
|
||||||
\ 'name': 'xmllint'})
|
\ 'name': 'xmllint',
|
||||||
|
\ 'redirect': 'xml/xmllint'})
|
||||||
runtime! syntax_checkers/xml/*.vim
|
|
||||||
|
@ -19,11 +19,10 @@ function! SyntaxCheckers_dustjs_swiffer_IsAvailable()
|
|||||||
return executable('swiffer')
|
return executable('swiffer')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_dustjs_swiffer_GetLocList()
|
function! SyntaxCheckers_dustjs_swiffer_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'swiffer',
|
\ 'exe': 'swiffer',
|
||||||
\ 'subchecker': 'swiffer',
|
\ 'checker': self })
|
||||||
\ 'filetype': 'dustjs' })
|
|
||||||
|
|
||||||
let errorformat = '%E%f - Line %l\, Column %c: %m'
|
let errorformat = '%E%f - Line %l\, Column %c: %m'
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ function! SyntaxCheckers_elixir_elixir_IsAvailable()
|
|||||||
return executable('elixir') && executable('mix')
|
return executable('elixir') && executable('mix')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_elixir_elixir_GetLocList()
|
function! SyntaxCheckers_elixir_elixir_GetLocList() dict
|
||||||
|
|
||||||
let make_options = {}
|
let make_options = {}
|
||||||
let compile_command = 'elixir'
|
let compile_command = 'elixir'
|
||||||
@ -32,8 +32,7 @@ function! SyntaxCheckers_elixir_elixir_GetLocList()
|
|||||||
|
|
||||||
let make_options['makeprg'] = syntastic#makeprg#build({
|
let make_options['makeprg'] = syntastic#makeprg#build({
|
||||||
\ 'exe': compile_command,
|
\ 'exe': compile_command,
|
||||||
\ 'filetype': 'elixir',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'elixir' })
|
|
||||||
|
|
||||||
let make_options['errorformat'] = '** %*[^\ ] %f:%l: %m'
|
let make_options['errorformat'] = '** %*[^\ ] %f:%l: %m'
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ function! SyntaxCheckers_erlang_escript_IsAvailable()
|
|||||||
return executable('escript')
|
return executable('escript')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_erlang_escript_GetLocList()
|
function! SyntaxCheckers_erlang_escript_GetLocList() dict
|
||||||
if expand('%:e') ==# 'hrl'
|
if expand('%:e') ==# 'hrl'
|
||||||
return []
|
return []
|
||||||
endif
|
endif
|
||||||
@ -43,8 +43,7 @@ function! SyntaxCheckers_erlang_escript_GetLocList()
|
|||||||
\ 'args': args,
|
\ 'args': args,
|
||||||
\ 'fname': syntastic#util#shexpand('%:p'),
|
\ 'fname': syntastic#util#shexpand('%:p'),
|
||||||
\ 'post_args': post_args,
|
\ 'post_args': post_args,
|
||||||
\ 'filetype': 'erlang',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'escript' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%W%f:%l: warning: %m,'.
|
\ '%W%f:%l: warning: %m,'.
|
||||||
|
@ -23,7 +23,7 @@ function! SyntaxCheckers_eruby_ruby_IsAvailable()
|
|||||||
return executable(expand(g:syntastic_ruby_exec))
|
return executable(expand(g:syntastic_ruby_exec))
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_eruby_ruby_GetLocList()
|
function! SyntaxCheckers_eruby_ruby_GetLocList() dict
|
||||||
let exe = expand(g:syntastic_ruby_exec)
|
let exe = expand(g:syntastic_ruby_exec)
|
||||||
if !has('win32')
|
if !has('win32')
|
||||||
let exe = 'RUBYOPT= ' . exe
|
let exe = 'RUBYOPT= ' . exe
|
||||||
|
@ -30,7 +30,7 @@ if !exists('g:syntastic_fortran_compiler_options')
|
|||||||
let g:syntastic_fortran_compiler_options = ''
|
let g:syntastic_fortran_compiler_options = ''
|
||||||
endif
|
endif
|
||||||
|
|
||||||
function! SyntaxCheckers_fortran_gfortran_GetLocList()
|
function! SyntaxCheckers_fortran_gfortran_GetLocList() dict
|
||||||
return syntastic#c#GetLocList('fortran', 'gfortran', {
|
return syntastic#c#GetLocList('fortran', 'gfortran', {
|
||||||
\ 'errorformat':
|
\ 'errorformat':
|
||||||
\ '%-C %#,'.
|
\ '%-C %#,'.
|
||||||
|
@ -21,7 +21,7 @@ function! SyntaxCheckers_go_go_IsAvailable()
|
|||||||
return executable('go')
|
return executable('go')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_go_go_GetLocList()
|
function! SyntaxCheckers_go_go_GetLocList() dict
|
||||||
" Check with gofmt first, since `go build` and `go test` might not report
|
" 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
|
" syntax errors in the current file if another file with syntax error is
|
||||||
" compiled first.
|
" compiled first.
|
||||||
@ -29,8 +29,7 @@ function! SyntaxCheckers_go_go_GetLocList()
|
|||||||
\ 'exe': 'gofmt',
|
\ 'exe': 'gofmt',
|
||||||
\ 'args': '-l',
|
\ 'args': '-l',
|
||||||
\ 'tail': '1>' . syntastic#util#DevNull(),
|
\ 'tail': '1>' . syntastic#util#DevNull(),
|
||||||
\ 'filetype': 'go',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'go' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%f:%l:%c: %m,' .
|
\ '%f:%l:%c: %m,' .
|
||||||
|
@ -21,13 +21,12 @@ function! SyntaxCheckers_go_gofmt_IsAvailable()
|
|||||||
return executable('gofmt')
|
return executable('gofmt')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_go_gofmt_GetLocList()
|
function! SyntaxCheckers_go_gofmt_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'gofmt',
|
\ 'exe': 'gofmt',
|
||||||
\ 'args': '-l',
|
\ 'args': '-l',
|
||||||
\ 'tail': '1>' . syntastic#util#DevNull(),
|
\ 'tail': '1>' . syntastic#util#DevNull(),
|
||||||
\ 'filetype': 'go',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'gofmt' })
|
|
||||||
|
|
||||||
let errorformat = '%f:%l:%c: %m,%-G%.%#'
|
let errorformat = '%f:%l:%c: %m,%-G%.%#'
|
||||||
|
|
||||||
|
@ -18,11 +18,10 @@ function! SyntaxCheckers_go_golint_IsAvailable()
|
|||||||
return executable('golint')
|
return executable('golint')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_go_golint_GetLocList()
|
function! SyntaxCheckers_go_golint_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'golint',
|
\ 'exe': 'golint',
|
||||||
\ 'filetype': 'go',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'golint' })
|
|
||||||
|
|
||||||
let errorformat = '%f:%l:%c: %m,%-G%.%#'
|
let errorformat = '%f:%l:%c: %m,%-G%.%#'
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ function! SyntaxCheckers_go_govet_IsAvailable()
|
|||||||
return executable('go')
|
return executable('go')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_go_govet_GetLocList()
|
function! SyntaxCheckers_go_govet_GetLocList() dict
|
||||||
let makeprg = 'go vet'
|
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%.%#'
|
||||||
|
|
||||||
|
@ -23,12 +23,11 @@ function! SyntaxCheckers_haml_haml_IsAvailable()
|
|||||||
return executable(expand(g:syntastic_haml_interpreter))
|
return executable(expand(g:syntastic_haml_interpreter))
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_haml_haml_GetLocList()
|
function! SyntaxCheckers_haml_haml_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': expand(g:syntastic_haml_interpreter),
|
\ 'exe': expand(g:syntastic_haml_interpreter),
|
||||||
\ 'args': '-c',
|
\ 'args': '-c',
|
||||||
\ 'filetype': 'haml',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'haml' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ 'Haml error on line %l: %m,' .
|
\ 'Haml error on line %l: %m,' .
|
||||||
|
@ -17,12 +17,11 @@ function! SyntaxCheckers_handlebars_handlebars_IsAvailable()
|
|||||||
return executable('handlebars')
|
return executable('handlebars')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_handlebars_handlebars_GetLocList()
|
function! SyntaxCheckers_handlebars_handlebars_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'handlebars',
|
\ 'exe': 'handlebars',
|
||||||
\ 'args': '-f ' . syntastic#util#DevNull(),
|
\ 'args': '-f ' . syntastic#util#DevNull(),
|
||||||
\ 'filetype': 'handlebars',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'handlebars' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%EError: %m on line %l:,'.
|
\ '%EError: %m on line %l:,'.
|
||||||
|
@ -19,11 +19,10 @@ function! SyntaxCheckers_haskell_ghc_mod_IsAvailable()
|
|||||||
return executable('ghc-mod')
|
return executable('ghc-mod')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_haskell_ghc_mod_GetLocList()
|
function! SyntaxCheckers_haskell_ghc_mod_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'ghc-mod check',
|
\ 'exe': 'ghc-mod check',
|
||||||
\ 'filetype': 'haskell',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'ghc_mod' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%-G%\s%#,' .
|
\ '%-G%\s%#,' .
|
||||||
|
@ -19,12 +19,11 @@ function! SyntaxCheckers_haskell_hdevtools_IsAvailable()
|
|||||||
return executable('hdevtools')
|
return executable('hdevtools')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_haskell_hdevtools_GetLocList()
|
function! SyntaxCheckers_haskell_hdevtools_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'hdevtools check',
|
\ 'exe': 'hdevtools check',
|
||||||
\ 'args': get(g:, 'hdevtools_options', ''),
|
\ 'args': get(g:, 'hdevtools_options', ''),
|
||||||
\ 'filetype': 'haskell',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'hdevtools' })
|
|
||||||
|
|
||||||
let errorformat= '\%-Z\ %#,'.
|
let errorformat= '\%-Z\ %#,'.
|
||||||
\ '%W%f:%l:%c:\ Warning:\ %m,'.
|
\ '%W%f:%l:%c:\ Warning:\ %m,'.
|
||||||
|
@ -14,11 +14,10 @@ function! SyntaxCheckers_haskell_hlint_IsAvailable()
|
|||||||
return executable('hlint')
|
return executable('hlint')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_haskell_hlint_GetLocList()
|
function! SyntaxCheckers_haskell_hlint_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'hlint',
|
\ 'exe': 'hlint',
|
||||||
\ 'filetype': 'haskell',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'hlint' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%E%f:%l:%c: Error: %m,' .
|
\ '%E%f:%l:%c: Error: %m,' .
|
||||||
|
@ -19,7 +19,7 @@ function! SyntaxCheckers_haxe_haxe_IsAvailable()
|
|||||||
return executable('haxe')
|
return executable('haxe')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_haxe_haxe_GetLocList()
|
function! SyntaxCheckers_haxe_haxe_GetLocList() dict
|
||||||
if exists('b:vaxe_hxml')
|
if exists('b:vaxe_hxml')
|
||||||
let hxml = b:vaxe_hxml
|
let hxml = b:vaxe_hxml
|
||||||
elseif exists('g:vaxe_hxml')
|
elseif exists('g:vaxe_hxml')
|
||||||
@ -33,8 +33,7 @@ function! SyntaxCheckers_haxe_haxe_GetLocList()
|
|||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'haxe',
|
\ 'exe': 'haxe',
|
||||||
\ 'fname': syntastic#util#shescape(fnameescape(fnamemodify(hxml, ':t'))),
|
\ 'fname': syntastic#util#shescape(fnameescape(fnamemodify(hxml, ':t'))),
|
||||||
\ 'filetype': 'haxe',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'haxe' })
|
|
||||||
|
|
||||||
let errorformat = '%E%f:%l: characters %c-%*[0-9] : %m'
|
let errorformat = '%E%f:%l: characters %c-%*[0-9] : %m'
|
||||||
|
|
||||||
|
@ -19,12 +19,11 @@ function! SyntaxCheckers_hss_hss_IsAvailable()
|
|||||||
return executable('hss')
|
return executable('hss')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_hss_hss_GetLocList()
|
function! SyntaxCheckers_hss_hss_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'hss',
|
\ 'exe': 'hss',
|
||||||
\ 'args' : '-output ' . syntastic#util#DevNull(),
|
\ 'args' : '-output ' . syntastic#util#DevNull(),
|
||||||
\ 'filetype': 'hss',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'hss' })
|
|
||||||
|
|
||||||
let errorformat = '%E%f:%l: %m'
|
let errorformat = '%E%f:%l: %m'
|
||||||
|
|
||||||
|
@ -139,13 +139,12 @@ function! s:Args()
|
|||||||
return args
|
return args
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_html_tidy_GetLocList()
|
function! SyntaxCheckers_html_tidy_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'tidy',
|
\ 'exe': 'tidy',
|
||||||
\ 'args': s:Args(),
|
\ 'args': s:Args(),
|
||||||
\ 'tail': '2>&1',
|
\ 'tail': '2>&1',
|
||||||
\ 'filetype': 'html',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'tidy' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%Wline %l column %v - Warning: %m,' .
|
\ '%Wline %l column %v - Warning: %m,' .
|
||||||
|
@ -64,7 +64,7 @@ function! SyntaxCheckers_html_validator_Preprocess(errors)
|
|||||||
return out
|
return out
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_html_validator_GetLocList()
|
function! SyntaxCheckers_html_validator_GetLocList() dict
|
||||||
let fname = syntastic#util#shexpand('%')
|
let fname = syntastic#util#shexpand('%')
|
||||||
let makeprg = 'curl -s --compressed -F out=gnu -F asciiquotes=yes' .
|
let makeprg = 'curl -s --compressed -F out=gnu -F asciiquotes=yes' .
|
||||||
\ (!empty(g:syntastic_html_validator_parser) ? ' -F parser=' . g:syntastic_html_validator_parser : '') .
|
\ (!empty(g:syntastic_html_validator_parser) ? ' -F parser=' . g:syntastic_html_validator_parser : '') .
|
||||||
|
@ -30,7 +30,7 @@ function! SyntaxCheckers_html_w3_IsAvailable()
|
|||||||
return executable('curl')
|
return executable('curl')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_html_w3_GetLocList()
|
function! SyntaxCheckers_html_w3_GetLocList() dict
|
||||||
let makeprg = 'curl -s -F output=json ' .
|
let makeprg = 'curl -s -F output=json ' .
|
||||||
\ '-F uploaded_file=@' . syntastic#util#shexpand('%:p') . '\;type=text/html ' .
|
\ '-F uploaded_file=@' . syntastic#util#shexpand('%:p') . '\;type=text/html ' .
|
||||||
\ g:syntastic_html_w3_api
|
\ g:syntastic_html_w3_api
|
||||||
|
@ -39,7 +39,7 @@ function! SyntaxCheckers_java_checkstyle_Preprocess(errors)
|
|||||||
return out
|
return out
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_java_checkstyle_GetLocList()
|
function! SyntaxCheckers_java_checkstyle_GetLocList() dict
|
||||||
|
|
||||||
let fname = syntastic#util#shescape( expand('%:p:h') . '/' . expand('%:t') )
|
let fname = syntastic#util#shescape( expand('%:p:h') . '/' . expand('%:t') )
|
||||||
|
|
||||||
@ -53,8 +53,7 @@ function! SyntaxCheckers_java_checkstyle_GetLocList()
|
|||||||
\ ' com.puppycrawl.tools.checkstyle.Main -c ' . g:syntastic_java_checkstyle_conf_file .
|
\ ' com.puppycrawl.tools.checkstyle.Main -c ' . g:syntastic_java_checkstyle_conf_file .
|
||||||
\ ' -f xml',
|
\ ' -f xml',
|
||||||
\ 'fname': fname,
|
\ 'fname': fname,
|
||||||
\ 'filetype': 'java',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'checkstyle' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%P<file name="%f">,' .
|
\ '%P<file name="%f">,' .
|
||||||
|
@ -267,7 +267,7 @@ function! s:MavenOutputDirectory()
|
|||||||
return '.'
|
return '.'
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_java_javac_GetLocList()
|
function! SyntaxCheckers_java_javac_GetLocList() dict
|
||||||
|
|
||||||
let javac_opts = g:syntastic_java_javac_options
|
let javac_opts = g:syntastic_java_javac_options
|
||||||
|
|
||||||
@ -335,8 +335,7 @@ function! SyntaxCheckers_java_javac_GetLocList()
|
|||||||
\ 'args': javac_opts,
|
\ 'args': javac_opts,
|
||||||
\ 'fname': fname,
|
\ 'fname': fname,
|
||||||
\ 'tail': '2>&1',
|
\ 'tail': '2>&1',
|
||||||
\ 'filetype': 'java',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'javac' })
|
|
||||||
|
|
||||||
" unashamedly stolen from *errorformat-javac* (quickfix.txt) and modified to include error types
|
" unashamedly stolen from *errorformat-javac* (quickfix.txt) and modified to include error types
|
||||||
let errorformat =
|
let errorformat =
|
||||||
|
@ -34,7 +34,7 @@ function! SyntaxCheckers_javascript_closurecompiler_IsAvailable()
|
|||||||
return exists("g:syntastic_javascript_closure_compiler_path")
|
return exists("g:syntastic_javascript_closure_compiler_path")
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_javascript_closurecompiler_GetLocList()
|
function! SyntaxCheckers_javascript_closurecompiler_GetLocList() dict
|
||||||
if exists("g:syntastic_javascript_closure_compiler_file_list")
|
if exists("g:syntastic_javascript_closure_compiler_file_list")
|
||||||
let file_list = join(readfile(g:syntastic_javascript_closure_compiler_file_list), ' ')
|
let file_list = join(readfile(g:syntastic_javascript_closure_compiler_file_list), ' ')
|
||||||
else
|
else
|
||||||
@ -45,8 +45,7 @@ function! SyntaxCheckers_javascript_closurecompiler_GetLocList()
|
|||||||
\ 'exe': 'java -jar ' . g:syntastic_javascript_closure_compiler_path,
|
\ 'exe': 'java -jar ' . g:syntastic_javascript_closure_compiler_path,
|
||||||
\ 'args': g:syntastic_javascript_closure_compiler_options . ' --js' ,
|
\ 'args': g:syntastic_javascript_closure_compiler_options . ' --js' ,
|
||||||
\ 'fname': file_list,
|
\ 'fname': file_list,
|
||||||
\ 'filetype': 'javascript',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'closurecompiler' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%-GOK,'.
|
\ '%-GOK,'.
|
||||||
|
@ -21,12 +21,11 @@ function! SyntaxCheckers_javascript_gjslint_IsAvailable()
|
|||||||
return executable('gjslint')
|
return executable('gjslint')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_javascript_gjslint_GetLocList()
|
function! SyntaxCheckers_javascript_gjslint_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'gjslint',
|
\ 'exe': 'gjslint',
|
||||||
\ 'args': g:syntastic_javascript_gjslint_conf . " --nosummary --unix_mode --nodebug_indentation --nobeep",
|
\ 'args': g:syntastic_javascript_gjslint_conf . " --nosummary --unix_mode --nodebug_indentation --nobeep",
|
||||||
\ 'filetype': 'javascript',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'gjslint' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ "%f:%l:(New Error -%\\?\%n) %m," .
|
\ "%f:%l:(New Error -%\\?\%n) %m," .
|
||||||
|
@ -26,13 +26,12 @@ function! SyntaxCheckers_javascript_jshint_IsAvailable()
|
|||||||
return executable(expand(g:syntastic_jshint_exec))
|
return executable(expand(g:syntastic_jshint_exec))
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_javascript_jshint_GetLocList()
|
function! SyntaxCheckers_javascript_jshint_GetLocList() dict
|
||||||
let jshint_new = s:JshintNew()
|
let jshint_new = s:JshintNew()
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': expand(g:syntastic_jshint_exec),
|
\ 'exe': expand(g:syntastic_jshint_exec),
|
||||||
\ 'post_args': (jshint_new ? ' --verbose ' : '') . s:Args(),
|
\ 'post_args': (jshint_new ? ' --verbose ' : '') . s:Args(),
|
||||||
\ 'filetype': 'javascript',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'jshint' })
|
|
||||||
|
|
||||||
let errorformat = jshint_new ?
|
let errorformat = jshint_new ?
|
||||||
\ '%f: line %l\, col %c\, %m \(%t%*\d\)' :
|
\ '%f: line %l\, col %c\, %m \(%t%*\d\)' :
|
||||||
|
@ -29,12 +29,11 @@ function! SyntaxCheckers_javascript_jsl_IsAvailable()
|
|||||||
return executable('jsl')
|
return executable('jsl')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_javascript_jsl_GetLocList()
|
function! SyntaxCheckers_javascript_jsl_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'jsl',
|
\ 'exe': 'jsl',
|
||||||
\ 'args': s:ConfFlag() . " -nologo -nofilelisting -nosummary -nocontext -process",
|
\ 'args': s:ConfFlag() . " -nologo -nofilelisting -nosummary -nocontext -process",
|
||||||
\ 'filetype': 'javascript',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'jsl' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%W%f(%l): lint warning: %m,'.
|
\ '%W%f(%l): lint warning: %m,'.
|
||||||
|
@ -31,12 +31,11 @@ function! SyntaxCheckers_javascript_jslint_HighlightTerm(error)
|
|||||||
return '\V'.split(unexpected, "'")[1]
|
return '\V'.split(unexpected, "'")[1]
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_javascript_jslint_GetLocList()
|
function! SyntaxCheckers_javascript_jslint_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'jslint',
|
\ 'exe': 'jslint',
|
||||||
\ 'args': g:syntastic_javascript_jslint_conf,
|
\ 'args': g:syntastic_javascript_jslint_conf,
|
||||||
\ 'filetype': 'javascript',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'jslint' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%E %##%n %m,'.
|
\ '%E %##%n %m,'.
|
||||||
|
@ -18,12 +18,11 @@ function! SyntaxCheckers_json_jsonlint_IsAvailable()
|
|||||||
return executable('jsonlint')
|
return executable('jsonlint')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_json_jsonlint_GetLocList()
|
function! SyntaxCheckers_json_jsonlint_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'jsonlint',
|
\ 'exe': 'jsonlint',
|
||||||
\ 'post_args': '--compact',
|
\ 'post_args': '--compact',
|
||||||
\ 'filetype': 'json',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'jsonlint' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%ELine %l:%c,'.
|
\ '%ELine %l:%c,'.
|
||||||
|
@ -18,12 +18,11 @@ function! SyntaxCheckers_json_jsonval_IsAvailable()
|
|||||||
return executable('jsonval')
|
return executable('jsonval')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_json_jsonval_GetLocList()
|
function! SyntaxCheckers_json_jsonval_GetLocList() dict
|
||||||
" based on https://gist.github.com/1196345
|
" based on https://gist.github.com/1196345
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'jsonval',
|
\ 'exe': 'jsonval',
|
||||||
\ 'filetype': 'json',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'jsonval' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%E%f:\ %m\ at\ line\ %l,' .
|
\ '%E%f:\ %m\ at\ line\ %l,' .
|
||||||
|
@ -40,13 +40,12 @@ function! SyntaxCheckers_less_lessc_IsAvailable()
|
|||||||
return executable('lessc')
|
return executable('lessc')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_less_lessc_GetLocList()
|
function! SyntaxCheckers_less_lessc_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': s:check_file,
|
\ 'exe': s:check_file,
|
||||||
\ 'args': g:syntastic_less_options,
|
\ 'args': g:syntastic_less_options,
|
||||||
\ 'tail': syntastic#util#DevNull(),
|
\ 'tail': syntastic#util#DevNull(),
|
||||||
\ 'filetype': 'less',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'lessc' })
|
|
||||||
|
|
||||||
let errorformat = '%m in %f:%l:%c'
|
let errorformat = '%m in %f:%l:%c'
|
||||||
|
|
||||||
|
@ -18,13 +18,12 @@ function! SyntaxCheckers_lisp_clisp_IsAvailable()
|
|||||||
return executable("clisp")
|
return executable("clisp")
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_lisp_clisp_GetLocList()
|
function! SyntaxCheckers_lisp_clisp_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'clisp',
|
\ 'exe': 'clisp',
|
||||||
\ 'args': '-q -c',
|
\ 'args': '-q -c',
|
||||||
\ 'tail': '-o /tmp/clisp-vim-compiled-file',
|
\ 'tail': '-o /tmp/clisp-vim-compiled-file',
|
||||||
\ 'filetype': 'lisp',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'clisp' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%-G;%.%#,' .
|
\ '%-G;%.%#,' .
|
||||||
|
@ -18,12 +18,11 @@ function! SyntaxCheckers_llvm_llvm_IsAvailable()
|
|||||||
return executable("llc")
|
return executable("llc")
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_llvm_llvm_GetLocList()
|
function! SyntaxCheckers_llvm_llvm_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'llc',
|
\ 'exe': 'llc',
|
||||||
\ 'args': syntastic#c#NullOutput(),
|
\ 'args': syntastic#c#NullOutput(),
|
||||||
\ 'filetype': 'llvm',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'llvm' })
|
|
||||||
|
|
||||||
let errorformat = 'llc: %f:%l:%c: %trror: %m'
|
let errorformat = 'llc: %f:%l:%c: %trror: %m'
|
||||||
|
|
||||||
|
@ -43,12 +43,11 @@ function! SyntaxCheckers_lua_luac_GetHighlightRegex(pos)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
function! SyntaxCheckers_lua_luac_GetLocList()
|
function! SyntaxCheckers_lua_luac_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'luac',
|
\ 'exe': 'luac',
|
||||||
\ 'args': '-p',
|
\ 'args': '-p',
|
||||||
\ 'filetype': 'lua',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'luac' })
|
|
||||||
|
|
||||||
let errorformat = 'luac: %#%f:%l: %m'
|
let errorformat = 'luac: %#%f:%l: %m'
|
||||||
|
|
||||||
|
@ -19,12 +19,11 @@ function! SyntaxCheckers_matlab_mlint_IsAvailable()
|
|||||||
return executable("mlint")
|
return executable("mlint")
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_matlab_mlint_GetLocList()
|
function! SyntaxCheckers_matlab_mlint_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'mlint',
|
\ 'exe': 'mlint',
|
||||||
\ 'args': '-id $*',
|
\ 'args': '-id $*',
|
||||||
\ 'filetype': 'matlab',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'mlint' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ 'L %l (C %c): %*[a-zA-Z0-9]: %m,'.
|
\ 'L %l (C %c): %*[a-zA-Z0-9]: %m,'.
|
||||||
|
@ -18,13 +18,12 @@ function! SyntaxCheckers_nasm_nasm_IsAvailable()
|
|||||||
return executable("nasm")
|
return executable("nasm")
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_nasm_nasm_GetLocList()
|
function! SyntaxCheckers_nasm_nasm_GetLocList() dict
|
||||||
let wd = syntastic#util#shescape(expand("%:p:h") . "/")
|
let wd = syntastic#util#shescape(expand("%:p:h") . "/")
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'nasm',
|
\ 'exe': 'nasm',
|
||||||
\ 'args': '-X gnu -f elf -I ' . wd . ' ' . syntastic#c#NullOutput(),
|
\ 'args': '-X gnu -f elf -I ' . wd . ' ' . syntastic#c#NullOutput(),
|
||||||
\ 'filetype': 'nasm',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'nasm' })
|
|
||||||
|
|
||||||
let errorformat = '%f:%l: %t%*[^:]: %m'
|
let errorformat = '%f:%l: %t%*[^:]: %m'
|
||||||
|
|
||||||
|
@ -18,12 +18,11 @@ function! SyntaxCheckers_nroff_mandoc_IsAvailable()
|
|||||||
return executable("mandoc")
|
return executable("mandoc")
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_nroff_mandoc_GetLocList()
|
function! SyntaxCheckers_nroff_mandoc_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'mandoc',
|
\ 'exe': 'mandoc',
|
||||||
\ 'args': '-Tlint',
|
\ 'args': '-Tlint',
|
||||||
\ 'filetype': 'nroff',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'mandoc' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%E%f:%l:%c: %tRROR: %m,' .
|
\ '%E%f:%l:%c: %tRROR: %m,' .
|
||||||
|
@ -30,7 +30,7 @@ if !exists('g:syntastic_objc_compiler_options')
|
|||||||
let g:syntastic_objc_compiler_options = '-std=gnu99'
|
let g:syntastic_objc_compiler_options = '-std=gnu99'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
function! SyntaxCheckers_objc_gcc_GetLocList()
|
function! SyntaxCheckers_objc_gcc_GetLocList() dict
|
||||||
return syntastic#c#GetLocList('objc', 'gcc', {
|
return syntastic#c#GetLocList('objc', 'gcc', {
|
||||||
\ 'errorformat':
|
\ 'errorformat':
|
||||||
\ '%-G%f:%s:,' .
|
\ '%-G%f:%s:,' .
|
||||||
|
@ -21,16 +21,9 @@ if exists("g:loaded_syntastic_objc_oclint_checker")
|
|||||||
endif
|
endif
|
||||||
let g:loaded_syntastic_objc_oclint_checker = 1
|
let g:loaded_syntastic_objc_oclint_checker = 1
|
||||||
|
|
||||||
function! SyntaxCheckers_objc_oclint_IsAvailable()
|
runtime! syntax_checkers/c/*.vim
|
||||||
return SyntaxCheckers_c_oclint_IsAvailable()
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! SyntaxCheckers_objc_oclint_GetLocList()
|
|
||||||
return SyntaxCheckers_c_oclint_GetLocList()
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||||
\ 'filetype': 'objc',
|
\ 'filetype': 'objc',
|
||||||
\ 'name': 'oclint'})
|
\ 'name': 'oclint',
|
||||||
|
\ 'redirect': 'c/oclint'})
|
||||||
runtime! syntax_checkers/c/*.vim
|
|
||||||
|
@ -17,18 +17,11 @@ let g:loaded_syntastic_objc_ycm_checker = 1
|
|||||||
|
|
||||||
runtime! syntax_checkers/c/*.vim
|
runtime! syntax_checkers/c/*.vim
|
||||||
|
|
||||||
function! SyntaxCheckers_objc_ycm_IsAvailable()
|
|
||||||
return SyntaxCheckers_c_ycm_IsAvailable()
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
if !exists('g:loaded_youcompleteme')
|
if !exists('g:loaded_youcompleteme')
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
function! SyntaxCheckers_objc_ycm_GetLocList()
|
|
||||||
return SyntaxCheckers_c_ycm_GetLocList()
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||||
\ 'filetype': 'objc',
|
\ 'filetype': 'objc',
|
||||||
\ 'name': 'ycm'})
|
\ 'name': 'ycm',
|
||||||
|
\ 'redirect': 'c/ycm'})
|
||||||
|
@ -30,7 +30,7 @@ if !exists('g:syntastic_objcpp_compiler_options')
|
|||||||
let g:syntastic_objcpp_compiler_options = '-std=gnu99'
|
let g:syntastic_objcpp_compiler_options = '-std=gnu99'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
function! SyntaxCheckers_objcpp_gcc_GetLocList()
|
function! SyntaxCheckers_objcpp_gcc_GetLocList() dict
|
||||||
return syntastic#c#GetLocList('objcpp', 'gcc', {
|
return syntastic#c#GetLocList('objcpp', 'gcc', {
|
||||||
\ 'errorformat':
|
\ 'errorformat':
|
||||||
\ '%-G%f:%s:,' .
|
\ '%-G%f:%s:,' .
|
||||||
|
@ -21,16 +21,9 @@ if exists("g:loaded_syntastic_objcpp_oclint_checker")
|
|||||||
endif
|
endif
|
||||||
let g:loaded_syntastic_objcpp_oclint_checker = 1
|
let g:loaded_syntastic_objcpp_oclint_checker = 1
|
||||||
|
|
||||||
function! SyntaxCheckers_objcpp_oclint_IsAvailable()
|
runtime! syntax_checkers/c/*.vim
|
||||||
return SyntaxCheckers_c_oclint_IsAvailable()
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! SyntaxCheckers_objcpp_oclint_GetLocList()
|
|
||||||
return SyntaxCheckers_c_oclint_GetLocList()
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||||
\ 'filetype': 'objcpp',
|
\ 'filetype': 'objcpp',
|
||||||
\ 'name': 'oclint'})
|
\ 'name': 'oclint',
|
||||||
|
\ 'redirect': 'c/oclint'})
|
||||||
runtime! syntax_checkers/c/*.vim
|
|
||||||
|
@ -15,20 +15,13 @@ if exists("g:loaded_syntastic_objcpp_ycm_checker")
|
|||||||
endif
|
endif
|
||||||
let g:loaded_syntastic_objcpp_ycm_checker = 1
|
let g:loaded_syntastic_objcpp_ycm_checker = 1
|
||||||
|
|
||||||
runtime! syntax_checkers/c/*.vim
|
|
||||||
|
|
||||||
function! SyntaxCheckers_objcpp_ycm_IsAvailable()
|
|
||||||
return SyntaxCheckers_c_ycm_IsAvailable()
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
if !exists('g:loaded_youcompleteme')
|
if !exists('g:loaded_youcompleteme')
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
function! SyntaxCheckers_objcpp_ycm_GetLocList()
|
runtime! syntax_checkers/c/*.vim
|
||||||
return SyntaxCheckers_c_ycm_GetLocList()
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||||
\ 'filetype': 'objcpp',
|
\ 'filetype': 'objcpp',
|
||||||
\ 'name': 'ycm'})
|
\ 'name': 'ycm',
|
||||||
|
\ 'redirect': 'c/ycm'})
|
||||||
|
@ -76,7 +76,7 @@ if !exists('g:syntastic_ocaml_use_ocamlbuild') || !executable("ocamlbuild")
|
|||||||
let g:syntastic_ocaml_use_ocamlbuild = 0
|
let g:syntastic_ocaml_use_ocamlbuild = 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
function! SyntaxCheckers_ocaml_camlp4o_GetLocList()
|
function! SyntaxCheckers_ocaml_camlp4o_GetLocList() dict
|
||||||
let makeprg = s:GetMakeprg()
|
let makeprg = s:GetMakeprg()
|
||||||
if makeprg == ""
|
if makeprg == ""
|
||||||
return []
|
return []
|
||||||
|
@ -51,7 +51,7 @@ function! SyntaxCheckers_perl_perl_Preprocess(errors)
|
|||||||
return syntastic#util#unique(out)
|
return syntastic#util#unique(out)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_perl_perl_GetLocList()
|
function! SyntaxCheckers_perl_perl_GetLocList() dict
|
||||||
if type(g:syntastic_perl_lib_path) == type('')
|
if type(g:syntastic_perl_lib_path) == type('')
|
||||||
call syntastic#util#deprecationWarn('variable g:syntastic_perl_lib_path should be a list')
|
call syntastic#util#deprecationWarn('variable g:syntastic_perl_lib_path should be a list')
|
||||||
let includes = split(g:syntastic_perl_lib_path, ',')
|
let includes = split(g:syntastic_perl_lib_path, ',')
|
||||||
@ -67,8 +67,7 @@ function! SyntaxCheckers_perl_perl_GetLocList()
|
|||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': g:syntastic_perl_interpreter,
|
\ 'exe': g:syntastic_perl_interpreter,
|
||||||
\ 'args': '-c -X ' . extra,
|
\ 'args': '-c -X ' . extra,
|
||||||
\ 'filetype': 'perl',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'perl' })
|
|
||||||
|
|
||||||
let errors = SyntasticMake({
|
let errors = SyntasticMake({
|
||||||
\ 'makeprg': makeprg,
|
\ 'makeprg': makeprg,
|
||||||
@ -82,8 +81,7 @@ function! SyntaxCheckers_perl_perl_GetLocList()
|
|||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': g:syntastic_perl_interpreter,
|
\ 'exe': g:syntastic_perl_interpreter,
|
||||||
\ 'args': '-c -Mwarnings ' . extra,
|
\ 'args': '-c -Mwarnings ' . extra,
|
||||||
\ 'filetype': 'perl',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'perl' })
|
|
||||||
|
|
||||||
return SyntasticMake({
|
return SyntasticMake({
|
||||||
\ 'makeprg': makeprg,
|
\ 'makeprg': makeprg,
|
||||||
|
@ -37,12 +37,11 @@ function! SyntaxCheckers_perl_perlcritic_IsAvailable()
|
|||||||
return executable('perlcritic')
|
return executable('perlcritic')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_perl_perlcritic_GetLocList()
|
function! SyntaxCheckers_perl_perlcritic_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'perlcritic',
|
\ 'exe': 'perlcritic',
|
||||||
\ 'post_args': '--quiet --nocolor --verbose "\%s:\%f:\%l:\%c:(\%s) \%m (\%e)\n"',
|
\ 'post_args': '--quiet --nocolor --verbose "\%s:\%f:\%l:\%c:(\%s) \%m (\%e)\n"',
|
||||||
\ 'filetype': 'perl',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'perlcritic' })
|
|
||||||
|
|
||||||
let errorformat = '%t:%f:%l:%c:%m'
|
let errorformat = '%t:%f:%l:%c:%m'
|
||||||
|
|
||||||
|
@ -15,16 +15,9 @@ if exists("g:loaded_syntastic_perl_podchecker_checker")
|
|||||||
endif
|
endif
|
||||||
let g:loaded_syntastic_perl_podchecker_checker=1
|
let g:loaded_syntastic_perl_podchecker_checker=1
|
||||||
|
|
||||||
function! SyntaxCheckers_perl_podchecker_IsAvailable()
|
runtime! syntax_checkers/pod/*.vim
|
||||||
return SyntaxCheckers_pod_podchecker_IsAvailable()
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! SyntaxCheckers_perl_podchecker_GetLocList()
|
|
||||||
return SyntaxCheckers_pod_podchecker_GetLocList()
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||||
\ 'filetype': 'perl',
|
\ 'filetype': 'perl',
|
||||||
\ 'name': 'podchecker'})
|
\ 'name': 'podchecker',
|
||||||
|
\ 'redirect': 'pod/podchecker'})
|
||||||
runtime! syntax_checkers/pod/*.vim
|
|
||||||
|
@ -27,12 +27,11 @@ function! SyntaxCheckers_php_php_GetHighlightRegex(item)
|
|||||||
return '\V'.split(unexpected, "'")[1]
|
return '\V'.split(unexpected, "'")[1]
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_php_php_GetLocList()
|
function! SyntaxCheckers_php_php_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'php',
|
\ 'exe': 'php',
|
||||||
\ 'args': '-l -d error_reporting=E_ALL -d display_errors=1 -d log_errors=0 -d xdebug.cli_color=0',
|
\ 'args': '-l -d error_reporting=E_ALL -d display_errors=1 -d log_errors=0 -d xdebug.cli_color=0',
|
||||||
\ 'filetype': 'php',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'php' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%-GNo syntax errors detected in%.%#,'.
|
\ '%-GNo syntax errors detected in%.%#,'.
|
||||||
|
@ -22,12 +22,11 @@ function! SyntaxCheckers_php_phpcs_IsAvailable()
|
|||||||
return executable('phpcs')
|
return executable('phpcs')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_php_phpcs_GetLocList()
|
function! SyntaxCheckers_php_phpcs_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'phpcs',
|
\ 'exe': 'phpcs',
|
||||||
\ 'args': '--report=csv',
|
\ 'args': '--report=csv',
|
||||||
\ 'filetype': 'php',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'phpcs' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%-GFile\,Line\,Column\,Type\,Message\,Source\,Severity,'.
|
\ '%-GFile\,Line\,Column\,Type\,Message\,Source\,Severity,'.
|
||||||
|
@ -58,12 +58,11 @@ function! SyntaxCheckers_php_phpmd_GetHighlightRegex(item)
|
|||||||
return ''
|
return ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_php_phpmd_GetLocList()
|
function! SyntaxCheckers_php_phpmd_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'phpmd',
|
\ 'exe': 'phpmd',
|
||||||
\ 'post_args': 'text codesize,design,unusedcode,naming',
|
\ 'post_args': 'text codesize,design,unusedcode,naming',
|
||||||
\ 'filetype': 'php',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'phpmd' })
|
|
||||||
|
|
||||||
let errorformat = '%E%f:%l%\s%#%m'
|
let errorformat = '%E%f:%l%\s%#%m'
|
||||||
|
|
||||||
|
@ -18,11 +18,10 @@ function! SyntaxCheckers_pod_podchecker_IsAvailable()
|
|||||||
return executable("podchecker")
|
return executable("podchecker")
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_pod_podchecker_GetLocList()
|
function! SyntaxCheckers_pod_podchecker_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'podchecker',
|
\ 'exe': 'podchecker',
|
||||||
\ 'filetype': 'pod',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'podchecker' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%W%[%#]%[%#]%[%#] WARNING: %m at line %l in file %f,' .
|
\ '%W%[%#]%[%#]%[%#] WARNING: %m at line %l in file %f,' .
|
||||||
|
@ -19,7 +19,7 @@ function! SyntaxCheckers_puppet_puppet_IsAvailable()
|
|||||||
return executable("puppet")
|
return executable("puppet")
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_puppet_puppet_GetLocList()
|
function! SyntaxCheckers_puppet_puppet_GetLocList() dict
|
||||||
|
|
||||||
let ver = syntastic#util#getVersion('puppet --version 2>' . syntastic#util#DevNull())
|
let ver = syntastic#util#getVersion('puppet --version 2>' . syntastic#util#DevNull())
|
||||||
|
|
||||||
@ -32,8 +32,7 @@ function! SyntaxCheckers_puppet_puppet_GetLocList()
|
|||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'puppet',
|
\ 'exe': 'puppet',
|
||||||
\ 'args': args,
|
\ 'args': args,
|
||||||
\ 'filetype': 'puppet',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'puppet' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%-Gerr: Try ''puppet help parser validate'' for usage,' .
|
\ '%-Gerr: Try ''puppet help parser validate'' for usage,' .
|
||||||
|
@ -28,12 +28,11 @@ function! SyntaxCheckers_puppet_puppetlint_IsAvailable()
|
|||||||
\ syntastic#util#DevNull()), [0,1,10])
|
\ syntastic#util#DevNull()), [0,1,10])
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_puppet_puppetlint_GetLocList()
|
function! SyntaxCheckers_puppet_puppetlint_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'puppet-lint',
|
\ 'exe': 'puppet-lint',
|
||||||
\ 'post_args': '--log-format "%{KIND} [%{check}] %{message} at %{fullpath}:%{linenumber}"',
|
\ 'post_args': '--log-format "%{KIND} [%{check}] %{message} at %{fullpath}:%{linenumber}"',
|
||||||
\ 'filetype': 'puppet',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'puppetlint' })
|
|
||||||
|
|
||||||
let errorformat = '%t%*[a-zA-Z] %m at %f:%l'
|
let errorformat = '%t%*[a-zA-Z] %m at %f:%l'
|
||||||
|
|
||||||
|
@ -18,11 +18,10 @@ function! SyntaxCheckers_python_flake8_GetHighlightRegex(i)
|
|||||||
return SyntaxCheckers_python_pyflakes_GetHighlightRegex(a:i)
|
return SyntaxCheckers_python_pyflakes_GetHighlightRegex(a:i)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_python_flake8_GetLocList()
|
function! SyntaxCheckers_python_flake8_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'flake8',
|
\ 'exe': 'flake8',
|
||||||
\ 'filetype': 'python',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'flake8' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%E%f:%l: could not compile,%-Z%p^,' .
|
\ '%E%f:%l: could not compile,%-Z%p^,' .
|
||||||
|
@ -19,11 +19,10 @@ function! SyntaxCheckers_python_pep257_Preprocess(errors)
|
|||||||
return filter(copy(a:errors), 'v:val != ""')
|
return filter(copy(a:errors), 'v:val != ""')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_python_pep257_GetLocList()
|
function! SyntaxCheckers_python_pep257_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'pep257',
|
\ 'exe': 'pep257',
|
||||||
\ 'filetype': 'python',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'pep257' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%E%f:%l:%c%\%.%\%.%\d%\+:%\d%\+: %m,' .
|
\ '%E%f:%l:%c%\%.%\%.%\d%\+:%\d%\+: %m,' .
|
||||||
|
@ -21,11 +21,10 @@ function! SyntaxCheckers_python_pep8_IsAvailable()
|
|||||||
return executable('pep8')
|
return executable('pep8')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_python_pep8_GetLocList()
|
function! SyntaxCheckers_python_pep8_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'pep8',
|
\ 'exe': 'pep8',
|
||||||
\ 'filetype': 'python',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'pep8' })
|
|
||||||
|
|
||||||
let errorformat = '%f:%l:%c: %m'
|
let errorformat = '%f:%l:%c: %m'
|
||||||
|
|
||||||
|
@ -13,11 +13,10 @@ function! SyntaxCheckers_python_py3kwarn_IsAvailable()
|
|||||||
return executable('py3kwarn')
|
return executable('py3kwarn')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_python_py3kwarn_GetLocList()
|
function! SyntaxCheckers_python_py3kwarn_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'py3kwarn',
|
\ 'exe': 'py3kwarn',
|
||||||
\ 'filetype': 'python',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'py3kwarn' })
|
|
||||||
|
|
||||||
let errorformat = '%W%f:%l:%c: %m'
|
let errorformat = '%W%f:%l:%c: %m'
|
||||||
|
|
||||||
|
@ -39,11 +39,10 @@ function! SyntaxCheckers_python_pyflakes_GetHighlightRegex(i)
|
|||||||
return ''
|
return ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_python_pyflakes_GetLocList()
|
function! SyntaxCheckers_python_pyflakes_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'pyflakes',
|
\ 'exe': 'pyflakes',
|
||||||
\ 'filetype': 'python',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'pyflakes' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%E%f:%l: could not compile,'.
|
\ '%E%f:%l: could not compile,'.
|
||||||
|
@ -22,12 +22,11 @@ function! SyntaxCheckers_python_pylama_GetHighlightRegex(i)
|
|||||||
return SyntaxCheckers_python_pyflakes_GetHighlightRegex(a:i)
|
return SyntaxCheckers_python_pyflakes_GetHighlightRegex(a:i)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_python_pylama_GetLocList()
|
function! SyntaxCheckers_python_pylama_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'pylama',
|
\ 'exe': 'pylama',
|
||||||
\ 'post_args': '-f pep8',
|
\ 'post_args': '-f pep8',
|
||||||
\ 'filetype': 'python',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'pylama' })
|
|
||||||
|
|
||||||
" TODO: "WARNING:pylama:..." messages are probably a logging bug
|
" TODO: "WARNING:pylama:..." messages are probably a logging bug
|
||||||
let errorformat =
|
let errorformat =
|
||||||
|
@ -16,12 +16,11 @@ function! SyntaxCheckers_python_pylint_IsAvailable()
|
|||||||
return s:pylint_new >= 0
|
return s:pylint_new >= 0
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_python_pylint_GetLocList()
|
function! SyntaxCheckers_python_pylint_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'pylint',
|
\ 'exe': 'pylint',
|
||||||
\ 'args': (s:pylint_new ? '--msg-template="{path}:{line}: [{msg_id}] {msg}" -r n' : '-f parseable -r n -i y'),
|
\ 'args': (s:pylint_new ? '--msg-template="{path}:{line}: [{msg_id}] {msg}" -r n' : '-f parseable -r n -i y'),
|
||||||
\ 'filetype': 'python',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'pylint' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%A%f:%l: %m,' .
|
\ '%A%f:%l: %m,' .
|
||||||
|
@ -16,15 +16,14 @@ function! SyntaxCheckers_python_python_IsAvailable()
|
|||||||
return executable('python')
|
return executable('python')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_python_python_GetLocList()
|
function! SyntaxCheckers_python_python_GetLocList() dict
|
||||||
let fname = "'" . escape(expand('%'), "\\'") . "'"
|
let fname = "'" . escape(expand('%'), "\\'") . "'"
|
||||||
|
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'python',
|
\ 'exe': 'python',
|
||||||
\ 'args': '-c',
|
\ 'args': '-c',
|
||||||
\ 'fname': syntastic#util#shescape("compile(open(" . fname . ").read(), " . fname . ", 'exec')"),
|
\ 'fname': syntastic#util#shescape("compile(open(" . fname . ").read(), " . fname . ", 'exec')"),
|
||||||
\ 'filetype': 'python',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'python' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%E File "%f"\, line %l,' .
|
\ '%E File "%f"\, line %l,' .
|
||||||
|
@ -22,13 +22,12 @@ function! SyntaxCheckers_rst_rst2pseudoxml_IsAvailable()
|
|||||||
return executable("rst2pseudoxml.py") || executable("rst2pseudoxml")
|
return executable("rst2pseudoxml.py") || executable("rst2pseudoxml")
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_rst_rst2pseudoxml_GetLocList()
|
function! SyntaxCheckers_rst_rst2pseudoxml_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': s:exe(),
|
\ 'exe': s:exe(),
|
||||||
\ 'args': '--report=2 --exit-status=1',
|
\ 'args': '--report=2 --exit-status=1',
|
||||||
\ 'tail': syntastic#util#DevNull(),
|
\ 'tail': syntastic#util#DevNull(),
|
||||||
\ 'filetype': 'rst',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'rst2pseudoxml' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%f:%l: (%tNFO/1) %m,'.
|
\ '%f:%l: (%tNFO/1) %m,'.
|
||||||
|
@ -18,12 +18,11 @@ function! SyntaxCheckers_ruby_jruby_IsAvailable()
|
|||||||
return executable('jruby')
|
return executable('jruby')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_ruby_jruby_GetLocList()
|
function! SyntaxCheckers_ruby_jruby_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': s:exe(),
|
\ 'exe': s:exe(),
|
||||||
\ 'args': s:args(),
|
\ 'args': s:args(),
|
||||||
\ 'filetype': 'ruby',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'jruby' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%-GSyntax OK for %f,'.
|
\ '%-GSyntax OK for %f,'.
|
||||||
|
@ -17,12 +17,11 @@ function! SyntaxCheckers_ruby_macruby_IsAvailable()
|
|||||||
return executable('macruby')
|
return executable('macruby')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_ruby_macruby_GetLocList()
|
function! SyntaxCheckers_ruby_macruby_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'RUBYOPT= macruby',
|
\ 'exe': 'RUBYOPT= macruby',
|
||||||
\ 'args': '-W1 -c',
|
\ 'args': '-W1 -c',
|
||||||
\ 'filetype': 'ruby',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'macruby' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%-GSyntax OK,'.
|
\ '%-GSyntax OK,'.
|
||||||
|
@ -32,7 +32,7 @@ function! SyntaxCheckers_ruby_mri_GetHighlightRegex(i)
|
|||||||
return ''
|
return ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_ruby_mri_GetLocList()
|
function! SyntaxCheckers_ruby_mri_GetLocList() dict
|
||||||
let exe = expand(g:syntastic_ruby_exec)
|
let exe = expand(g:syntastic_ruby_exec)
|
||||||
if !has('win32')
|
if !has('win32')
|
||||||
let exe = 'RUBYOPT= ' . exe
|
let exe = 'RUBYOPT= ' . exe
|
||||||
@ -41,8 +41,7 @@ function! SyntaxCheckers_ruby_mri_GetLocList()
|
|||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': exe,
|
\ 'exe': exe,
|
||||||
\ 'args': '-w -T1 -c',
|
\ 'args': '-w -T1 -c',
|
||||||
\ 'filetype': 'ruby',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'mri' })
|
|
||||||
|
|
||||||
"this is a hack to filter out a repeated useless warning in rspec files
|
"this is a hack to filter out a repeated useless warning in rspec files
|
||||||
"containing lines like
|
"containing lines like
|
||||||
|
@ -24,12 +24,11 @@ function! SyntaxCheckers_ruby_rubocop_IsAvailable()
|
|||||||
\ syntastic#util#versionIsAtLeast(syntastic#util#getVersion('rubocop --version'), [0,9,0])
|
\ syntastic#util#versionIsAtLeast(syntastic#util#getVersion('rubocop --version'), [0,9,0])
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_ruby_rubocop_GetLocList()
|
function! SyntaxCheckers_ruby_rubocop_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'rubocop',
|
\ 'exe': 'rubocop',
|
||||||
\ 'args': '--format emacs --silent',
|
\ 'args': '--format emacs --silent',
|
||||||
\ 'filetype': 'ruby',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'rubocop' })
|
|
||||||
|
|
||||||
let errorformat = '%f:%l:%c: %t: %m'
|
let errorformat = '%f:%l:%c: %t: %m'
|
||||||
|
|
||||||
|
@ -20,12 +20,11 @@ function! SyntaxCheckers_ruby_rubylint_IsAvailable()
|
|||||||
return executable("ruby-lint")
|
return executable("ruby-lint")
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_ruby_rubylint_GetLocList()
|
function! SyntaxCheckers_ruby_rubylint_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'ruby-lint',
|
\ 'exe': 'ruby-lint',
|
||||||
\ 'args': 'analyze --presenter=syntastic',
|
\ 'args': 'analyze --presenter=syntastic',
|
||||||
\ 'filetype': 'ruby',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'rubylint' })
|
|
||||||
|
|
||||||
let errorformat = '%f:%t:%l:%c: %m'
|
let errorformat = '%f:%t:%l:%c: %m'
|
||||||
|
|
||||||
|
@ -19,12 +19,11 @@ function! SyntaxCheckers_rust_rustc_IsAvailable()
|
|||||||
return executable("rustc")
|
return executable("rustc")
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SyntaxCheckers_rust_rustc_GetLocList()
|
function! SyntaxCheckers_rust_rustc_GetLocList() dict
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'rustc',
|
\ 'exe': 'rustc',
|
||||||
\ 'args': '--parse-only',
|
\ 'args': '--parse-only',
|
||||||
\ 'filetype': 'rust',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'rustc' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%E%f:%l:%c: \\d%#:\\d%# %.%\{-}error:%.%\{-} %m,' .
|
\ '%E%f:%l:%c: \\d%#:\\d%# %.%\{-}error:%.%\{-} %m,' .
|
||||||
|
@ -34,7 +34,7 @@ if executable("compass")
|
|||||||
let s:imports = "--compass"
|
let s:imports = "--compass"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
function! SyntaxCheckers_sass_sass_GetLocList()
|
function! SyntaxCheckers_sass_sass_GetLocList() dict
|
||||||
if !g:syntastic_sass_check_partials && expand('%:t')[0] == '_'
|
if !g:syntastic_sass_check_partials && expand('%:t')[0] == '_'
|
||||||
return []
|
return []
|
||||||
endif
|
endif
|
||||||
@ -42,8 +42,7 @@ function! SyntaxCheckers_sass_sass_GetLocList()
|
|||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'sass',
|
\ 'exe': 'sass',
|
||||||
\ 'args': '--cache-location ' . s:sass_cache_location . ' ' . s:imports . ' --check',
|
\ 'args': '--cache-location ' . s:sass_cache_location . ' ' . s:imports . ' --check',
|
||||||
\ 'filetype': 'sass',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'sass' })
|
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%ESyntax %trror: %m,' .
|
\ '%ESyntax %trror: %m,' .
|
||||||
|
@ -23,7 +23,7 @@ if !exists('g:syntastic_scala_options')
|
|||||||
let g:syntastic_scala_options = ''
|
let g:syntastic_scala_options = ''
|
||||||
endif
|
endif
|
||||||
|
|
||||||
function! SyntaxCheckers_scala_fsc_GetLocList()
|
function! SyntaxCheckers_scala_fsc_GetLocList() dict
|
||||||
" fsc has some serious problems with the
|
" fsc has some serious problems with the
|
||||||
" working directory changing after being started
|
" working directory changing after being started
|
||||||
" that's why we better pass an absolute path
|
" that's why we better pass an absolute path
|
||||||
@ -31,8 +31,7 @@ function! SyntaxCheckers_scala_fsc_GetLocList()
|
|||||||
\ 'exe': 'fsc',
|
\ 'exe': 'fsc',
|
||||||
\ 'args': '-Ystop-after:parser ' . g:syntastic_scala_options,
|
\ 'args': '-Ystop-after:parser ' . g:syntastic_scala_options,
|
||||||
\ 'fname': syntastic#util#shexpand('%:p'),
|
\ 'fname': syntastic#util#shexpand('%:p'),
|
||||||
\ 'filetype': 'scala',
|
\ 'checker': self })
|
||||||
\ 'subchecker': 'fsc' })
|
|
||||||
|
|
||||||
let errorformat = '%f:%l: %trror: %m'
|
let errorformat = '%f:%l: %trror: %m'
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user