diff --git a/autoload/syntastic/makeprg.vim b/autoload/syntastic/makeprg.vim index 4d7a0331..f80258db 100644 --- a/autoload/syntastic/makeprg.vim +++ b/autoload/syntastic/makeprg.vim @@ -38,13 +38,12 @@ let g:loaded_syntastic_makeprg_autoload = 1 " function! syntastic#makeprg#build(opts) let builder = g:SyntasticMakeprgBuilder.New( + \ get(a:opts, 'checker', {}), \ get(a:opts, 'exe', ''), \ get(a:opts, 'args', ''), \ get(a:opts, 'fname', ''), \ get(a:opts, 'post_args', ''), - \ get(a:opts, 'tail', ''), - \ get(a:opts, 'filetype', ''), - \ get(a:opts, 'subchecker', '') ) + \ get(a:opts, 'tail', '') ) return builder.makeprg() endfunction diff --git a/plugin/syntastic/checker.vim b/plugin/syntastic/checker.vim index 3ab1d212..e867af47 100644 --- a/plugin/syntastic/checker.vim +++ b/plugin/syntastic/checker.vim @@ -13,8 +13,13 @@ function! g:SyntasticChecker.New(args) let newObj._filetype = a:args['filetype'] 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._isAvailableFunc = function(prefix . 'IsAvailable') @@ -47,6 +52,10 @@ function! g:SyntasticChecker.getLocList() return g:SyntasticLoclist.New(list) endfunction +function! g:SyntasticChecker.getLocListRaw() + return self._locListFunc() +endfunction + function! g:SyntasticChecker.getHighlightRegexFor(error) if empty(self._highlightRegexFunc) return [] diff --git a/plugin/syntastic/makeprg_builder.vim b/plugin/syntastic/makeprg_builder.vim index 1430dc5f..295fe198 100644 --- a/plugin/syntastic/makeprg_builder.vim +++ b/plugin/syntastic/makeprg_builder.vim @@ -7,15 +7,22 @@ let g:SyntasticMakeprgBuilder = {} " 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._exe = a:exe let newObj._args = a:args let newObj._fname = a:fname let newObj._post_args = a:post_args 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 endfunction diff --git a/syntax_checkers/ada/gcc.vim b/syntax_checkers/ada/gcc.vim index 7562d609..8eabc04c 100644 --- a/syntax_checkers/ada/gcc.vim +++ b/syntax_checkers/ada/gcc.vim @@ -27,7 +27,7 @@ if !exists('g:syntastic_ada_compiler_options') let g:syntastic_ada_compiler_options = '' endif -function! SyntaxCheckers_ada_gcc_GetLocList() +function! SyntaxCheckers_ada_gcc_GetLocList() dict return syntastic#c#GetLocList('ada', 'gcc', { \ 'errorformat': \ '%-G%f:%s:,' . diff --git a/syntax_checkers/applescript/osacompile.vim b/syntax_checkers/applescript/osacompile.vim index 7567eb08..4273e4e7 100644 --- a/syntax_checkers/applescript/osacompile.vim +++ b/syntax_checkers/applescript/osacompile.vim @@ -34,12 +34,11 @@ function! SyntaxCheckers_applescript_osacompile_IsAvailable() return executable('osacompile') endfunction -function! SyntaxCheckers_applescript_osacompile_GetLocList() +function! SyntaxCheckers_applescript_osacompile_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'osacompile', \ 'args': '-o ' . tempname() . '.scpt ', - \ 'filetype': 'applescript', - \ 'subchecker': 'osacompile' }) + \ 'checker': self }) let errorformat = '%f:%l:%m' return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) diff --git a/syntax_checkers/asciidoc/asciidoc.vim b/syntax_checkers/asciidoc/asciidoc.vim index faa907cb..d9e40d32 100644 --- a/syntax_checkers/asciidoc/asciidoc.vim +++ b/syntax_checkers/asciidoc/asciidoc.vim @@ -19,12 +19,11 @@ function! SyntaxCheckers_asciidoc_asciidoc_IsAvailable() return executable("asciidoc") endfunction -function! SyntaxCheckers_asciidoc_asciidoc_GetLocList() +function! SyntaxCheckers_asciidoc_asciidoc_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'asciidoc', \ 'args': syntastic#c#NullOutput(), - \ 'filetype': 'asciidoc', - \ 'subchecker': 'asciidoc' }) + \ 'checker': self }) let errorformat = \ '%Easciidoc: %tRROR: %f: line %l: %m,' . diff --git a/syntax_checkers/c/checkpatch.vim b/syntax_checkers/c/checkpatch.vim index 3e077bdf..cea54d67 100644 --- a/syntax_checkers/c/checkpatch.vim +++ b/syntax_checkers/c/checkpatch.vim @@ -25,12 +25,11 @@ function! SyntaxCheckers_c_checkpatch_IsAvailable() endfunction -function! SyntaxCheckers_c_checkpatch_GetLocList() +function! SyntaxCheckers_c_checkpatch_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': g:syntastic_c_checker_checkpatch_location, \ 'args': '--no-summary --no-tree --terse --file', - \ 'filetype': 'c', - \ 'subchecker': 'checkpatch' }) + \ 'checker': self }) let errorformat = \ '%f:%l: %tARNING: %m,' . diff --git a/syntax_checkers/c/gcc.vim b/syntax_checkers/c/gcc.vim index 4e6a26b6..0a73ab0c 100644 --- a/syntax_checkers/c/gcc.vim +++ b/syntax_checkers/c/gcc.vim @@ -31,7 +31,7 @@ if !exists('g:syntastic_c_compiler_options') let g:syntastic_c_compiler_options = '-std=gnu99' endif -function! SyntaxCheckers_c_gcc_GetLocList() +function! SyntaxCheckers_c_gcc_GetLocList() dict return syntastic#c#GetLocList('c', 'gcc', { \ 'errorformat': \ '%-G%f:%s:,' . diff --git a/syntax_checkers/c/make.vim b/syntax_checkers/c/make.vim index 6620f84f..e0da876c 100644 --- a/syntax_checkers/c/make.vim +++ b/syntax_checkers/c/make.vim @@ -22,7 +22,7 @@ endfunction let s:save_cpo = &cpo set cpo&vim -function! SyntaxCheckers_c_make_GetLocList() +function! SyntaxCheckers_c_make_GetLocList() dict let makeprg = 'make -sk' diff --git a/syntax_checkers/c/oclint.vim b/syntax_checkers/c/oclint.vim index e366a7ab..b498b2c9 100644 --- a/syntax_checkers/c/oclint.vim +++ b/syntax_checkers/c/oclint.vim @@ -29,13 +29,12 @@ if !exists('g:syntastic_oclint_config_file') let g:syntastic_oclint_config_file = '.syntastic_oclint_config' endif -function! SyntaxCheckers_c_oclint_GetLocList() +function! SyntaxCheckers_c_oclint_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'oclint', \ 'args': '-text', \ 'post_args': '-- -c ' . syntastic#c#ReadConfig(g:syntastic_oclint_config_file), - \ 'filetype': 'c', - \ 'subchecker': 'oclint' }) + \ 'checker': self }) let errorformat = \ '%E%f:%l:%c: %m P1 ,' . diff --git a/syntax_checkers/c/sparse.vim b/syntax_checkers/c/sparse.vim index 0307e324..21938f47 100644 --- a/syntax_checkers/c/sparse.vim +++ b/syntax_checkers/c/sparse.vim @@ -29,12 +29,11 @@ if !exists('g:syntastic_sparse_config_file') let g:syntastic_sparse_config_file = '.syntastic_sparse_config' endif -function! SyntaxCheckers_c_sparse_GetLocList() +function! SyntaxCheckers_c_sparse_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'sparse', \ 'args': '-ftabstop=' . &ts . ' ' . syntastic#c#ReadConfig(g:syntastic_sparse_config_file), - \ 'filetype': 'c', - \ 'subchecker': 'sparse' }) + \ 'checker': self }) let errorformat = '%f:%l:%v: %trror: %m,%f:%l:%v: %tarning: %m,' diff --git a/syntax_checkers/c/splint.vim b/syntax_checkers/c/splint.vim index 6b2a1c1b..960e1370 100644 --- a/syntax_checkers/c/splint.vim +++ b/syntax_checkers/c/splint.vim @@ -29,12 +29,11 @@ if !exists('g:syntastic_splint_config_file') let g:syntastic_splint_config_file = '.syntastic_splint_config' endif -function! SyntaxCheckers_c_splint_GetLocList() +function! SyntaxCheckers_c_splint_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'splint', \ 'post_args': '-showfunc -hints +quiet ' . syntastic#c#ReadConfig(g:syntastic_splint_config_file), - \ 'filetype': 'c', - \ 'subchecker': 'splint' }) + \ 'checker': self }) let errorformat = \ '%-G%f:%l:%v: %[%#]%[%#]%[%#] Internal Bug %.%#,' . diff --git a/syntax_checkers/c/ycm.vim b/syntax_checkers/c/ycm.vim index 5cce6fc5..002ede56 100644 --- a/syntax_checkers/c/ycm.vim +++ b/syntax_checkers/c/ycm.vim @@ -23,7 +23,7 @@ if !exists('g:loaded_youcompleteme') finish endif -function! SyntaxCheckers_c_ycm_GetLocList() +function! SyntaxCheckers_c_ycm_GetLocList() dict return youcompleteme#CurrentFileDiagnostics() endfunction diff --git a/syntax_checkers/chef/foodcritic.vim b/syntax_checkers/chef/foodcritic.vim index 0808137b..a016ef89 100644 --- a/syntax_checkers/chef/foodcritic.vim +++ b/syntax_checkers/chef/foodcritic.vim @@ -19,11 +19,10 @@ function! SyntaxCheckers_chef_foodcritic_IsAvailable() return executable('foodcritic') endfunction -function! SyntaxCheckers_chef_foodcritic_GetLocList() +function! SyntaxCheckers_chef_foodcritic_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'foodcritic', - \ 'filetype': 'chef', - \ 'subchecker': 'foodcritic' }) + \ 'checker': self }) " FC023: Prefer conditional attributes: ./recipes/config.rb:49 let errorformat = 'FC%n: %m: %f:%l' diff --git a/syntax_checkers/co/coco.vim b/syntax_checkers/co/coco.vim index eea98bb8..7ed07c68 100644 --- a/syntax_checkers/co/coco.vim +++ b/syntax_checkers/co/coco.vim @@ -23,12 +23,11 @@ function! SyntaxCheckers_co_coco_IsAvailable() return executable('coco') endfunction -function! SyntaxCheckers_co_coco_GetLocList() +function! SyntaxCheckers_co_coco_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'coco', \ 'args': '-c -o /tmp', - \ 'filetype': 'co', - \ 'subchecker': 'coco' }) + \ 'checker': self }) let errorformat = \ '%EFailed at: %f,' . diff --git a/syntax_checkers/cobol/cobc.vim b/syntax_checkers/cobol/cobc.vim index 9399d432..edaa4ec8 100644 --- a/syntax_checkers/cobol/cobc.vim +++ b/syntax_checkers/cobol/cobc.vim @@ -31,7 +31,7 @@ if !exists('g:syntastic_cobol_compiler_options') let g:syntastic_cobol_compiler_options = '' endif -function! SyntaxCheckers_cobol_cobc_GetLocList() +function! SyntaxCheckers_cobol_cobc_GetLocList() dict return syntastic#c#GetLocList('cobol', 'cobc', { \ 'errorformat': '%f:%l: %trror: %m', \ 'main_flags': '-fsyntax-only' }) diff --git a/syntax_checkers/coffee/coffee.vim b/syntax_checkers/coffee/coffee.vim index 67054df8..c72d62ed 100644 --- a/syntax_checkers/coffee/coffee.vim +++ b/syntax_checkers/coffee/coffee.vim @@ -22,12 +22,11 @@ function! SyntaxCheckers_coffee_coffee_IsAvailable() \ syntastic#util#versionIsAtLeast(syntastic#util#getVersion('coffee --version 2>' . syntastic#util#DevNull()), [1,6,2]) endfunction -function! SyntaxCheckers_coffee_coffee_GetLocList() +function! SyntaxCheckers_coffee_coffee_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'coffee', \ 'args': '-cp', - \ 'filetype': 'coffee', - \ 'subchecker': 'coffee' }) + \ 'checker': self }) let errorformat = \ '%E%f:%l:%c: %trror: %m,' . diff --git a/syntax_checkers/coffee/coffeelint.vim b/syntax_checkers/coffee/coffeelint.vim index 2099359c..a7bdeae5 100644 --- a/syntax_checkers/coffee/coffeelint.vim +++ b/syntax_checkers/coffee/coffeelint.vim @@ -18,12 +18,11 @@ function! SyntaxCheckers_coffee_coffeelint_IsAvailable() return executable('coffeelint') endfunction -function! SyntaxCheckers_coffee_coffeelint_GetLocList() +function! SyntaxCheckers_coffee_coffeelint_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'coffeelint', \ 'args': '--csv', - \ 'filetype': 'coffee', - \ 'subchecker': 'coffeelint' }) + \ 'checker': self }) let errorformat = \ '%f\,%l\,%\d%#\,%trror\,%m,' . diff --git a/syntax_checkers/coq/coqtop.vim b/syntax_checkers/coq/coqtop.vim index f1efa4d8..b58a7ac9 100644 --- a/syntax_checkers/coq/coqtop.vim +++ b/syntax_checkers/coq/coqtop.vim @@ -19,12 +19,11 @@ function! SyntaxCheckers_coq_coqtop_IsAvailable() return executable('coqtop') endfunction -function! SyntaxCheckers_coq_coqtop_GetLocList() +function! SyntaxCheckers_coq_coqtop_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'coqtop', \ 'args': '-noglob -batch -load-vernac-source', - \ 'filetype': 'coq', - \ 'subchecker': 'coqtop' }) + \ 'checker': self }) let errorformat = \ '%AFile \"%f\"\, line %l\, characters %c\-%.%#\:,'. diff --git a/syntax_checkers/cpp/cpplint.vim b/syntax_checkers/cpp/cpplint.vim index 35e77ccc..7bcb2f9a 100644 --- a/syntax_checkers/cpp/cpplint.vim +++ b/syntax_checkers/cpp/cpplint.vim @@ -39,11 +39,10 @@ function! SyntaxCheckers_cpp_cpplint_IsAvailable() return executable('cpplint.py') endfunction -function! SyntaxCheckers_cpp_cpplint_GetLocList() +function! SyntaxCheckers_cpp_cpplint_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'cpplint.py', - \ 'filetype': 'cpp', - \ 'subchecker': 'cpplint' }) + \ 'checker': self }) let errorformat = '%A%f:%l: %m [%t],%-G%.%#' diff --git a/syntax_checkers/cpp/gcc.vim b/syntax_checkers/cpp/gcc.vim index de1fa657..c5cc59ff 100644 --- a/syntax_checkers/cpp/gcc.vim +++ b/syntax_checkers/cpp/gcc.vim @@ -30,7 +30,7 @@ if !exists('g:syntastic_cpp_compiler_options') let g:syntastic_cpp_compiler_options = '' endif -function! SyntaxCheckers_cpp_gcc_GetLocList() +function! SyntaxCheckers_cpp_gcc_GetLocList() dict return syntastic#c#GetLocList('cpp', 'gcc', { \ 'errorformat': \ '%-G%f:%s:,' . diff --git a/syntax_checkers/cpp/oclint.vim b/syntax_checkers/cpp/oclint.vim index 867f15de..70d64b68 100644 --- a/syntax_checkers/cpp/oclint.vim +++ b/syntax_checkers/cpp/oclint.vim @@ -21,16 +21,9 @@ if exists("g:loaded_syntastic_cpp_oclint_checker") endif let g:loaded_syntastic_cpp_oclint_checker = 1 -function! SyntaxCheckers_cpp_oclint_IsAvailable() - return SyntaxCheckers_c_oclint_IsAvailable() -endfunction - -function! SyntaxCheckers_cpp_oclint_GetLocList() - return SyntaxCheckers_c_oclint_GetLocList() -endfunction +runtime! syntax_checkers/c/*.vim call g:SyntasticRegistry.CreateAndRegisterChecker({ \ 'filetype': 'cpp', - \ 'name': 'oclint'}) - -runtime! syntax_checkers/c/*.vim + \ 'name': 'oclint', + \ 'redirect': 'c/oclint'}) diff --git a/syntax_checkers/cpp/ycm.vim b/syntax_checkers/cpp/ycm.vim index b0dbab58..df39a520 100644 --- a/syntax_checkers/cpp/ycm.vim +++ b/syntax_checkers/cpp/ycm.vim @@ -15,20 +15,13 @@ if exists("g:loaded_syntastic_cpp_ycm_checker") endif let g:loaded_syntastic_cpp_ycm_checker = 1 -function! SyntaxCheckers_cpp_ycm_IsAvailable() - return SyntaxCheckers_c_ycm_IsAvailable() -endfunction +runtime! syntax_checkers/c/*.vim if !exists('g:loaded_youcompleteme') finish endif -function! SyntaxCheckers_cpp_ycm_GetLocList() - return SyntaxCheckers_c_ycm_GetLocList() -endfunction - call g:SyntasticRegistry.CreateAndRegisterChecker({ \ 'filetype': 'cpp', - \ 'name': 'ycm'}) - -runtime! syntax_checkers/c/*.vim + \ 'name': 'ycm', + \ 'redirect': 'c/ycm'}) diff --git a/syntax_checkers/cs/mcs.vim b/syntax_checkers/cs/mcs.vim index b3c96a95..818a460e 100644 --- a/syntax_checkers/cs/mcs.vim +++ b/syntax_checkers/cs/mcs.vim @@ -19,12 +19,11 @@ function! SyntaxCheckers_cs_mcs_IsAvailable() return executable('mcs') endfunction -function! SyntaxCheckers_cs_mcs_GetLocList() +function! SyntaxCheckers_cs_mcs_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'mcs', \ 'args': '--parse', - \ 'filetype': 'cs', - \ 'subchecker': 'mcs' }) + \ 'checker': self }) let errorformat = '%f(%l\,%c): %trror %m' diff --git a/syntax_checkers/css/csslint.vim b/syntax_checkers/css/csslint.vim index 9093d982..f047d172 100644 --- a/syntax_checkers/css/csslint.vim +++ b/syntax_checkers/css/csslint.vim @@ -31,12 +31,11 @@ function! SyntaxCheckers_css_csslint_IsAvailable() return executable(expand(g:syntastic_csslint_exec)) endfunction -function! SyntaxCheckers_css_csslint_GetLocList() +function! SyntaxCheckers_css_csslint_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': expand(g:syntastic_csslint_exec), \ 'args': '--format=compact ' . g:syntastic_csslint_options, - \ 'filetype': 'css', - \ 'subchecker': 'csslint' }) + \ 'checker': self }) " Print CSS Lint's error/warning messages from compact format. Ignores blank lines. let errorformat = diff --git a/syntax_checkers/css/phpcs.vim b/syntax_checkers/css/phpcs.vim index ffcb7fee..8dc34a2c 100644 --- a/syntax_checkers/css/phpcs.vim +++ b/syntax_checkers/css/phpcs.vim @@ -18,16 +18,9 @@ if exists("g:loaded_syntastic_css_phpcs_checker") endif let g:loaded_syntastic_css_phpcs_checker=1 -function! SyntaxCheckers_css_phpcs_IsAvailable() - return SyntaxCheckers_php_phpcs_IsAvailable() -endfunction - -function! SyntaxCheckers_css_phpcs_GetLocList() - return SyntaxCheckers_php_phpcs_GetLocList() -endfunction +runtime! syntax_checkers/php/*.vim call g:SyntasticRegistry.CreateAndRegisterChecker({ \ 'filetype': 'css', - \ 'name': 'phpcs'}) - -runtime! syntax_checkers/php/*.vim + \ 'name': 'phpcs', + \ 'redirect': 'php/phpcs'}) diff --git a/syntax_checkers/css/prettycss.vim b/syntax_checkers/css/prettycss.vim index efc549a7..30b9392c 100644 --- a/syntax_checkers/css/prettycss.vim +++ b/syntax_checkers/css/prettycss.vim @@ -32,11 +32,10 @@ function! SyntaxCheckers_css_prettycss_GetHighlightRegex(item) return term endfunction -function! SyntaxCheckers_css_prettycss_GetLocList() +function! SyntaxCheckers_css_prettycss_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'prettycss', - \ 'filetype': 'css', - \ 'subchecker': 'prettycss' }) + \ 'checker': self }) " Print CSS Lint's error/warning messages from compact format. Ignores blank lines. let errorformat = diff --git a/syntax_checkers/cucumber/cucumber.vim b/syntax_checkers/cucumber/cucumber.vim index 4458c78f..187f6126 100644 --- a/syntax_checkers/cucumber/cucumber.vim +++ b/syntax_checkers/cucumber/cucumber.vim @@ -19,12 +19,11 @@ function! SyntaxCheckers_cucumber_cucumber_IsAvailable() return executable('cucumber') endfunction -function! SyntaxCheckers_cucumber_cucumber_GetLocList() +function! SyntaxCheckers_cucumber_cucumber_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'cucumber', \ 'args': '--dry-run --quiet --strict --format pretty', - \ 'filetype': 'cucumber', - \ 'subchecker': 'cucumber' }) + \ 'checker': self }) let errorformat = \ '%f:%l:%c:%m,' . diff --git a/syntax_checkers/cuda/nvcc.vim b/syntax_checkers/cuda/nvcc.vim index 8f99b0dc..ad92fc7b 100644 --- a/syntax_checkers/cuda/nvcc.vim +++ b/syntax_checkers/cuda/nvcc.vim @@ -28,7 +28,7 @@ function! SyntaxCheckers_cuda_nvcc_IsAvailable() return executable('nvcc') endfunction -function! SyntaxCheckers_cuda_nvcc_GetLocList() +function! SyntaxCheckers_cuda_nvcc_GetLocList() dict if exists('g:syntastic_cuda_arch') let arch_flag = '-arch=' . g:syntastic_cuda_arch else diff --git a/syntax_checkers/d/dmd.vim b/syntax_checkers/d/dmd.vim index 894ec6d7..267f8a29 100644 --- a/syntax_checkers/d/dmd.vim +++ b/syntax_checkers/d/dmd.vim @@ -35,7 +35,7 @@ if !exists('g:syntastic_d_compiler_options') let g:syntastic_d_compiler_options = '' endif -function! SyntaxCheckers_d_dmd_GetLocList() +function! SyntaxCheckers_d_dmd_GetLocList() dict return syntastic#c#GetLocList('d', 'dmd', { \ 'errorformat': \ '%-G%f:%s:,%f(%l): %m,' . diff --git a/syntax_checkers/dart/dart_analyzer.vim b/syntax_checkers/dart/dart_analyzer.vim index a0835c41..00420e9e 100644 --- a/syntax_checkers/dart/dart_analyzer.vim +++ b/syntax_checkers/dart/dart_analyzer.vim @@ -28,14 +28,13 @@ function! SyntaxCheckers_dart_dart_analyzer_GetHighlightRegex(error) return '\%>'.lcol.'c\%<'.rcol.'c' 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 makeprg = syntastic#makeprg#build({ \ 'exe': 'dart_analyzer', \ 'args': '--error_format machine', \ 'post_args': args, - \ 'filetype': 'dart', - \ 'subchecker': 'dart_analyzer' }) + \ 'checker': self }) " Machine readable format looks like: " SEVERITY|TYPE|ERROR_CODE|file:FILENAME|LINE_NUMBER|COLUMN|LENGTH|MESSAGE diff --git a/syntax_checkers/docbk/xmllint.vim b/syntax_checkers/docbk/xmllint.vim index cc0e3e35..78d801a7 100644 --- a/syntax_checkers/docbk/xmllint.vim +++ b/syntax_checkers/docbk/xmllint.vim @@ -15,16 +15,9 @@ if exists("g:loaded_syntastic_docbk_xmllint_checker") endif let g:loaded_syntastic_docbk_xmllint_checker=1 -function! SyntaxCheckers_docbk_xmllint_IsAvailable() - return SyntaxCheckers_xml_xmllint_IsAvailable() -endfunction - -function! SyntaxCheckers_docbk_xmllint_GetLocList() - return SyntaxCheckers_xml_xmllint_GetLocList() -endfunction +runtime! syntax_checkers/xml/*.vim call g:SyntasticRegistry.CreateAndRegisterChecker({ \ 'filetype': 'docbk', - \ 'name': 'xmllint'}) - -runtime! syntax_checkers/xml/*.vim + \ 'name': 'xmllint', + \ 'redirect': 'xml/xmllint'}) diff --git a/syntax_checkers/dustjs/swiffer.vim b/syntax_checkers/dustjs/swiffer.vim index 466a4999..eebd0beb 100644 --- a/syntax_checkers/dustjs/swiffer.vim +++ b/syntax_checkers/dustjs/swiffer.vim @@ -19,11 +19,10 @@ function! SyntaxCheckers_dustjs_swiffer_IsAvailable() return executable('swiffer') endfunction -function! SyntaxCheckers_dustjs_swiffer_GetLocList() +function! SyntaxCheckers_dustjs_swiffer_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'swiffer', - \ 'subchecker': 'swiffer', - \ 'filetype': 'dustjs' }) + \ 'checker': self }) let errorformat = '%E%f - Line %l\, Column %c: %m' diff --git a/syntax_checkers/elixir/elixir.vim b/syntax_checkers/elixir/elixir.vim index 521e9456..be7e1241 100644 --- a/syntax_checkers/elixir/elixir.vim +++ b/syntax_checkers/elixir/elixir.vim @@ -19,7 +19,7 @@ function! SyntaxCheckers_elixir_elixir_IsAvailable() return executable('elixir') && executable('mix') endfunction -function! SyntaxCheckers_elixir_elixir_GetLocList() +function! SyntaxCheckers_elixir_elixir_GetLocList() dict let make_options = {} let compile_command = 'elixir' @@ -32,8 +32,7 @@ function! SyntaxCheckers_elixir_elixir_GetLocList() let make_options['makeprg'] = syntastic#makeprg#build({ \ 'exe': compile_command, - \ 'filetype': 'elixir', - \ 'subchecker': 'elixir' }) + \ 'checker': self }) let make_options['errorformat'] = '** %*[^\ ] %f:%l: %m' diff --git a/syntax_checkers/erlang/escript.vim b/syntax_checkers/erlang/escript.vim index 9c409a59..20f6f71a 100644 --- a/syntax_checkers/erlang/escript.vim +++ b/syntax_checkers/erlang/escript.vim @@ -25,7 +25,7 @@ function! SyntaxCheckers_erlang_escript_IsAvailable() return executable('escript') endfunction -function! SyntaxCheckers_erlang_escript_GetLocList() +function! SyntaxCheckers_erlang_escript_GetLocList() dict if expand('%:e') ==# 'hrl' return [] endif @@ -43,8 +43,7 @@ function! SyntaxCheckers_erlang_escript_GetLocList() \ 'args': args, \ 'fname': syntastic#util#shexpand('%:p'), \ 'post_args': post_args, - \ 'filetype': 'erlang', - \ 'subchecker': 'escript' }) + \ 'checker': self }) let errorformat = \ '%W%f:%l: warning: %m,'. diff --git a/syntax_checkers/eruby/ruby.vim b/syntax_checkers/eruby/ruby.vim index dc496955..8df5db8e 100644 --- a/syntax_checkers/eruby/ruby.vim +++ b/syntax_checkers/eruby/ruby.vim @@ -23,7 +23,7 @@ function! SyntaxCheckers_eruby_ruby_IsAvailable() return executable(expand(g:syntastic_ruby_exec)) endfunction -function! SyntaxCheckers_eruby_ruby_GetLocList() +function! SyntaxCheckers_eruby_ruby_GetLocList() dict let exe = expand(g:syntastic_ruby_exec) if !has('win32') let exe = 'RUBYOPT= ' . exe diff --git a/syntax_checkers/fortran/gfortran.vim b/syntax_checkers/fortran/gfortran.vim index 002ad9c3..f7527779 100644 --- a/syntax_checkers/fortran/gfortran.vim +++ b/syntax_checkers/fortran/gfortran.vim @@ -30,7 +30,7 @@ if !exists('g:syntastic_fortran_compiler_options') let g:syntastic_fortran_compiler_options = '' endif -function! SyntaxCheckers_fortran_gfortran_GetLocList() +function! SyntaxCheckers_fortran_gfortran_GetLocList() dict return syntastic#c#GetLocList('fortran', 'gfortran', { \ 'errorformat': \ '%-C %#,'. diff --git a/syntax_checkers/go/go.vim b/syntax_checkers/go/go.vim index aa0427e3..e4f8f3f7 100644 --- a/syntax_checkers/go/go.vim +++ b/syntax_checkers/go/go.vim @@ -21,7 +21,7 @@ function! SyntaxCheckers_go_go_IsAvailable() return executable('go') 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 " syntax errors in the current file if another file with syntax error is " compiled first. @@ -29,8 +29,7 @@ function! SyntaxCheckers_go_go_GetLocList() \ 'exe': 'gofmt', \ 'args': '-l', \ 'tail': '1>' . syntastic#util#DevNull(), - \ 'filetype': 'go', - \ 'subchecker': 'go' }) + \ 'checker': self }) let errorformat = \ '%f:%l:%c: %m,' . diff --git a/syntax_checkers/go/gofmt.vim b/syntax_checkers/go/gofmt.vim index b150916f..4ad6e94a 100644 --- a/syntax_checkers/go/gofmt.vim +++ b/syntax_checkers/go/gofmt.vim @@ -21,13 +21,12 @@ function! SyntaxCheckers_go_gofmt_IsAvailable() return executable('gofmt') endfunction -function! SyntaxCheckers_go_gofmt_GetLocList() +function! SyntaxCheckers_go_gofmt_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'gofmt', \ 'args': '-l', \ 'tail': '1>' . syntastic#util#DevNull(), - \ 'filetype': 'go', - \ 'subchecker': 'gofmt' }) + \ 'checker': self }) let errorformat = '%f:%l:%c: %m,%-G%.%#' diff --git a/syntax_checkers/go/golint.vim b/syntax_checkers/go/golint.vim index 954a7c2a..98ec7bc2 100644 --- a/syntax_checkers/go/golint.vim +++ b/syntax_checkers/go/golint.vim @@ -18,11 +18,10 @@ function! SyntaxCheckers_go_golint_IsAvailable() return executable('golint') endfunction -function! SyntaxCheckers_go_golint_GetLocList() +function! SyntaxCheckers_go_golint_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'golint', - \ 'filetype': 'go', - \ 'subchecker': 'golint' }) + \ 'checker': self }) let errorformat = '%f:%l:%c: %m,%-G%.%#' diff --git a/syntax_checkers/go/govet.vim b/syntax_checkers/go/govet.vim index 4b1d7efb..901dcf58 100644 --- a/syntax_checkers/go/govet.vim +++ b/syntax_checkers/go/govet.vim @@ -18,7 +18,7 @@ function! SyntaxCheckers_go_govet_IsAvailable() return executable('go') endfunction -function! SyntaxCheckers_go_govet_GetLocList() +function! SyntaxCheckers_go_govet_GetLocList() dict let makeprg = 'go vet' let errorformat = '%Evet: %.%\+: %f:%l:%c: %m,%W%f:%l: %m,%-G%.%#' diff --git a/syntax_checkers/haml/haml.vim b/syntax_checkers/haml/haml.vim index 8371055f..93adc502 100644 --- a/syntax_checkers/haml/haml.vim +++ b/syntax_checkers/haml/haml.vim @@ -23,12 +23,11 @@ function! SyntaxCheckers_haml_haml_IsAvailable() return executable(expand(g:syntastic_haml_interpreter)) endfunction -function! SyntaxCheckers_haml_haml_GetLocList() +function! SyntaxCheckers_haml_haml_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': expand(g:syntastic_haml_interpreter), \ 'args': '-c', - \ 'filetype': 'haml', - \ 'subchecker': 'haml' }) + \ 'checker': self }) let errorformat = \ 'Haml error on line %l: %m,' . diff --git a/syntax_checkers/handlebars/handlebars.vim b/syntax_checkers/handlebars/handlebars.vim index e55ba43f..1e8a40ba 100644 --- a/syntax_checkers/handlebars/handlebars.vim +++ b/syntax_checkers/handlebars/handlebars.vim @@ -17,12 +17,11 @@ function! SyntaxCheckers_handlebars_handlebars_IsAvailable() return executable('handlebars') endfunction -function! SyntaxCheckers_handlebars_handlebars_GetLocList() +function! SyntaxCheckers_handlebars_handlebars_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'handlebars', \ 'args': '-f ' . syntastic#util#DevNull(), - \ 'filetype': 'handlebars', - \ 'subchecker': 'handlebars' }) + \ 'checker': self }) let errorformat = \ '%EError: %m on line %l:,'. diff --git a/syntax_checkers/haskell/ghc-mod.vim b/syntax_checkers/haskell/ghc-mod.vim index 3dcc6e7e..4a8689a4 100644 --- a/syntax_checkers/haskell/ghc-mod.vim +++ b/syntax_checkers/haskell/ghc-mod.vim @@ -19,11 +19,10 @@ function! SyntaxCheckers_haskell_ghc_mod_IsAvailable() return executable('ghc-mod') endfunction -function! SyntaxCheckers_haskell_ghc_mod_GetLocList() +function! SyntaxCheckers_haskell_ghc_mod_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'ghc-mod check', - \ 'filetype': 'haskell', - \ 'subchecker': 'ghc_mod' }) + \ 'checker': self }) let errorformat = \ '%-G%\s%#,' . diff --git a/syntax_checkers/haskell/hdevtools.vim b/syntax_checkers/haskell/hdevtools.vim index 58b015f9..c7fb45cb 100644 --- a/syntax_checkers/haskell/hdevtools.vim +++ b/syntax_checkers/haskell/hdevtools.vim @@ -19,12 +19,11 @@ function! SyntaxCheckers_haskell_hdevtools_IsAvailable() return executable('hdevtools') endfunction -function! SyntaxCheckers_haskell_hdevtools_GetLocList() +function! SyntaxCheckers_haskell_hdevtools_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'hdevtools check', \ 'args': get(g:, 'hdevtools_options', ''), - \ 'filetype': 'haskell', - \ 'subchecker': 'hdevtools' }) + \ 'checker': self }) let errorformat= '\%-Z\ %#,'. \ '%W%f:%l:%c:\ Warning:\ %m,'. diff --git a/syntax_checkers/haskell/hlint.vim b/syntax_checkers/haskell/hlint.vim index f9f0fcd4..da94b1ef 100644 --- a/syntax_checkers/haskell/hlint.vim +++ b/syntax_checkers/haskell/hlint.vim @@ -14,11 +14,10 @@ function! SyntaxCheckers_haskell_hlint_IsAvailable() return executable('hlint') endfunction -function! SyntaxCheckers_haskell_hlint_GetLocList() +function! SyntaxCheckers_haskell_hlint_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'hlint', - \ 'filetype': 'haskell', - \ 'subchecker': 'hlint' }) + \ 'checker': self }) let errorformat = \ '%E%f:%l:%c: Error: %m,' . diff --git a/syntax_checkers/haxe/haxe.vim b/syntax_checkers/haxe/haxe.vim index 969a9369..532bc10b 100644 --- a/syntax_checkers/haxe/haxe.vim +++ b/syntax_checkers/haxe/haxe.vim @@ -19,7 +19,7 @@ function! SyntaxCheckers_haxe_haxe_IsAvailable() return executable('haxe') endfunction -function! SyntaxCheckers_haxe_haxe_GetLocList() +function! SyntaxCheckers_haxe_haxe_GetLocList() dict if exists('b:vaxe_hxml') let hxml = b:vaxe_hxml elseif exists('g:vaxe_hxml') @@ -33,8 +33,7 @@ function! SyntaxCheckers_haxe_haxe_GetLocList() let makeprg = syntastic#makeprg#build({ \ 'exe': 'haxe', \ 'fname': syntastic#util#shescape(fnameescape(fnamemodify(hxml, ':t'))), - \ 'filetype': 'haxe', - \ 'subchecker': 'haxe' }) + \ 'checker': self }) let errorformat = '%E%f:%l: characters %c-%*[0-9] : %m' diff --git a/syntax_checkers/hss/hss.vim b/syntax_checkers/hss/hss.vim index 5d2cf005..62c53e12 100644 --- a/syntax_checkers/hss/hss.vim +++ b/syntax_checkers/hss/hss.vim @@ -19,12 +19,11 @@ function! SyntaxCheckers_hss_hss_IsAvailable() return executable('hss') endfunction -function! SyntaxCheckers_hss_hss_GetLocList() +function! SyntaxCheckers_hss_hss_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'hss', \ 'args' : '-output ' . syntastic#util#DevNull(), - \ 'filetype': 'hss', - \ 'subchecker': 'hss' }) + \ 'checker': self }) let errorformat = '%E%f:%l: %m' diff --git a/syntax_checkers/html/tidy.vim b/syntax_checkers/html/tidy.vim index 14f79f7b..eb978694 100644 --- a/syntax_checkers/html/tidy.vim +++ b/syntax_checkers/html/tidy.vim @@ -139,13 +139,12 @@ function! s:Args() return args endfunction -function! SyntaxCheckers_html_tidy_GetLocList() +function! SyntaxCheckers_html_tidy_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'tidy', \ 'args': s:Args(), \ 'tail': '2>&1', - \ 'filetype': 'html', - \ 'subchecker': 'tidy' }) + \ 'checker': self }) let errorformat = \ '%Wline %l column %v - Warning: %m,' . diff --git a/syntax_checkers/html/validator.vim b/syntax_checkers/html/validator.vim index d26f7c0e..9883e0d4 100644 --- a/syntax_checkers/html/validator.vim +++ b/syntax_checkers/html/validator.vim @@ -64,7 +64,7 @@ function! SyntaxCheckers_html_validator_Preprocess(errors) return out endfunction -function! SyntaxCheckers_html_validator_GetLocList() +function! SyntaxCheckers_html_validator_GetLocList() dict let fname = syntastic#util#shexpand('%') let makeprg = 'curl -s --compressed -F out=gnu -F asciiquotes=yes' . \ (!empty(g:syntastic_html_validator_parser) ? ' -F parser=' . g:syntastic_html_validator_parser : '') . diff --git a/syntax_checkers/html/w3.vim b/syntax_checkers/html/w3.vim index 94aa650c..e1ebcfe1 100644 --- a/syntax_checkers/html/w3.vim +++ b/syntax_checkers/html/w3.vim @@ -30,7 +30,7 @@ function! SyntaxCheckers_html_w3_IsAvailable() return executable('curl') endfunction -function! SyntaxCheckers_html_w3_GetLocList() +function! SyntaxCheckers_html_w3_GetLocList() dict let makeprg = 'curl -s -F output=json ' . \ '-F uploaded_file=@' . syntastic#util#shexpand('%:p') . '\;type=text/html ' . \ g:syntastic_html_w3_api diff --git a/syntax_checkers/java/checkstyle.vim b/syntax_checkers/java/checkstyle.vim index 058d44f9..b70db1fd 100644 --- a/syntax_checkers/java/checkstyle.vim +++ b/syntax_checkers/java/checkstyle.vim @@ -39,7 +39,7 @@ function! SyntaxCheckers_java_checkstyle_Preprocess(errors) return out endfunction -function! SyntaxCheckers_java_checkstyle_GetLocList() +function! SyntaxCheckers_java_checkstyle_GetLocList() dict 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 . \ ' -f xml', \ 'fname': fname, - \ 'filetype': 'java', - \ 'subchecker': 'checkstyle' }) + \ 'checker': self }) let errorformat = \ '%P,' . diff --git a/syntax_checkers/java/javac.vim b/syntax_checkers/java/javac.vim index e9b14030..784a17ce 100644 --- a/syntax_checkers/java/javac.vim +++ b/syntax_checkers/java/javac.vim @@ -267,7 +267,7 @@ function! s:MavenOutputDirectory() return '.' endfunction -function! SyntaxCheckers_java_javac_GetLocList() +function! SyntaxCheckers_java_javac_GetLocList() dict let javac_opts = g:syntastic_java_javac_options @@ -335,8 +335,7 @@ function! SyntaxCheckers_java_javac_GetLocList() \ 'args': javac_opts, \ 'fname': fname, \ 'tail': '2>&1', - \ 'filetype': 'java', - \ 'subchecker': 'javac' }) + \ 'checker': self }) " unashamedly stolen from *errorformat-javac* (quickfix.txt) and modified to include error types let errorformat = diff --git a/syntax_checkers/javascript/closurecompiler.vim b/syntax_checkers/javascript/closurecompiler.vim index 6c55f4f2..36c758f4 100644 --- a/syntax_checkers/javascript/closurecompiler.vim +++ b/syntax_checkers/javascript/closurecompiler.vim @@ -34,7 +34,7 @@ function! SyntaxCheckers_javascript_closurecompiler_IsAvailable() return exists("g:syntastic_javascript_closure_compiler_path") endfunction -function! SyntaxCheckers_javascript_closurecompiler_GetLocList() +function! SyntaxCheckers_javascript_closurecompiler_GetLocList() dict if exists("g:syntastic_javascript_closure_compiler_file_list") let file_list = join(readfile(g:syntastic_javascript_closure_compiler_file_list), ' ') else @@ -45,8 +45,7 @@ function! SyntaxCheckers_javascript_closurecompiler_GetLocList() \ 'exe': 'java -jar ' . g:syntastic_javascript_closure_compiler_path, \ 'args': g:syntastic_javascript_closure_compiler_options . ' --js' , \ 'fname': file_list, - \ 'filetype': 'javascript', - \ 'subchecker': 'closurecompiler' }) + \ 'checker': self }) let errorformat = \ '%-GOK,'. diff --git a/syntax_checkers/javascript/gjslint.vim b/syntax_checkers/javascript/gjslint.vim index 039d0eed..72e9ac51 100644 --- a/syntax_checkers/javascript/gjslint.vim +++ b/syntax_checkers/javascript/gjslint.vim @@ -21,12 +21,11 @@ function! SyntaxCheckers_javascript_gjslint_IsAvailable() return executable('gjslint') endfunction -function! SyntaxCheckers_javascript_gjslint_GetLocList() +function! SyntaxCheckers_javascript_gjslint_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'gjslint', \ 'args': g:syntastic_javascript_gjslint_conf . " --nosummary --unix_mode --nodebug_indentation --nobeep", - \ 'filetype': 'javascript', - \ 'subchecker': 'gjslint' }) + \ 'checker': self }) let errorformat = \ "%f:%l:(New Error -%\\?\%n) %m," . diff --git a/syntax_checkers/javascript/jshint.vim b/syntax_checkers/javascript/jshint.vim index b4c576ea..528c2729 100644 --- a/syntax_checkers/javascript/jshint.vim +++ b/syntax_checkers/javascript/jshint.vim @@ -26,13 +26,12 @@ function! SyntaxCheckers_javascript_jshint_IsAvailable() return executable(expand(g:syntastic_jshint_exec)) endfunction -function! SyntaxCheckers_javascript_jshint_GetLocList() +function! SyntaxCheckers_javascript_jshint_GetLocList() dict let jshint_new = s:JshintNew() let makeprg = syntastic#makeprg#build({ \ 'exe': expand(g:syntastic_jshint_exec), \ 'post_args': (jshint_new ? ' --verbose ' : '') . s:Args(), - \ 'filetype': 'javascript', - \ 'subchecker': 'jshint' }) + \ 'checker': self }) let errorformat = jshint_new ? \ '%f: line %l\, col %c\, %m \(%t%*\d\)' : diff --git a/syntax_checkers/javascript/jsl.vim b/syntax_checkers/javascript/jsl.vim index 63f5e441..2da8e70b 100644 --- a/syntax_checkers/javascript/jsl.vim +++ b/syntax_checkers/javascript/jsl.vim @@ -29,12 +29,11 @@ function! SyntaxCheckers_javascript_jsl_IsAvailable() return executable('jsl') endfunction -function! SyntaxCheckers_javascript_jsl_GetLocList() +function! SyntaxCheckers_javascript_jsl_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'jsl', \ 'args': s:ConfFlag() . " -nologo -nofilelisting -nosummary -nocontext -process", - \ 'filetype': 'javascript', - \ 'subchecker': 'jsl' }) + \ 'checker': self }) let errorformat = \ '%W%f(%l): lint warning: %m,'. diff --git a/syntax_checkers/javascript/jslint.vim b/syntax_checkers/javascript/jslint.vim index 384b4b85..a3ef9a50 100644 --- a/syntax_checkers/javascript/jslint.vim +++ b/syntax_checkers/javascript/jslint.vim @@ -31,12 +31,11 @@ function! SyntaxCheckers_javascript_jslint_HighlightTerm(error) return '\V'.split(unexpected, "'")[1] endfunction -function! SyntaxCheckers_javascript_jslint_GetLocList() +function! SyntaxCheckers_javascript_jslint_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'jslint', \ 'args': g:syntastic_javascript_jslint_conf, - \ 'filetype': 'javascript', - \ 'subchecker': 'jslint' }) + \ 'checker': self }) let errorformat = \ '%E %##%n %m,'. diff --git a/syntax_checkers/json/jsonlint.vim b/syntax_checkers/json/jsonlint.vim index 7c6b34d5..1b65c9e8 100644 --- a/syntax_checkers/json/jsonlint.vim +++ b/syntax_checkers/json/jsonlint.vim @@ -18,12 +18,11 @@ function! SyntaxCheckers_json_jsonlint_IsAvailable() return executable('jsonlint') endfunction -function! SyntaxCheckers_json_jsonlint_GetLocList() +function! SyntaxCheckers_json_jsonlint_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'jsonlint', \ 'post_args': '--compact', - \ 'filetype': 'json', - \ 'subchecker': 'jsonlint' }) + \ 'checker': self }) let errorformat = \ '%ELine %l:%c,'. diff --git a/syntax_checkers/json/jsonval.vim b/syntax_checkers/json/jsonval.vim index 4359e86c..283649ca 100644 --- a/syntax_checkers/json/jsonval.vim +++ b/syntax_checkers/json/jsonval.vim @@ -18,12 +18,11 @@ function! SyntaxCheckers_json_jsonval_IsAvailable() return executable('jsonval') endfunction -function! SyntaxCheckers_json_jsonval_GetLocList() +function! SyntaxCheckers_json_jsonval_GetLocList() dict " based on https://gist.github.com/1196345 let makeprg = syntastic#makeprg#build({ \ 'exe': 'jsonval', - \ 'filetype': 'json', - \ 'subchecker': 'jsonval' }) + \ 'checker': self }) let errorformat = \ '%E%f:\ %m\ at\ line\ %l,' . diff --git a/syntax_checkers/less/lessc.vim b/syntax_checkers/less/lessc.vim index 05f82527..73c85d6d 100644 --- a/syntax_checkers/less/lessc.vim +++ b/syntax_checkers/less/lessc.vim @@ -40,13 +40,12 @@ function! SyntaxCheckers_less_lessc_IsAvailable() return executable('lessc') endfunction -function! SyntaxCheckers_less_lessc_GetLocList() +function! SyntaxCheckers_less_lessc_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': s:check_file, \ 'args': g:syntastic_less_options, \ 'tail': syntastic#util#DevNull(), - \ 'filetype': 'less', - \ 'subchecker': 'lessc' }) + \ 'checker': self }) let errorformat = '%m in %f:%l:%c' diff --git a/syntax_checkers/lisp/clisp.vim b/syntax_checkers/lisp/clisp.vim index caf094f1..ec9c2ce0 100644 --- a/syntax_checkers/lisp/clisp.vim +++ b/syntax_checkers/lisp/clisp.vim @@ -18,13 +18,12 @@ function! SyntaxCheckers_lisp_clisp_IsAvailable() return executable("clisp") endfunction -function! SyntaxCheckers_lisp_clisp_GetLocList() +function! SyntaxCheckers_lisp_clisp_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'clisp', \ 'args': '-q -c', \ 'tail': '-o /tmp/clisp-vim-compiled-file', - \ 'filetype': 'lisp', - \ 'subchecker': 'clisp' }) + \ 'checker': self }) let errorformat = \ '%-G;%.%#,' . diff --git a/syntax_checkers/llvm/llvm.vim b/syntax_checkers/llvm/llvm.vim index 61d16fc1..fe52df14 100644 --- a/syntax_checkers/llvm/llvm.vim +++ b/syntax_checkers/llvm/llvm.vim @@ -18,12 +18,11 @@ function! SyntaxCheckers_llvm_llvm_IsAvailable() return executable("llc") endfunction -function! SyntaxCheckers_llvm_llvm_GetLocList() +function! SyntaxCheckers_llvm_llvm_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'llc', \ 'args': syntastic#c#NullOutput(), - \ 'filetype': 'llvm', - \ 'subchecker': 'llvm' }) + \ 'checker': self }) let errorformat = 'llc: %f:%l:%c: %trror: %m' diff --git a/syntax_checkers/lua/luac.vim b/syntax_checkers/lua/luac.vim index ad4e8baa..7ef19eed 100644 --- a/syntax_checkers/lua/luac.vim +++ b/syntax_checkers/lua/luac.vim @@ -43,12 +43,11 @@ function! SyntaxCheckers_lua_luac_GetHighlightRegex(pos) endfunction -function! SyntaxCheckers_lua_luac_GetLocList() +function! SyntaxCheckers_lua_luac_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'luac', \ 'args': '-p', - \ 'filetype': 'lua', - \ 'subchecker': 'luac' }) + \ 'checker': self }) let errorformat = 'luac: %#%f:%l: %m' diff --git a/syntax_checkers/matlab/mlint.vim b/syntax_checkers/matlab/mlint.vim index 380d22c8..82cb681e 100644 --- a/syntax_checkers/matlab/mlint.vim +++ b/syntax_checkers/matlab/mlint.vim @@ -19,12 +19,11 @@ function! SyntaxCheckers_matlab_mlint_IsAvailable() return executable("mlint") endfunction -function! SyntaxCheckers_matlab_mlint_GetLocList() +function! SyntaxCheckers_matlab_mlint_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'mlint', \ 'args': '-id $*', - \ 'filetype': 'matlab', - \ 'subchecker': 'mlint' }) + \ 'checker': self }) let errorformat = \ 'L %l (C %c): %*[a-zA-Z0-9]: %m,'. diff --git a/syntax_checkers/nasm/nasm.vim b/syntax_checkers/nasm/nasm.vim index 8476b515..b986f534 100644 --- a/syntax_checkers/nasm/nasm.vim +++ b/syntax_checkers/nasm/nasm.vim @@ -18,13 +18,12 @@ function! SyntaxCheckers_nasm_nasm_IsAvailable() return executable("nasm") endfunction -function! SyntaxCheckers_nasm_nasm_GetLocList() +function! SyntaxCheckers_nasm_nasm_GetLocList() dict let wd = syntastic#util#shescape(expand("%:p:h") . "/") let makeprg = syntastic#makeprg#build({ \ 'exe': 'nasm', \ 'args': '-X gnu -f elf -I ' . wd . ' ' . syntastic#c#NullOutput(), - \ 'filetype': 'nasm', - \ 'subchecker': 'nasm' }) + \ 'checker': self }) let errorformat = '%f:%l: %t%*[^:]: %m' diff --git a/syntax_checkers/nroff/mandoc.vim b/syntax_checkers/nroff/mandoc.vim index 3333d24e..d09c3626 100644 --- a/syntax_checkers/nroff/mandoc.vim +++ b/syntax_checkers/nroff/mandoc.vim @@ -18,12 +18,11 @@ function! SyntaxCheckers_nroff_mandoc_IsAvailable() return executable("mandoc") endfunction -function! SyntaxCheckers_nroff_mandoc_GetLocList() +function! SyntaxCheckers_nroff_mandoc_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'mandoc', \ 'args': '-Tlint', - \ 'filetype': 'nroff', - \ 'subchecker': 'mandoc' }) + \ 'checker': self }) let errorformat = \ '%E%f:%l:%c: %tRROR: %m,' . diff --git a/syntax_checkers/objc/gcc.vim b/syntax_checkers/objc/gcc.vim index 320290f5..48b3d564 100644 --- a/syntax_checkers/objc/gcc.vim +++ b/syntax_checkers/objc/gcc.vim @@ -30,7 +30,7 @@ if !exists('g:syntastic_objc_compiler_options') let g:syntastic_objc_compiler_options = '-std=gnu99' endif -function! SyntaxCheckers_objc_gcc_GetLocList() +function! SyntaxCheckers_objc_gcc_GetLocList() dict return syntastic#c#GetLocList('objc', 'gcc', { \ 'errorformat': \ '%-G%f:%s:,' . diff --git a/syntax_checkers/objc/oclint.vim b/syntax_checkers/objc/oclint.vim index 0ebd6612..d3108eb6 100644 --- a/syntax_checkers/objc/oclint.vim +++ b/syntax_checkers/objc/oclint.vim @@ -21,16 +21,9 @@ if exists("g:loaded_syntastic_objc_oclint_checker") endif let g:loaded_syntastic_objc_oclint_checker = 1 -function! SyntaxCheckers_objc_oclint_IsAvailable() - return SyntaxCheckers_c_oclint_IsAvailable() -endfunction - -function! SyntaxCheckers_objc_oclint_GetLocList() - return SyntaxCheckers_c_oclint_GetLocList() -endfunction +runtime! syntax_checkers/c/*.vim call g:SyntasticRegistry.CreateAndRegisterChecker({ \ 'filetype': 'objc', - \ 'name': 'oclint'}) - -runtime! syntax_checkers/c/*.vim + \ 'name': 'oclint', + \ 'redirect': 'c/oclint'}) diff --git a/syntax_checkers/objc/ycm.vim b/syntax_checkers/objc/ycm.vim index 40f53fb4..8157b38d 100644 --- a/syntax_checkers/objc/ycm.vim +++ b/syntax_checkers/objc/ycm.vim @@ -17,18 +17,11 @@ let g:loaded_syntastic_objc_ycm_checker = 1 runtime! syntax_checkers/c/*.vim -function! SyntaxCheckers_objc_ycm_IsAvailable() - return SyntaxCheckers_c_ycm_IsAvailable() -endfunction - if !exists('g:loaded_youcompleteme') finish endif -function! SyntaxCheckers_objc_ycm_GetLocList() - return SyntaxCheckers_c_ycm_GetLocList() -endfunction - call g:SyntasticRegistry.CreateAndRegisterChecker({ \ 'filetype': 'objc', - \ 'name': 'ycm'}) + \ 'name': 'ycm', + \ 'redirect': 'c/ycm'}) diff --git a/syntax_checkers/objcpp/gcc.vim b/syntax_checkers/objcpp/gcc.vim index 93ff2194..480dbebb 100644 --- a/syntax_checkers/objcpp/gcc.vim +++ b/syntax_checkers/objcpp/gcc.vim @@ -30,7 +30,7 @@ if !exists('g:syntastic_objcpp_compiler_options') let g:syntastic_objcpp_compiler_options = '-std=gnu99' endif -function! SyntaxCheckers_objcpp_gcc_GetLocList() +function! SyntaxCheckers_objcpp_gcc_GetLocList() dict return syntastic#c#GetLocList('objcpp', 'gcc', { \ 'errorformat': \ '%-G%f:%s:,' . diff --git a/syntax_checkers/objcpp/oclint.vim b/syntax_checkers/objcpp/oclint.vim index a46fe045..59eb7cc7 100644 --- a/syntax_checkers/objcpp/oclint.vim +++ b/syntax_checkers/objcpp/oclint.vim @@ -21,16 +21,9 @@ if exists("g:loaded_syntastic_objcpp_oclint_checker") endif let g:loaded_syntastic_objcpp_oclint_checker = 1 -function! SyntaxCheckers_objcpp_oclint_IsAvailable() - return SyntaxCheckers_c_oclint_IsAvailable() -endfunction - -function! SyntaxCheckers_objcpp_oclint_GetLocList() - return SyntaxCheckers_c_oclint_GetLocList() -endfunction +runtime! syntax_checkers/c/*.vim call g:SyntasticRegistry.CreateAndRegisterChecker({ \ 'filetype': 'objcpp', - \ 'name': 'oclint'}) - -runtime! syntax_checkers/c/*.vim + \ 'name': 'oclint', + \ 'redirect': 'c/oclint'}) diff --git a/syntax_checkers/objcpp/ycm.vim b/syntax_checkers/objcpp/ycm.vim index c9a0e458..3bad05eb 100644 --- a/syntax_checkers/objcpp/ycm.vim +++ b/syntax_checkers/objcpp/ycm.vim @@ -15,20 +15,13 @@ if exists("g:loaded_syntastic_objcpp_ycm_checker") endif 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') finish endif -function! SyntaxCheckers_objcpp_ycm_GetLocList() - return SyntaxCheckers_c_ycm_GetLocList() -endfunction +runtime! syntax_checkers/c/*.vim call g:SyntasticRegistry.CreateAndRegisterChecker({ \ 'filetype': 'objcpp', - \ 'name': 'ycm'}) + \ 'name': 'ycm', + \ 'redirect': 'c/ycm'}) diff --git a/syntax_checkers/ocaml/camlp4o.vim b/syntax_checkers/ocaml/camlp4o.vim index aa876719..a2731cba 100644 --- a/syntax_checkers/ocaml/camlp4o.vim +++ b/syntax_checkers/ocaml/camlp4o.vim @@ -76,7 +76,7 @@ if !exists('g:syntastic_ocaml_use_ocamlbuild') || !executable("ocamlbuild") let g:syntastic_ocaml_use_ocamlbuild = 0 endif -function! SyntaxCheckers_ocaml_camlp4o_GetLocList() +function! SyntaxCheckers_ocaml_camlp4o_GetLocList() dict let makeprg = s:GetMakeprg() if makeprg == "" return [] diff --git a/syntax_checkers/perl/perl.vim b/syntax_checkers/perl/perl.vim index 029f4354..855ef34e 100644 --- a/syntax_checkers/perl/perl.vim +++ b/syntax_checkers/perl/perl.vim @@ -51,7 +51,7 @@ function! SyntaxCheckers_perl_perl_Preprocess(errors) return syntastic#util#unique(out) endfunction -function! SyntaxCheckers_perl_perl_GetLocList() +function! SyntaxCheckers_perl_perl_GetLocList() dict if type(g:syntastic_perl_lib_path) == type('') call syntastic#util#deprecationWarn('variable g:syntastic_perl_lib_path should be a list') let includes = split(g:syntastic_perl_lib_path, ',') @@ -67,8 +67,7 @@ function! SyntaxCheckers_perl_perl_GetLocList() let makeprg = syntastic#makeprg#build({ \ 'exe': g:syntastic_perl_interpreter, \ 'args': '-c -X ' . extra, - \ 'filetype': 'perl', - \ 'subchecker': 'perl' }) + \ 'checker': self }) let errors = SyntasticMake({ \ 'makeprg': makeprg, @@ -82,8 +81,7 @@ function! SyntaxCheckers_perl_perl_GetLocList() let makeprg = syntastic#makeprg#build({ \ 'exe': g:syntastic_perl_interpreter, \ 'args': '-c -Mwarnings ' . extra, - \ 'filetype': 'perl', - \ 'subchecker': 'perl' }) + \ 'checker': self }) return SyntasticMake({ \ 'makeprg': makeprg, diff --git a/syntax_checkers/perl/perlcritic.vim b/syntax_checkers/perl/perlcritic.vim index 910ded2b..f64d44be 100644 --- a/syntax_checkers/perl/perlcritic.vim +++ b/syntax_checkers/perl/perlcritic.vim @@ -37,12 +37,11 @@ function! SyntaxCheckers_perl_perlcritic_IsAvailable() return executable('perlcritic') endfunction -function! SyntaxCheckers_perl_perlcritic_GetLocList() +function! SyntaxCheckers_perl_perlcritic_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'perlcritic', \ 'post_args': '--quiet --nocolor --verbose "\%s:\%f:\%l:\%c:(\%s) \%m (\%e)\n"', - \ 'filetype': 'perl', - \ 'subchecker': 'perlcritic' }) + \ 'checker': self }) let errorformat = '%t:%f:%l:%c:%m' diff --git a/syntax_checkers/perl/podchecker.vim b/syntax_checkers/perl/podchecker.vim index e6f80e66..bf7cf880 100644 --- a/syntax_checkers/perl/podchecker.vim +++ b/syntax_checkers/perl/podchecker.vim @@ -15,16 +15,9 @@ if exists("g:loaded_syntastic_perl_podchecker_checker") endif let g:loaded_syntastic_perl_podchecker_checker=1 -function! SyntaxCheckers_perl_podchecker_IsAvailable() - return SyntaxCheckers_pod_podchecker_IsAvailable() -endfunction - -function! SyntaxCheckers_perl_podchecker_GetLocList() - return SyntaxCheckers_pod_podchecker_GetLocList() -endfunction +runtime! syntax_checkers/pod/*.vim call g:SyntasticRegistry.CreateAndRegisterChecker({ \ 'filetype': 'perl', - \ 'name': 'podchecker'}) - -runtime! syntax_checkers/pod/*.vim + \ 'name': 'podchecker', + \ 'redirect': 'pod/podchecker'}) diff --git a/syntax_checkers/php/php.vim b/syntax_checkers/php/php.vim index 3c2f4237..a0fb65d9 100644 --- a/syntax_checkers/php/php.vim +++ b/syntax_checkers/php/php.vim @@ -27,12 +27,11 @@ function! SyntaxCheckers_php_php_GetHighlightRegex(item) return '\V'.split(unexpected, "'")[1] endfunction -function! SyntaxCheckers_php_php_GetLocList() +function! SyntaxCheckers_php_php_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'php', \ 'args': '-l -d error_reporting=E_ALL -d display_errors=1 -d log_errors=0 -d xdebug.cli_color=0', - \ 'filetype': 'php', - \ 'subchecker': 'php' }) + \ 'checker': self }) let errorformat = \ '%-GNo syntax errors detected in%.%#,'. diff --git a/syntax_checkers/php/phpcs.vim b/syntax_checkers/php/phpcs.vim index f6646c66..2abdbf25 100644 --- a/syntax_checkers/php/phpcs.vim +++ b/syntax_checkers/php/phpcs.vim @@ -22,12 +22,11 @@ function! SyntaxCheckers_php_phpcs_IsAvailable() return executable('phpcs') endfunction -function! SyntaxCheckers_php_phpcs_GetLocList() +function! SyntaxCheckers_php_phpcs_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'phpcs', \ 'args': '--report=csv', - \ 'filetype': 'php', - \ 'subchecker': 'phpcs' }) + \ 'checker': self }) let errorformat = \ '%-GFile\,Line\,Column\,Type\,Message\,Source\,Severity,'. diff --git a/syntax_checkers/php/phpmd.vim b/syntax_checkers/php/phpmd.vim index 99c3be6b..2dbcb563 100644 --- a/syntax_checkers/php/phpmd.vim +++ b/syntax_checkers/php/phpmd.vim @@ -58,12 +58,11 @@ function! SyntaxCheckers_php_phpmd_GetHighlightRegex(item) return '' endfunction -function! SyntaxCheckers_php_phpmd_GetLocList() +function! SyntaxCheckers_php_phpmd_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'phpmd', \ 'post_args': 'text codesize,design,unusedcode,naming', - \ 'filetype': 'php', - \ 'subchecker': 'phpmd' }) + \ 'checker': self }) let errorformat = '%E%f:%l%\s%#%m' diff --git a/syntax_checkers/pod/podchecker.vim b/syntax_checkers/pod/podchecker.vim index c429a495..66e6ddf8 100644 --- a/syntax_checkers/pod/podchecker.vim +++ b/syntax_checkers/pod/podchecker.vim @@ -18,11 +18,10 @@ function! SyntaxCheckers_pod_podchecker_IsAvailable() return executable("podchecker") endfunction -function! SyntaxCheckers_pod_podchecker_GetLocList() +function! SyntaxCheckers_pod_podchecker_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'podchecker', - \ 'filetype': 'pod', - \ 'subchecker': 'podchecker' }) + \ 'checker': self }) let errorformat = \ '%W%[%#]%[%#]%[%#] WARNING: %m at line %l in file %f,' . diff --git a/syntax_checkers/puppet/puppet.vim b/syntax_checkers/puppet/puppet.vim index 5889c78f..f9019c09 100644 --- a/syntax_checkers/puppet/puppet.vim +++ b/syntax_checkers/puppet/puppet.vim @@ -19,7 +19,7 @@ function! SyntaxCheckers_puppet_puppet_IsAvailable() return executable("puppet") endfunction -function! SyntaxCheckers_puppet_puppet_GetLocList() +function! SyntaxCheckers_puppet_puppet_GetLocList() dict 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({ \ 'exe': 'puppet', \ 'args': args, - \ 'filetype': 'puppet', - \ 'subchecker': 'puppet' }) + \ 'checker': self }) let errorformat = \ '%-Gerr: Try ''puppet help parser validate'' for usage,' . diff --git a/syntax_checkers/puppet/puppetlint.vim b/syntax_checkers/puppet/puppetlint.vim index b59059e2..b1db347a 100644 --- a/syntax_checkers/puppet/puppetlint.vim +++ b/syntax_checkers/puppet/puppetlint.vim @@ -28,12 +28,11 @@ function! SyntaxCheckers_puppet_puppetlint_IsAvailable() \ syntastic#util#DevNull()), [0,1,10]) endfunction -function! SyntaxCheckers_puppet_puppetlint_GetLocList() +function! SyntaxCheckers_puppet_puppetlint_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'puppet-lint', \ 'post_args': '--log-format "%{KIND} [%{check}] %{message} at %{fullpath}:%{linenumber}"', - \ 'filetype': 'puppet', - \ 'subchecker': 'puppetlint' }) + \ 'checker': self }) let errorformat = '%t%*[a-zA-Z] %m at %f:%l' diff --git a/syntax_checkers/python/flake8.vim b/syntax_checkers/python/flake8.vim index 83fa30dc..484e8fc4 100644 --- a/syntax_checkers/python/flake8.vim +++ b/syntax_checkers/python/flake8.vim @@ -18,11 +18,10 @@ function! SyntaxCheckers_python_flake8_GetHighlightRegex(i) return SyntaxCheckers_python_pyflakes_GetHighlightRegex(a:i) endfunction -function! SyntaxCheckers_python_flake8_GetLocList() +function! SyntaxCheckers_python_flake8_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'flake8', - \ 'filetype': 'python', - \ 'subchecker': 'flake8' }) + \ 'checker': self }) let errorformat = \ '%E%f:%l: could not compile,%-Z%p^,' . diff --git a/syntax_checkers/python/pep257.vim b/syntax_checkers/python/pep257.vim index 9d2b64d9..9b4b4912 100644 --- a/syntax_checkers/python/pep257.vim +++ b/syntax_checkers/python/pep257.vim @@ -19,11 +19,10 @@ function! SyntaxCheckers_python_pep257_Preprocess(errors) return filter(copy(a:errors), 'v:val != ""') endfunction -function! SyntaxCheckers_python_pep257_GetLocList() +function! SyntaxCheckers_python_pep257_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'pep257', - \ 'filetype': 'python', - \ 'subchecker': 'pep257' }) + \ 'checker': self }) let errorformat = \ '%E%f:%l:%c%\%.%\%.%\d%\+:%\d%\+: %m,' . diff --git a/syntax_checkers/python/pep8.vim b/syntax_checkers/python/pep8.vim index 71837187..b2b0f986 100644 --- a/syntax_checkers/python/pep8.vim +++ b/syntax_checkers/python/pep8.vim @@ -21,11 +21,10 @@ function! SyntaxCheckers_python_pep8_IsAvailable() return executable('pep8') endfunction -function! SyntaxCheckers_python_pep8_GetLocList() +function! SyntaxCheckers_python_pep8_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'pep8', - \ 'filetype': 'python', - \ 'subchecker': 'pep8' }) + \ 'checker': self }) let errorformat = '%f:%l:%c: %m' diff --git a/syntax_checkers/python/py3kwarn.vim b/syntax_checkers/python/py3kwarn.vim index 44d03655..a97eac0b 100644 --- a/syntax_checkers/python/py3kwarn.vim +++ b/syntax_checkers/python/py3kwarn.vim @@ -13,11 +13,10 @@ function! SyntaxCheckers_python_py3kwarn_IsAvailable() return executable('py3kwarn') endfunction -function! SyntaxCheckers_python_py3kwarn_GetLocList() +function! SyntaxCheckers_python_py3kwarn_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'py3kwarn', - \ 'filetype': 'python', - \ 'subchecker': 'py3kwarn' }) + \ 'checker': self }) let errorformat = '%W%f:%l:%c: %m' diff --git a/syntax_checkers/python/pyflakes.vim b/syntax_checkers/python/pyflakes.vim index f93047bf..f572c1bd 100644 --- a/syntax_checkers/python/pyflakes.vim +++ b/syntax_checkers/python/pyflakes.vim @@ -39,11 +39,10 @@ function! SyntaxCheckers_python_pyflakes_GetHighlightRegex(i) return '' endfunction -function! SyntaxCheckers_python_pyflakes_GetLocList() +function! SyntaxCheckers_python_pyflakes_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'pyflakes', - \ 'filetype': 'python', - \ 'subchecker': 'pyflakes' }) + \ 'checker': self }) let errorformat = \ '%E%f:%l: could not compile,'. diff --git a/syntax_checkers/python/pylama.vim b/syntax_checkers/python/pylama.vim index 8c8e2ba0..cb290e27 100644 --- a/syntax_checkers/python/pylama.vim +++ b/syntax_checkers/python/pylama.vim @@ -22,12 +22,11 @@ function! SyntaxCheckers_python_pylama_GetHighlightRegex(i) return SyntaxCheckers_python_pyflakes_GetHighlightRegex(a:i) endfunction -function! SyntaxCheckers_python_pylama_GetLocList() +function! SyntaxCheckers_python_pylama_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'pylama', \ 'post_args': '-f pep8', - \ 'filetype': 'python', - \ 'subchecker': 'pylama' }) + \ 'checker': self }) " TODO: "WARNING:pylama:..." messages are probably a logging bug let errorformat = diff --git a/syntax_checkers/python/pylint.vim b/syntax_checkers/python/pylint.vim index 07d9defd..cdbdcccc 100644 --- a/syntax_checkers/python/pylint.vim +++ b/syntax_checkers/python/pylint.vim @@ -16,12 +16,11 @@ function! SyntaxCheckers_python_pylint_IsAvailable() return s:pylint_new >= 0 endfunction -function! SyntaxCheckers_python_pylint_GetLocList() +function! SyntaxCheckers_python_pylint_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'pylint', \ 'args': (s:pylint_new ? '--msg-template="{path}:{line}: [{msg_id}] {msg}" -r n' : '-f parseable -r n -i y'), - \ 'filetype': 'python', - \ 'subchecker': 'pylint' }) + \ 'checker': self }) let errorformat = \ '%A%f:%l: %m,' . diff --git a/syntax_checkers/python/python.vim b/syntax_checkers/python/python.vim index eff1696b..94bce00e 100644 --- a/syntax_checkers/python/python.vim +++ b/syntax_checkers/python/python.vim @@ -16,15 +16,14 @@ function! SyntaxCheckers_python_python_IsAvailable() return executable('python') endfunction -function! SyntaxCheckers_python_python_GetLocList() +function! SyntaxCheckers_python_python_GetLocList() dict let fname = "'" . escape(expand('%'), "\\'") . "'" let makeprg = syntastic#makeprg#build({ \ 'exe': 'python', \ 'args': '-c', \ 'fname': syntastic#util#shescape("compile(open(" . fname . ").read(), " . fname . ", 'exec')"), - \ 'filetype': 'python', - \ 'subchecker': 'python' }) + \ 'checker': self }) let errorformat = \ '%E File "%f"\, line %l,' . diff --git a/syntax_checkers/rst/rst2pseudoxml.vim b/syntax_checkers/rst/rst2pseudoxml.vim index 429cee34..a11cd602 100644 --- a/syntax_checkers/rst/rst2pseudoxml.vim +++ b/syntax_checkers/rst/rst2pseudoxml.vim @@ -22,13 +22,12 @@ function! SyntaxCheckers_rst_rst2pseudoxml_IsAvailable() return executable("rst2pseudoxml.py") || executable("rst2pseudoxml") endfunction -function! SyntaxCheckers_rst_rst2pseudoxml_GetLocList() +function! SyntaxCheckers_rst_rst2pseudoxml_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': s:exe(), \ 'args': '--report=2 --exit-status=1', \ 'tail': syntastic#util#DevNull(), - \ 'filetype': 'rst', - \ 'subchecker': 'rst2pseudoxml' }) + \ 'checker': self }) let errorformat = \ '%f:%l: (%tNFO/1) %m,'. diff --git a/syntax_checkers/ruby/jruby.vim b/syntax_checkers/ruby/jruby.vim index bfd60c3a..624d7d9c 100644 --- a/syntax_checkers/ruby/jruby.vim +++ b/syntax_checkers/ruby/jruby.vim @@ -18,12 +18,11 @@ function! SyntaxCheckers_ruby_jruby_IsAvailable() return executable('jruby') endfunction -function! SyntaxCheckers_ruby_jruby_GetLocList() +function! SyntaxCheckers_ruby_jruby_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': s:exe(), \ 'args': s:args(), - \ 'filetype': 'ruby', - \ 'subchecker': 'jruby' }) + \ 'checker': self }) let errorformat = \ '%-GSyntax OK for %f,'. diff --git a/syntax_checkers/ruby/macruby.vim b/syntax_checkers/ruby/macruby.vim index 9226e41e..ebbd6e2c 100644 --- a/syntax_checkers/ruby/macruby.vim +++ b/syntax_checkers/ruby/macruby.vim @@ -17,12 +17,11 @@ function! SyntaxCheckers_ruby_macruby_IsAvailable() return executable('macruby') endfunction -function! SyntaxCheckers_ruby_macruby_GetLocList() +function! SyntaxCheckers_ruby_macruby_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'RUBYOPT= macruby', \ 'args': '-W1 -c', - \ 'filetype': 'ruby', - \ 'subchecker': 'macruby' }) + \ 'checker': self }) let errorformat = \ '%-GSyntax OK,'. diff --git a/syntax_checkers/ruby/mri.vim b/syntax_checkers/ruby/mri.vim index 27a46a48..5a2f6d2f 100644 --- a/syntax_checkers/ruby/mri.vim +++ b/syntax_checkers/ruby/mri.vim @@ -32,7 +32,7 @@ function! SyntaxCheckers_ruby_mri_GetHighlightRegex(i) return '' endfunction -function! SyntaxCheckers_ruby_mri_GetLocList() +function! SyntaxCheckers_ruby_mri_GetLocList() dict let exe = expand(g:syntastic_ruby_exec) if !has('win32') let exe = 'RUBYOPT= ' . exe @@ -41,8 +41,7 @@ function! SyntaxCheckers_ruby_mri_GetLocList() let makeprg = syntastic#makeprg#build({ \ 'exe': exe, \ 'args': '-w -T1 -c', - \ 'filetype': 'ruby', - \ 'subchecker': 'mri' }) + \ 'checker': self }) "this is a hack to filter out a repeated useless warning in rspec files "containing lines like diff --git a/syntax_checkers/ruby/rubocop.vim b/syntax_checkers/ruby/rubocop.vim index 22e6131b..13c16225 100644 --- a/syntax_checkers/ruby/rubocop.vim +++ b/syntax_checkers/ruby/rubocop.vim @@ -24,12 +24,11 @@ function! SyntaxCheckers_ruby_rubocop_IsAvailable() \ syntastic#util#versionIsAtLeast(syntastic#util#getVersion('rubocop --version'), [0,9,0]) endfunction -function! SyntaxCheckers_ruby_rubocop_GetLocList() +function! SyntaxCheckers_ruby_rubocop_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'rubocop', \ 'args': '--format emacs --silent', - \ 'filetype': 'ruby', - \ 'subchecker': 'rubocop' }) + \ 'checker': self }) let errorformat = '%f:%l:%c: %t: %m' diff --git a/syntax_checkers/ruby/rubylint.vim b/syntax_checkers/ruby/rubylint.vim index 5b914f43..62ceb305 100644 --- a/syntax_checkers/ruby/rubylint.vim +++ b/syntax_checkers/ruby/rubylint.vim @@ -20,12 +20,11 @@ function! SyntaxCheckers_ruby_rubylint_IsAvailable() return executable("ruby-lint") endfunction -function! SyntaxCheckers_ruby_rubylint_GetLocList() +function! SyntaxCheckers_ruby_rubylint_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'ruby-lint', \ 'args': 'analyze --presenter=syntastic', - \ 'filetype': 'ruby', - \ 'subchecker': 'rubylint' }) + \ 'checker': self }) let errorformat = '%f:%t:%l:%c: %m' diff --git a/syntax_checkers/rust/rustc.vim b/syntax_checkers/rust/rustc.vim index e88b4cf9..526e9415 100644 --- a/syntax_checkers/rust/rustc.vim +++ b/syntax_checkers/rust/rustc.vim @@ -19,12 +19,11 @@ function! SyntaxCheckers_rust_rustc_IsAvailable() return executable("rustc") endfunction -function! SyntaxCheckers_rust_rustc_GetLocList() +function! SyntaxCheckers_rust_rustc_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'rustc', \ 'args': '--parse-only', - \ 'filetype': 'rust', - \ 'subchecker': 'rustc' }) + \ 'checker': self }) let errorformat = \ '%E%f:%l:%c: \\d%#:\\d%# %.%\{-}error:%.%\{-} %m,' . diff --git a/syntax_checkers/sass/sass.vim b/syntax_checkers/sass/sass.vim index 4b8d4863..7c844124 100644 --- a/syntax_checkers/sass/sass.vim +++ b/syntax_checkers/sass/sass.vim @@ -34,7 +34,7 @@ if executable("compass") let s:imports = "--compass" endif -function! SyntaxCheckers_sass_sass_GetLocList() +function! SyntaxCheckers_sass_sass_GetLocList() dict if !g:syntastic_sass_check_partials && expand('%:t')[0] == '_' return [] endif @@ -42,8 +42,7 @@ function! SyntaxCheckers_sass_sass_GetLocList() let makeprg = syntastic#makeprg#build({ \ 'exe': 'sass', \ 'args': '--cache-location ' . s:sass_cache_location . ' ' . s:imports . ' --check', - \ 'filetype': 'sass', - \ 'subchecker': 'sass' }) + \ 'checker': self }) let errorformat = \ '%ESyntax %trror: %m,' . diff --git a/syntax_checkers/scala/fsc.vim b/syntax_checkers/scala/fsc.vim index d0e95a7d..30600739 100644 --- a/syntax_checkers/scala/fsc.vim +++ b/syntax_checkers/scala/fsc.vim @@ -23,7 +23,7 @@ if !exists('g:syntastic_scala_options') let g:syntastic_scala_options = '' endif -function! SyntaxCheckers_scala_fsc_GetLocList() +function! SyntaxCheckers_scala_fsc_GetLocList() dict " fsc has some serious problems with the " working directory changing after being started " that's why we better pass an absolute path @@ -31,8 +31,7 @@ function! SyntaxCheckers_scala_fsc_GetLocList() \ 'exe': 'fsc', \ 'args': '-Ystop-after:parser ' . g:syntastic_scala_options, \ 'fname': syntastic#util#shexpand('%:p'), - \ 'filetype': 'scala', - \ 'subchecker': 'fsc' }) + \ 'checker': self }) let errorformat = '%f:%l: %trror: %m' diff --git a/syntax_checkers/scala/scalac.vim b/syntax_checkers/scala/scalac.vim index d6319c16..6be0e55b 100644 --- a/syntax_checkers/scala/scalac.vim +++ b/syntax_checkers/scala/scalac.vim @@ -24,12 +24,11 @@ if !exists('g:syntastic_scala_options') endif -function! SyntaxCheckers_scala_scalac_GetLocList() +function! SyntaxCheckers_scala_scalac_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'scalac', \ 'args': '-Ystop-after:parser ' . g:syntastic_scala_options, - \ 'filetype': 'scala', - \ 'subchecker': 'scalac' }) + \ 'checker': self }) let errorformat = '%f:%l: %trror: %m' diff --git a/syntax_checkers/scss/sass.vim b/syntax_checkers/scss/sass.vim index 604bb41d..1fa54b7d 100644 --- a/syntax_checkers/scss/sass.vim +++ b/syntax_checkers/scss/sass.vim @@ -16,16 +16,9 @@ if exists("g:loaded_syntastic_scss_sass_checker") endif let g:loaded_syntastic_scss_sass_checker=1 -function! SyntaxCheckers_scss_sass_IsAvailable() - return SyntaxCheckers_sass_sass_IsAvailable() -endfunction - -function! SyntaxCheckers_scss_sass_GetLocList() - return SyntaxCheckers_sass_sass_GetLocList() -endfunction +runtime! syntax_checkers/sass/*.vim call g:SyntasticRegistry.CreateAndRegisterChecker({ \ 'filetype': 'scss', - \ 'name': 'sass'}) - -runtime! syntax_checkers/sass/*.vim + \ 'name': 'sass', + \ 'redirect': 'sass/sass'}) diff --git a/syntax_checkers/sh/checkbashisms.vim b/syntax_checkers/sh/checkbashisms.vim index d99a05ea..2e300011 100644 --- a/syntax_checkers/sh/checkbashisms.vim +++ b/syntax_checkers/sh/checkbashisms.vim @@ -17,12 +17,11 @@ function! SyntaxCheckers_sh_checkbashisms_IsAvailable() endfunction -function! SyntaxCheckers_sh_checkbashisms_GetLocList() +function! SyntaxCheckers_sh_checkbashisms_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'checkbashisms', \ 'args': '-fx', - \ 'filetype': 'sh', - \ 'subchecker': 'checkbashisms'}) + \ 'checker': self}) let errorformat = \ '%-Gscript %f is already a bash script; skipping,' . diff --git a/syntax_checkers/sh/sh.vim b/syntax_checkers/sh/sh.vim index f1fb0686..0d109a70 100644 --- a/syntax_checkers/sh/sh.vim +++ b/syntax_checkers/sh/sh.vim @@ -39,14 +39,13 @@ endfunction function! s:ForwardToZshChecker() let registry = g:SyntasticRegistry.Instance() if registry.checkable('zsh') - return SyntaxCheckers_zsh_zsh_GetLocList() + return registry.getChecker('zsh', 'zsh').getLocListRaw() else return [] endif endfunction - function! s:IsShellValid() return len(s:GetShell()) > 0 && executable(s:GetShell()) endfunction @@ -56,7 +55,7 @@ function! SyntaxCheckers_sh_sh_IsAvailable() return s:IsShellValid() endfunction -function! SyntaxCheckers_sh_sh_GetLocList() +function! SyntaxCheckers_sh_sh_GetLocList() dict if s:GetShell() == 'zsh' return s:ForwardToZshChecker() endif @@ -68,8 +67,7 @@ function! SyntaxCheckers_sh_sh_GetLocList() let makeprg = syntastic#makeprg#build({ \ 'exe': s:GetShell(), \ 'args': '-n', - \ 'filetype': 'sh', - \ 'subchecker': 'sh' }) + \ 'checker': self }) let errorformat = '%f: line %l: %m' diff --git a/syntax_checkers/slim/slimrb.vim b/syntax_checkers/slim/slimrb.vim index bda8be01..8205e80c 100644 --- a/syntax_checkers/slim/slimrb.vim +++ b/syntax_checkers/slim/slimrb.vim @@ -26,12 +26,11 @@ function! s:SlimrbVersion() return s:slimrb_version endfunction -function! SyntaxCheckers_slim_slimrb_GetLocList() +function! SyntaxCheckers_slim_slimrb_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'slimrb', \ 'args': '-c', - \ 'filetype': 'slim', - \ 'subchecker': 'slimrb' }) + \ 'checker': self }) if syntastic#util#versionIsAtLeast(s:SlimrbVersion(), [1,3,1]) let errorformat = diff --git a/syntax_checkers/tcl/nagelfar.vim b/syntax_checkers/tcl/nagelfar.vim index c908f73f..da48e25f 100644 --- a/syntax_checkers/tcl/nagelfar.vim +++ b/syntax_checkers/tcl/nagelfar.vim @@ -20,12 +20,11 @@ function! SyntaxCheckers_tcl_nagelfar_IsAvailable() return executable('nagelfar') endfunction -function! SyntaxCheckers_tcl_nagelfar_GetLocList() +function! SyntaxCheckers_tcl_nagelfar_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'nagelfar', \ 'args': '-H', - \ 'filetype': 'tcl', - \ 'subchecker': 'nagelfar' }) + \ 'checker': self }) let errorformat = \ '%I%f: %l: N %m,'. diff --git a/syntax_checkers/tex/chktex.vim b/syntax_checkers/tex/chktex.vim index 43ae2f52..046edc90 100644 --- a/syntax_checkers/tex/chktex.vim +++ b/syntax_checkers/tex/chktex.vim @@ -36,12 +36,11 @@ function! SyntaxCheckers_tex_chktex_IsAvailable() return executable('chktex') endfunction -function! SyntaxCheckers_tex_chktex_GetLocList() +function! SyntaxCheckers_tex_chktex_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'chktex', \ 'post_args': '-q -v1', - \ 'filetype': 'tex', - \ 'subchecker': 'chktex' }) + \ 'checker': self }) let errorformat = \ '%EError %n in %f line %l: %m,' . diff --git a/syntax_checkers/tex/lacheck.vim b/syntax_checkers/tex/lacheck.vim index d68a519a..c4bcf8e6 100644 --- a/syntax_checkers/tex/lacheck.vim +++ b/syntax_checkers/tex/lacheck.vim @@ -19,11 +19,10 @@ function! SyntaxCheckers_tex_lacheck_IsAvailable() return executable('lacheck') endfunction -function! SyntaxCheckers_tex_lacheck_GetLocList() +function! SyntaxCheckers_tex_lacheck_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'lacheck', - \ 'filetype': 'tex', - \ 'subchecker': 'lacheck' }) + \ 'checker': self }) let errorformat = \ '%-G** %f:,' . diff --git a/syntax_checkers/text/atdtool.vim b/syntax_checkers/text/atdtool.vim index 6aeab062..cfce9c57 100644 --- a/syntax_checkers/text/atdtool.vim +++ b/syntax_checkers/text/atdtool.vim @@ -28,12 +28,11 @@ function! SyntaxCheckers_text_atdtool_GetHighlightRegex(item) return term endfunction -function! SyntaxCheckers_text_atdtool_GetLocList() +function! SyntaxCheckers_text_atdtool_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'atdtool', \ 'tail': '2>' . syntastic#util#DevNull(), - \ 'filetype': 'text', - \ 'subchecker': 'atdtool' }) + \ 'checker': self }) let errorformat = \ '%W%f:%l:%c: %m,'. diff --git a/syntax_checkers/twig/twiglint.vim b/syntax_checkers/twig/twiglint.vim index 7cbba5f4..5be896f2 100644 --- a/syntax_checkers/twig/twiglint.vim +++ b/syntax_checkers/twig/twiglint.vim @@ -24,12 +24,11 @@ function! SyntaxCheckers_twig_twiglint_IsAvailable() return executable('twig-lint') endfunction -function! SyntaxCheckers_twig_twiglint_GetLocList() +function! SyntaxCheckers_twig_twiglint_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'twig-lint', \ 'args': 'lint --format=csv', - \ 'filetype': 'twig', - \ 'subchecker': 'twiglint' }) + \ 'checker': self }) let errorformat = '"%f"\,%l\,%m' diff --git a/syntax_checkers/typescript/tsc.vim b/syntax_checkers/typescript/tsc.vim index 768dc4e0..9abf44b0 100644 --- a/syntax_checkers/typescript/tsc.vim +++ b/syntax_checkers/typescript/tsc.vim @@ -14,13 +14,12 @@ function! SyntaxCheckers_typescript_tsc_IsAvailable() endfunction -function! SyntaxCheckers_typescript_tsc_GetLocList() +function! SyntaxCheckers_typescript_tsc_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'tsc', \ 'args': '--module commonjs', \ 'post_args': '--out ' . syntastic#util#DevNull(), - \ 'filetype': 'typescript', - \ 'subchecker': 'tsc' }) + \ 'checker': self }) let errorformat = \ '%E%f %#(%l\,%c): error %m,' . diff --git a/syntax_checkers/vala/valac.vim b/syntax_checkers/vala/valac.vim index 7ffc0260..73671952 100644 --- a/syntax_checkers/vala/valac.vim +++ b/syntax_checkers/vala/valac.vim @@ -52,13 +52,12 @@ function! s:GetValaModules() return split(strpart(modules_str, 12), '\s\+') endfunction -function! SyntaxCheckers_vala_valac_GetLocList() +function! SyntaxCheckers_vala_valac_GetLocList() dict let vala_pkg_args = join(map(s:GetValaModules(), '"--pkg ".v:val'), ' ') let makeprg = syntastic#makeprg#build({ \ 'exe': 'valac', \ 'args': '-C ' . vala_pkg_args, - \ 'filetype': 'vala', - \ 'subchecker': 'valac' }) + \ 'checker': self }) let errorformat = \ '%A%f:%l.%c-%\d%\+.%\d%\+: %t%[a-z]%\+: %m,'. \ '%C%m,'. diff --git a/syntax_checkers/verilog/verilator.vim b/syntax_checkers/verilog/verilator.vim index 0bad01b3..1b1d630f 100644 --- a/syntax_checkers/verilog/verilator.vim +++ b/syntax_checkers/verilog/verilator.vim @@ -24,7 +24,7 @@ if !exists('g:syntastic_verilog_compiler_options') let g:syntastic_verilog_compiler_options = '-Wall' endif -function! SyntaxCheckers_verilog_verilator_GetLocList() +function! SyntaxCheckers_verilog_verilator_GetLocList() dict return syntastic#c#GetLocList('verilog', 'verilator', { \ 'errorformat': \ '%%%trror-%\=%\w%#: %f:%l: %m,' . diff --git a/syntax_checkers/vhdl/ghdl.vim b/syntax_checkers/vhdl/ghdl.vim index 7158cd78..2dccac45 100644 --- a/syntax_checkers/vhdl/ghdl.vim +++ b/syntax_checkers/vhdl/ghdl.vim @@ -18,12 +18,11 @@ function! SyntaxCheckers_vhdl_ghdl_IsAvailable() return executable("ghdl") endfunction -function! SyntaxCheckers_vhdl_ghdl_GetLocList() +function! SyntaxCheckers_vhdl_ghdl_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'ghdl', \ 'args': '-s', - \ 'filetype': 'vhdl', - \ 'subchecker': 'ghdl' }) + \ 'checker': self }) let errorformat = '%f:%l:%c: %m' diff --git a/syntax_checkers/xhtml/tidy.vim b/syntax_checkers/xhtml/tidy.vim index e0c22fbb..2c949c37 100644 --- a/syntax_checkers/xhtml/tidy.vim +++ b/syntax_checkers/xhtml/tidy.vim @@ -56,13 +56,12 @@ function! s:IgnoreError(text) return 0 endfunction -function! SyntaxCheckers_xhtml_tidy_GetLocList() +function! SyntaxCheckers_xhtml_tidy_GetLocList() dict let encopt = s:TidyEncOptByFenc() let makeprg = syntastic#makeprg#build({ \ 'exe': 'tidy', \ 'args': encopt . ' -xml -e', - \ 'filetype': 'xhtml', - \ 'subchecker': 'tidy' }) + \ 'checker': self }) let errorformat= \ '%Wline %l column %v - Warning: %m,' . diff --git a/syntax_checkers/xml/xmllint.vim b/syntax_checkers/xml/xmllint.vim index 5a6e1db7..869fab05 100644 --- a/syntax_checkers/xml/xmllint.vim +++ b/syntax_checkers/xml/xmllint.vim @@ -23,12 +23,11 @@ function! SyntaxCheckers_xml_xmllint_IsAvailable() return executable('xmllint') endfunction -function! SyntaxCheckers_xml_xmllint_GetLocList() +function! SyntaxCheckers_xml_xmllint_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'xmllint', \ 'args': '--xinclude --noout --postvalid', - \ 'filetype': 'xml', - \ 'subchecker': 'xmllint' }) + \ 'checker': self }) let errorformat= \ '%E%f:%l: error : %m,' . diff --git a/syntax_checkers/xslt/xmllint.vim b/syntax_checkers/xslt/xmllint.vim index db397ed8..7e6afbe6 100644 --- a/syntax_checkers/xslt/xmllint.vim +++ b/syntax_checkers/xslt/xmllint.vim @@ -15,16 +15,9 @@ if exists("g:loaded_syntastic_xslt_xmllint_checker") endif let g:loaded_syntastic_xslt_xmllint_checker=1 -function! SyntaxCheckers_xslt_xmllint_IsAvailable() - return SyntaxCheckers_xml_xmllint_IsAvailable() -endfunction - -function! SyntaxCheckers_xslt_xmllint_GetLocList() - return SyntaxCheckers_xml_xmllint_GetLocList() -endfunction +runtime! syntax_checkers/xml/*.vim call g:SyntasticRegistry.CreateAndRegisterChecker({ \ 'filetype': 'xslt', - \ 'name': 'xmllint'}) - -runtime! syntax_checkers/xml/*.vim + \ 'name': 'xmllint', + \ 'redirect': 'xml/xmllint'}) diff --git a/syntax_checkers/yaml/jsyaml.vim b/syntax_checkers/yaml/jsyaml.vim index 9ffdc658..d70327ce 100644 --- a/syntax_checkers/yaml/jsyaml.vim +++ b/syntax_checkers/yaml/jsyaml.vim @@ -22,12 +22,11 @@ function! SyntaxCheckers_yaml_jsyaml_IsAvailable() return executable("js-yaml") endfunction -function! SyntaxCheckers_yaml_jsyaml_GetLocList() +function! SyntaxCheckers_yaml_jsyaml_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'js-yaml', \ 'args': '--compact', - \ 'filetype': 'yaml', - \ 'subchecker': 'jsyaml' }) + \ 'checker': self }) let errorformat='Error on line %l\, col %c:%m,%-G%.%#' diff --git a/syntax_checkers/z80/z80syntaxchecker.vim b/syntax_checkers/z80/z80syntaxchecker.vim index b68acf13..3913643e 100644 --- a/syntax_checkers/z80/z80syntaxchecker.vim +++ b/syntax_checkers/z80/z80syntaxchecker.vim @@ -23,11 +23,10 @@ function! SyntaxCheckers_z80_z80syntaxchecker_IsAvailable() return executable("z80_syntax_checker.py") endfunction -function! SyntaxCheckers_z80_z80syntaxchecker_GetLocList() +function! SyntaxCheckers_z80_z80syntaxchecker_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'z80_syntax_checker.py', - \ 'filetype': 'z80', - \ 'subchecker': 'z80syntaxchecker' }) + \ 'checker': self }) let errorformat = '%f:%l %m' diff --git a/syntax_checkers/zpt/zptlint.vim b/syntax_checkers/zpt/zptlint.vim index ae6ab8a3..accda177 100644 --- a/syntax_checkers/zpt/zptlint.vim +++ b/syntax_checkers/zpt/zptlint.vim @@ -28,11 +28,10 @@ function! SyntaxCheckers_zpt_zptlint_IsAvailable() return executable("zptlint") endfunction -function! SyntaxCheckers_zpt_zptlint_GetLocList() +function! SyntaxCheckers_zpt_zptlint_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'zptlint', - \ 'filetype': 'zpt', - \ 'subchecker': 'zptlint' }) + \ 'checker': self }) let errorformat= \ '%-P*** Error in: %f,'. diff --git a/syntax_checkers/zsh/zsh.vim b/syntax_checkers/zsh/zsh.vim index 5e339a9c..da830894 100644 --- a/syntax_checkers/zsh/zsh.vim +++ b/syntax_checkers/zsh/zsh.vim @@ -19,12 +19,11 @@ function! SyntaxCheckers_zsh_zsh_IsAvailable() return executable("zsh") endfunction -function! SyntaxCheckers_zsh_zsh_GetLocList() +function! SyntaxCheckers_zsh_zsh_GetLocList() dict let makeprg = syntastic#makeprg#build({ \ 'exe': 'zsh', \ 'args': '-n', - \ 'filetype': 'zsh', - \ 'subchecker': 'zsh' }) + \ 'checker': self }) let errorformat = '%f:%l: %m'