makeprgBuild() refactor: add *_before and *_after options.
This commit is contained in:
parent
7434054e21
commit
44d7ffd7e0
@ -13,7 +13,6 @@ function! g:SyntasticChecker.New(args)
|
||||
let newObj._filetype = a:args['filetype']
|
||||
let newObj._name = a:args['name']
|
||||
let newObj._exec = get(a:args, 'exec', newObj._name)
|
||||
let newObj._makeprgFunc = function('SyntasticCheckerMakeprgBuild')
|
||||
|
||||
if has_key(a:args, 'redirect')
|
||||
let [filetype, name] = split(a:args['redirect'], '/')
|
||||
@ -79,7 +78,7 @@ function! g:SyntasticChecker.getHighlightRegexFor(error)
|
||||
endfunction
|
||||
|
||||
function! g:SyntasticChecker.makeprgBuild(opts)
|
||||
return self._makeprgFunc(a:opts)
|
||||
return g:SyntasticMakeprgBuilder.Instance().makeprg(self, a:opts)
|
||||
endfunction
|
||||
|
||||
function! g:SyntasticChecker.isAvailable()
|
||||
@ -115,16 +114,4 @@ function! SyntasticCheckerIsAvailableDefault() dict
|
||||
return executable(self.getExec())
|
||||
endfunction
|
||||
|
||||
function! SyntasticCheckerMakeprgBuild(opts) dict
|
||||
let builder = g:SyntasticMakeprgBuilder.New(
|
||||
\ get(a:opts, 'checker', self),
|
||||
\ get(a:opts, 'exe', ''),
|
||||
\ get(a:opts, 'args', ''),
|
||||
\ get(a:opts, 'fname', ''),
|
||||
\ get(a:opts, 'post_args', ''),
|
||||
\ get(a:opts, 'tail', '') )
|
||||
|
||||
return builder.makeprg()
|
||||
endfunction
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -7,73 +7,51 @@ let g:SyntasticMakeprgBuilder = {}
|
||||
|
||||
" Public methods {{{1
|
||||
|
||||
function! g:SyntasticMakeprgBuilder.New(checker, exe, args, fname, post_args, tail)
|
||||
let newObj = copy(self)
|
||||
let newObj._exe = (a:exe == '' && has_key(a:checker, 'getExec')) ? a:checker.getExec() : a:exe
|
||||
let newObj._args = a:args
|
||||
let newObj._fname = a:fname
|
||||
let newObj._post_args = a:post_args
|
||||
let newObj._tail = a:tail
|
||||
function! g:SyntasticMakeprgBuilder.Instance()
|
||||
if !exists('s:SyntasticMakeprgBuilderInstance')
|
||||
let s:SyntasticMakeprgBuilderInstance = copy(self)
|
||||
endif
|
||||
return s:SyntasticMakeprgBuilderInstance
|
||||
endfunction
|
||||
|
||||
function! g:SyntasticMakeprgBuilder.makeprg(checker, opts)
|
||||
if has_key(a:checker, 'getName')
|
||||
let newObj._filetype = a:checker.getFiletype()
|
||||
let newObj._subchecker = a:checker.getName()
|
||||
let filetype = a:checker.getFiletype()
|
||||
let subchecker = a:checker.getName()
|
||||
else
|
||||
let newObj._filetype = &filetype
|
||||
let newObj._subchecker = ''
|
||||
let filetype = &filetype
|
||||
let subchecker = ''
|
||||
endif
|
||||
let setting = 'g:syntastic_' . filetype
|
||||
if strlen(subchecker)
|
||||
let setting .= '_' . subchecker . '_'
|
||||
endif
|
||||
|
||||
return newObj
|
||||
endfunction
|
||||
let parts = self._getOpt(a:opts, setting, 'exe', has_key(a:checker, 'getExec') ? a:checker.getExec() : '')
|
||||
call extend(parts, self._getOpt(a:opts, setting, 'args', ''))
|
||||
call extend(parts, self._getOpt(a:opts, setting, 'fname', syntastic#util#shexpand('%')))
|
||||
call extend(parts, self._getOpt(a:opts, setting, 'post_args', ''))
|
||||
call extend(parts, self._getOpt(a:opts, setting, 'tail', ''))
|
||||
|
||||
function! g:SyntasticMakeprgBuilder.makeprg()
|
||||
return join(filter([self.exe(), self.args(), self.fname(), self.post_args(), self.tail()], '!empty(v:val)'))
|
||||
endfunction
|
||||
|
||||
function! g:SyntasticMakeprgBuilder.exe()
|
||||
return self._getOpt('exe')
|
||||
endfunction
|
||||
|
||||
function! g:SyntasticMakeprgBuilder.args()
|
||||
return self._getOpt('args')
|
||||
endfunction
|
||||
|
||||
function! g:SyntasticMakeprgBuilder.fname()
|
||||
if empty(self._fname)
|
||||
return syntastic#util#shexpand('%')
|
||||
else
|
||||
return self._fname
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! g:SyntasticMakeprgBuilder.post_args()
|
||||
return self._getOpt('post_args')
|
||||
endfunction
|
||||
|
||||
function! g:SyntasticMakeprgBuilder.tail()
|
||||
return self._getOpt('tail')
|
||||
return join(filter(parts, 'strlen(v:val)'))
|
||||
endfunction
|
||||
|
||||
" Private methods {{{1
|
||||
|
||||
function! g:SyntasticMakeprgBuilder._getOpt(name)
|
||||
if self._optExists(a:name)
|
||||
return {self._optName(a:name)}
|
||||
endif
|
||||
|
||||
return self['_' . a:name]
|
||||
function! g:SyntasticMakeprgBuilder._getOpt(opts, setting, name, default)
|
||||
return [
|
||||
\ get(a:opts, a:name . '_before', ''),
|
||||
\ self._getOptUser(a:opts, a:setting, a:name, a:default),
|
||||
\ get(a:opts, a:name . '_after', '') ]
|
||||
endfunction
|
||||
|
||||
function! g:SyntasticMakeprgBuilder._optExists(name)
|
||||
return exists(self._optName(a:name))
|
||||
endfunction
|
||||
|
||||
function! g:SyntasticMakeprgBuilder._optName(name)
|
||||
let setting = "g:syntastic_" . self._filetype
|
||||
if !empty(self._subchecker)
|
||||
let setting .= '_' . self._subchecker
|
||||
function! g:SyntasticMakeprgBuilder._getOptUser(opts, setting, name, default)
|
||||
let sname = a:setting . a:name
|
||||
if exists(sname)
|
||||
return {sname}
|
||||
endif
|
||||
return setting . '_' . a:name
|
||||
|
||||
return get(a:opts, a:name, a:default)
|
||||
endfunction
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -46,9 +46,9 @@ endfunction
|
||||
|
||||
function! SyntaxCheckers_actionscript_mxmlc_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args': '-output=' . syntastic#util#DevNull() .
|
||||
\ (!empty(g:syntastic_actionscript_mxmlc_conf) ?
|
||||
\ ' -load-config+=' . g:syntastic_actionscript_mxmlc_conf : '') })
|
||||
\ 'args_before': (strlen(g:syntastic_actionscript_mxmlc_conf) ?
|
||||
\ ' -load-config+=' . g:syntastic_actionscript_mxmlc_conf : ''),
|
||||
\ 'args_after': '-output=' . syntastic#util#DevNull() })
|
||||
|
||||
let errorformat =
|
||||
\ '%f(%l): col: %c %trror: %m,' .
|
||||
|
@ -34,7 +34,7 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_applescript_osacompile_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args': '-o ' . tempname() . '.scpt' })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '-o ' . tempname() . '.scpt' })
|
||||
let errorformat = '%f:%l:%m'
|
||||
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
|
||||
endfunction
|
||||
|
@ -19,7 +19,7 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_asciidoc_asciidoc_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args': syntastic#c#NullOutput() })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': syntastic#c#NullOutput() })
|
||||
|
||||
let errorformat =
|
||||
\ '%Easciidoc: %tRROR: %f: line %l: %m,' .
|
||||
|
@ -31,7 +31,7 @@ endfunction
|
||||
function! SyntaxCheckers_c_checkpatch_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe': g:syntastic_c_checker_checkpatch_location,
|
||||
\ 'args': '--no-summary --no-tree --terse --file' })
|
||||
\ 'args_after': '--no-summary --no-tree --terse --file' })
|
||||
|
||||
let errorformat =
|
||||
\ '%f:%l: %tARNING: %m,' .
|
||||
|
@ -30,8 +30,8 @@ set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_c_cppcheck_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args': '-q ' . syntastic#c#ReadConfig(g:syntastic_cppcheck_config_file),
|
||||
\ 'post_args': '--enable=style' })
|
||||
\ 'args': syntastic#c#ReadConfig(g:syntastic_cppcheck_config_file),
|
||||
\ 'args_after': '-q --enable=style' })
|
||||
|
||||
let errorformat =
|
||||
\ '[%f:%l]: (%trror) %m,' .
|
||||
|
@ -30,7 +30,7 @@ set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_c_oclint_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'post_args': '-- -c ' . syntastic#c#ReadConfig(g:syntastic_oclint_config_file) })
|
||||
\ 'post_args_after': '-- -c ' . syntastic#c#ReadConfig(g:syntastic_oclint_config_file) })
|
||||
|
||||
let errorformat =
|
||||
\ '%E%f:%l:%c: %m P1 ,' .
|
||||
|
@ -30,7 +30,8 @@ set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_c_sparse_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args': '-ftabstop=' . &ts . ' ' . syntastic#c#ReadConfig(g:syntastic_sparse_config_file) })
|
||||
\ 'args': syntastic#c#ReadConfig(g:syntastic_sparse_config_file),
|
||||
\ 'args_after': '-ftabstop=' . &ts })
|
||||
|
||||
let errorformat = '%f:%l:%v: %trror: %m,%f:%l:%v: %tarning: %m,'
|
||||
|
||||
|
@ -30,7 +30,8 @@ set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_c_splint_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'post_args': '-showfunc -hints +quiet ' . syntastic#c#ReadConfig(g:syntastic_splint_config_file) })
|
||||
\ 'args': syntastic#c#ReadConfig(g:syntastic_splint_config_file),
|
||||
\ 'args_after': '-showfunc -hints +quiet' })
|
||||
|
||||
let errorformat =
|
||||
\ '%-G%f:%l:%v: %[%#]%[%#]%[%#] Internal Bug %.%#,' .
|
||||
|
@ -19,7 +19,7 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_co_coco_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args': '-c -o /tmp' })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '-c -o /tmp' })
|
||||
|
||||
let errorformat =
|
||||
\ '%EFailed at: %f,' .
|
||||
|
@ -28,7 +28,7 @@ function! SyntaxCheckers_coffee_coffee_IsAvailable() dict
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_coffee_coffee_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args': '-cp' })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '-cp' })
|
||||
|
||||
let errorformat =
|
||||
\ '%E%f:%l:%c: %trror: %m,' .
|
||||
|
@ -19,7 +19,7 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_coffee_coffeelint_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args': '--csv' })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '--csv' })
|
||||
|
||||
let errorformat =
|
||||
\ '%f\,%l\,%\d%#\,%trror\,%m,' .
|
||||
|
@ -19,7 +19,7 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_coq_coqtop_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args': '-noglob -batch -load-vernac-source' })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '-noglob -batch -load-vernac-source' })
|
||||
|
||||
let errorformat =
|
||||
\ '%AFile \"%f\"\, line %l\, characters %c\-%.%#\:,'.
|
||||
|
@ -30,8 +30,8 @@ set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_cpp_cppcheck_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args': '-q ' . syntastic#c#ReadConfig(g:syntastic_cppcheck_config_file),
|
||||
\ 'post_args': '--enable=style' })
|
||||
\ 'args': syntastic#c#ReadConfig(g:syntastic_cppcheck_config_file),
|
||||
\ 'args_after': '-q --enable=style' })
|
||||
|
||||
let errorformat =
|
||||
\ '[%f:%l]: (%trror) %m,' .
|
||||
|
@ -19,7 +19,7 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_cs_mcs_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args': '--parse' })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '--parse' })
|
||||
|
||||
let errorformat = '%f(%l\,%c): %trror %m'
|
||||
|
||||
|
@ -27,7 +27,9 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_css_csslint_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args': '--format=compact ' . g:syntastic_csslint_options })
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args': g:syntastic_csslint_options,
|
||||
\ 'args_after': '--format=compact' })
|
||||
|
||||
" Print CSS Lint's error/warning messages from compact format. Ignores blank lines.
|
||||
let errorformat =
|
||||
|
@ -19,7 +19,7 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_cucumber_cucumber_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args': '--dry-run --quiet --strict --format pretty' })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '--dry-run --quiet --strict --format pretty' })
|
||||
|
||||
let errorformat =
|
||||
\ '%f:%l:%c:%m,' .
|
||||
|
@ -30,7 +30,7 @@ function! SyntaxCheckers_dart_dartanalyzer_GetHighlightRegex(error)
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_dart_dartanalyzer_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'post_args': '--machine' })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '--machine' })
|
||||
|
||||
" Machine readable format looks like:
|
||||
" SEVERITY|TYPE|ERROR_CODE|FILENAME|LINE_NUMBER|COLUMN|LENGTH|MESSAGE
|
||||
|
@ -38,9 +38,9 @@ function! SyntaxCheckers_erlang_escript_GetLocList() dict
|
||||
let post_args = g:syntastic_erlc_include_path
|
||||
endif
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args': args,
|
||||
\ 'args_after': args,
|
||||
\ 'fname': syntastic#util#shexpand('%:p'),
|
||||
\ 'post_args': post_args })
|
||||
\ 'post_args_after': post_args })
|
||||
|
||||
let errorformat =
|
||||
\ '%W%f:%l: warning: %m,'.
|
||||
|
@ -29,8 +29,8 @@ set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_glsl_cgc_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args': '-oglsl -profile ' . s:GetProfile() .
|
||||
\ (exists('g:syntastic_glsl_options') ? ' ' . g:syntastic_glsl_options : '') })
|
||||
\ 'args_before': '-oglsl -profile ' . s:GetProfile(),
|
||||
\ 'args': (exists('g:syntastic_glsl_options') ? ' ' . g:syntastic_glsl_options : '') })
|
||||
|
||||
let errorformat =
|
||||
\ "%E%f(%l) : error %m," .
|
||||
|
@ -23,8 +23,8 @@ set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_go_gofmt_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args': '-l',
|
||||
\ 'tail': '> ' . syntastic#util#DevNull() })
|
||||
\ 'args_after': '-l',
|
||||
\ 'tail_after': '> ' . syntastic#util#DevNull() })
|
||||
|
||||
let errorformat = '%f:%l:%c: %m,%-G%.%#'
|
||||
|
||||
|
@ -29,7 +29,7 @@ endfunction
|
||||
function! SyntaxCheckers_haml_haml_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe': expand(g:syntastic_haml_interpreter),
|
||||
\ 'args': '-c' })
|
||||
\ 'args_after': '-c' })
|
||||
|
||||
let errorformat =
|
||||
\ 'Haml error on line %l: %m,' .
|
||||
|
@ -18,7 +18,7 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_handlebars_handlebars_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args': '-f ' . syntastic#util#DevNull() })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '-f ' . syntastic#util#DevNull() })
|
||||
|
||||
let errorformat =
|
||||
\ '%EError: %m on line %l:,'.
|
||||
|
@ -19,7 +19,7 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_hss_hss_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args' : '-output ' . syntastic#util#DevNull() })
|
||||
let makeprg = self.makeprgBuild({ 'args_after' : '-output ' . syntastic#util#DevNull() })
|
||||
|
||||
let errorformat = '%E%f:%l: %m'
|
||||
|
||||
|
@ -34,8 +34,8 @@ endfunction
|
||||
function! SyntaxCheckers_html_jshint_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe': expand(g:syntastic_jshint_exec),
|
||||
\ 'post_args': '--verbose --extract always' .
|
||||
\ (!empty(g:syntastic_html_jshint_conf) ? ' --config ' . g:syntastic_html_jshint_conf : '') })
|
||||
\ 'args': (!empty(g:syntastic_html_jshint_conf) ? ' --config ' . g:syntastic_html_jshint_conf : ''),
|
||||
\ 'args_after': '--verbose --extract always' })
|
||||
|
||||
let errorformat = '%A%f: line %l\, col %v\, %m \(%t%*\d\)'
|
||||
|
||||
|
@ -175,7 +175,7 @@ endfunction
|
||||
|
||||
function! SyntaxCheckers_html_tidy_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args': s:Args(),
|
||||
\ 'args_after': s:Args(),
|
||||
\ 'tail': '2>&1' })
|
||||
|
||||
let errorformat =
|
||||
|
@ -63,9 +63,9 @@ function! SyntaxCheckers_java_checkstyle_GetLocList() dict
|
||||
endif
|
||||
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args': '-cp ' . g:syntastic_java_checkstyle_classpath .
|
||||
\ ' com.puppycrawl.tools.checkstyle.Main -c ' . g:syntastic_java_checkstyle_conf_file .
|
||||
\ ' -f xml',
|
||||
\ 'args_after': '-cp ' . g:syntastic_java_checkstyle_classpath .
|
||||
\ ' com.puppycrawl.tools.checkstyle.Main -c ' . g:syntastic_java_checkstyle_conf_file .
|
||||
\ ' -f xml',
|
||||
\ 'fname': fname })
|
||||
|
||||
let errorformat = '%f:%t:%l:%c:%m'
|
||||
|
@ -42,14 +42,15 @@ endfunction
|
||||
|
||||
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), ' ')
|
||||
let file_list = join(readfile(g:syntastic_javascript_closure_compiler_file_list))
|
||||
else
|
||||
let file_list = syntastic#util#shexpand('%')
|
||||
endif
|
||||
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe': 'java -jar ' . g:syntastic_javascript_closure_compiler_path,
|
||||
\ 'args': g:syntastic_javascript_closure_compiler_options . ' --js' ,
|
||||
\ 'args': g:syntastic_javascript_closure_compiler_options,
|
||||
\ 'args_after': '--js' ,
|
||||
\ 'fname': file_list })
|
||||
|
||||
let errorformat =
|
||||
|
@ -23,7 +23,7 @@ set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_javascript_eslint_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args': !empty(g:syntastic_javascript_eslint_conf) ? ' --config ' . g:syntastic_javascript_eslint_conf : '' })
|
||||
\ 'args': strlen(g:syntastic_javascript_eslint_conf) ? ' --config ' . g:syntastic_javascript_eslint_conf : '' })
|
||||
|
||||
let errorformat =
|
||||
\ '%E%f: line %l\, col %c\, Error - %m'
|
||||
|
@ -23,7 +23,8 @@ set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_javascript_gjslint_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args': g:syntastic_javascript_gjslint_conf . " --nosummary --unix_mode --nodebug_indentation --nobeep" })
|
||||
\ 'args': g:syntastic_javascript_gjslint_conf,
|
||||
\ 'args_after': '--nosummary --unix_mode --nodebug_indentation --nobeep' })
|
||||
|
||||
let errorformat =
|
||||
\ "%f:%l:(New Error -%\\?\%n) %m," .
|
||||
|
@ -21,7 +21,7 @@ set cpo&vim
|
||||
runtime! syntax_checkers/java/*.vim
|
||||
|
||||
function! SyntaxCheckers_javascript_jscs_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'post_args': '--no-colors --reporter checkstyle' })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '--no-colors --reporter checkstyle' })
|
||||
let errorformat = '%f:%t:%l:%c:%m'
|
||||
return SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
|
@ -30,12 +30,17 @@ function! SyntaxCheckers_javascript_jshint_IsAvailable() dict
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_javascript_jshint_GetLocList() dict
|
||||
let jshint_new = s:JshintNew()
|
||||
if !exists('s:jshint_new')
|
||||
let s:jshint_new =
|
||||
\ syntastic#util#versionIsAtLeast(syntastic#util#getVersion(expand(g:syntastic_jshint_exec) . ' --version'), [1, 1])
|
||||
endif
|
||||
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe': expand(g:syntastic_jshint_exec),
|
||||
\ 'post_args': (jshint_new ? ' --verbose ' : '') . s:Args() })
|
||||
\ 'args': (strlen(g:syntastic_javascript_jshint_conf) ? '--config ' . g:syntastic_javascript_jshint_conf : ''),
|
||||
\ 'args_after': (s:jshint_new ? '--verbose ' : '') })
|
||||
|
||||
let errorformat = jshint_new ?
|
||||
let errorformat = s:jshint_new ?
|
||||
\ '%A%f: line %l\, col %v\, %m \(%t%*\d\)' :
|
||||
\ '%E%f: line %l\, col %v\, %m'
|
||||
|
||||
@ -45,15 +50,6 @@ function! SyntaxCheckers_javascript_jshint_GetLocList() dict
|
||||
\ 'defaults': {'bufnr': bufnr('')} })
|
||||
endfunction
|
||||
|
||||
function! s:JshintNew()
|
||||
return syntastic#util#versionIsAtLeast(syntastic#util#getVersion(expand(g:syntastic_jshint_exec) . ' --version'), [1, 1])
|
||||
endfunction
|
||||
|
||||
function! s:Args()
|
||||
" node-jshint uses .jshintrc as config unless --config arg is present
|
||||
return !empty(g:syntastic_javascript_jshint_conf) ? ' --config ' . g:syntastic_javascript_jshint_conf : ''
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'javascript',
|
||||
\ 'name': 'jshint'})
|
||||
|
@ -23,8 +23,8 @@ set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_javascript_jsl_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args': (!empty(g:syntastic_javascript_jsl_conf) ? "-conf " . g:syntastic_javascript_jsl_conf : "") .
|
||||
\ " -nologo -nofilelisting -nosummary -nocontext -process" })
|
||||
\ 'args': (strlen(g:syntastic_javascript_jsl_conf) ? '-conf ' . g:syntastic_javascript_jsl_conf : ''),
|
||||
\ 'args_after': '-nologo -nofilelisting -nosummary -nocontext -process' })
|
||||
|
||||
let errorformat =
|
||||
\ '%W%f(%l): lint warning: %m,'.
|
||||
|
@ -18,7 +18,7 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_json_jsonlint_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'post_args': '--compact' })
|
||||
let makeprg = self.makeprgBuild({ 'post_args_after': '--compact' })
|
||||
|
||||
let errorformat =
|
||||
\ '%ELine %l:%c,'.
|
||||
|
@ -23,7 +23,7 @@ endif
|
||||
let g:loaded_syntastic_less_lessc_checker = 1
|
||||
|
||||
if !exists("g:syntastic_less_options")
|
||||
let g:syntastic_less_options = "--no-color"
|
||||
let g:syntastic_less_options = ""
|
||||
endif
|
||||
|
||||
if !exists("g:syntastic_less_use_less_lint")
|
||||
@ -47,6 +47,7 @@ function! SyntaxCheckers_less_lessc_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe': s:check_file,
|
||||
\ 'args': g:syntastic_less_options,
|
||||
\ 'args_after': '--no-color',
|
||||
\ 'tail': '> ' . syntastic#util#DevNull() })
|
||||
|
||||
let errorformat =
|
||||
|
@ -31,7 +31,7 @@ endfunction
|
||||
|
||||
function! SyntaxCheckers_lex_flex_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe': self.getExec() . ' ' . syntastic#c#NullOutput() })
|
||||
\ 'args_after': syntastic#c#NullOutput() })
|
||||
|
||||
let errorformat = '%f:%l: %m'
|
||||
|
||||
|
@ -22,9 +22,9 @@ function! SyntaxCheckers_limbo_limbo_GetLocList() dict
|
||||
let include = !empty($INFERNO_HOME) ? '-I$INFERNO_HOME ' : ''
|
||||
" don't generate .dis in current dir while checking syntax,
|
||||
" .dis should be generated by `mk`
|
||||
let output = filereadable('mkfile') ? ' -o /dev/null' : ''
|
||||
let output = filereadable('mkfile') ? (' ' . syntastic#c#NullOutput()) : ''
|
||||
|
||||
let makeprg = self.makeprgBuild({ 'args': include . '-w' . output })
|
||||
let makeprg = self.makeprgBuild({ 'args_before': include . '-w' . output })
|
||||
|
||||
let errorformat = '%E%f:%l:%m'
|
||||
if expand('%') =~# '\m\.m$'
|
||||
|
@ -20,8 +20,7 @@ set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_lisp_clisp_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args': '-q -c',
|
||||
\ 'tail': syntastic#c#NullOutput() })
|
||||
\ 'args_after': '-q -c ' . syntastic#c#NullOutput() })
|
||||
|
||||
let errorformat =
|
||||
\ '%-G;%.%#,' .
|
||||
|
@ -19,7 +19,7 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_llvm_llvm_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args': syntastic#c#NullOutput() })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': syntastic#c#NullOutput() })
|
||||
|
||||
let errorformat = 'llc: %f:%l:%c: %trror: %m'
|
||||
|
||||
|
@ -45,7 +45,7 @@ function! SyntaxCheckers_lua_luac_GetHighlightRegex(pos)
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_lua_luac_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args': '-p' })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '-p' })
|
||||
|
||||
let errorformat = 'luac: %#%f:%l: %m'
|
||||
|
||||
|
@ -19,7 +19,7 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_matlab_mlint_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args': '-id $*' })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '-id $*' })
|
||||
|
||||
let errorformat =
|
||||
\ 'L %l (C %c): %*[a-zA-Z0-9]: %m,'.
|
||||
|
@ -20,7 +20,7 @@ set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_nasm_nasm_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args': '-X gnu -f elf' .
|
||||
\ 'args_after': '-X gnu -f elf' .
|
||||
\ ' -I ' . syntastic#util#shescape(expand("%:p:h") . "/") .
|
||||
\ ' ' . syntastic#c#NullOutput() })
|
||||
|
||||
|
@ -19,7 +19,7 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_nroff_mandoc_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args': '-Tlint' })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '-Tlint' })
|
||||
|
||||
let errorformat =
|
||||
\ '%E%f:%l:%c: %tRROR: %m,' .
|
||||
|
@ -73,7 +73,7 @@ function! SyntaxCheckers_perl_perl_GetLocList() dict
|
||||
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe': exe,
|
||||
\ 'args': '-c -X ' . extra })
|
||||
\ 'args_before': '-c -X ' . extra })
|
||||
|
||||
let errors = SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
@ -86,7 +86,7 @@ function! SyntaxCheckers_perl_perl_GetLocList() dict
|
||||
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe': exe,
|
||||
\ 'args': '-c -Mwarnings ' . extra })
|
||||
\ 'args_before': '-c -Mwarnings ' . extra })
|
||||
|
||||
return SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
|
@ -38,7 +38,7 @@ set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_perl_perlcritic_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'post_args': '--quiet --nocolor --verbose "\%s:\%f:\%l:\%c:(\%s) \%m (\%e)\n"' })
|
||||
\ 'args_after': '--quiet --nocolor --verbose "\%s:\%f:\%l:\%c:(\%s) \%m (\%e)\n"' })
|
||||
|
||||
let errorformat = '%t:%f:%l:%c:%m'
|
||||
|
||||
|
@ -25,7 +25,8 @@ endfunction
|
||||
|
||||
function! SyntaxCheckers_php_php_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args': '-l -d error_reporting=E_ALL -d display_errors=1 -d log_errors=0 -d xdebug.cli_color=0' })
|
||||
\ 'args': '-d error_reporting=E_ALL',
|
||||
\ 'args_after': '-l -d display_errors=1 -d log_errors=0 -d xdebug.cli_color=0' })
|
||||
|
||||
let errorformat =
|
||||
\ '%-GNo syntax errors detected in%.%#,'.
|
||||
|
@ -22,7 +22,7 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_php_phpcs_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args': '--report=csv' })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '--report=csv' })
|
||||
|
||||
let errorformat =
|
||||
\ '%-GFile\,Line\,Column\,Type\,Message\,Source\,Severity,'.
|
||||
|
@ -58,7 +58,7 @@ function! SyntaxCheckers_php_phpmd_GetHighlightRegex(item)
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_php_phpmd_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'post_args': 'text codesize,design,unusedcode,naming' })
|
||||
let makeprg = self.makeprgBuild({ 'post_args_before': 'text codesize,design,unusedcode,naming' })
|
||||
|
||||
let errorformat = '%E%f:%l%\s%#%m'
|
||||
|
||||
|
@ -24,7 +24,7 @@ function! SyntaxCheckers_po_msgfmt_GetHighlightRegex(item)
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_po_msgfmt_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args': '-c ' . syntastic#c#NullOutput() })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '-c ' . syntastic#c#NullOutput() })
|
||||
|
||||
let errorformat =
|
||||
\ '%W%f:%l: warning: %m,' .
|
||||
|
@ -27,7 +27,7 @@ function! SyntaxCheckers_puppet_puppet_GetLocList() dict
|
||||
let args = '--color=false --parseonly'
|
||||
endif
|
||||
|
||||
let makeprg = self.makeprgBuild({ 'args': args })
|
||||
let makeprg = self.makeprgBuild({ 'args_before': args })
|
||||
|
||||
let errorformat =
|
||||
\ '%-Gerr: Try ''puppet help parser validate'' for usage,' .
|
||||
|
@ -33,7 +33,7 @@ endfunction
|
||||
|
||||
function! SyntaxCheckers_puppet_puppetlint_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'post_args': '--log-format "%{KIND} [%{check}] %{message} at %{fullpath}:%{linenumber}"' })
|
||||
\ 'args_after': '--log-format "%{KIND} [%{check}] %{message} at %{fullpath}:%{linenumber}"' })
|
||||
|
||||
let errorformat = '%t%*[a-zA-Z] %m at %f:%l'
|
||||
|
||||
|
@ -19,7 +19,7 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_python_frosted_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'post_args': '-vb' })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '-vb' })
|
||||
|
||||
let errorformat =
|
||||
\ '%f:%l:%c:%m,' .
|
||||
|
@ -23,7 +23,7 @@ function! SyntaxCheckers_python_pylama_GetHighlightRegex(item)
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_python_pylama_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'post_args': '-f pep8' })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '-f pep8' })
|
||||
|
||||
" TODO: "WARNING:pylama:..." messages are probably a logging bug
|
||||
let errorformat =
|
||||
|
@ -23,7 +23,7 @@ endfunction
|
||||
|
||||
function! SyntaxCheckers_python_pylint_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args': (s:pylint_new ? '-f text --msg-template="{path}:{line}:{column}:{C}: [{symbol}] {msg}" -r n' : '-f parseable -r n -i y') })
|
||||
\ 'args_after': (s:pylint_new ? '-f text --msg-template="{path}:{line}:{column}:{C}: [{symbol}] {msg}" -r n' : '-f parseable -r n -i y') })
|
||||
|
||||
let errorformat =
|
||||
\ '%A%f:%l:%c:%t: %m,' .
|
||||
|
@ -25,7 +25,7 @@ set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_rst_rst2pseudoxml_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args': '--report=2 --exit-status=1',
|
||||
\ 'args_after': '--report=2 --exit-status=1',
|
||||
\ 'tail': syntastic#util#DevNull() })
|
||||
|
||||
let errorformat =
|
||||
|
@ -21,13 +21,16 @@ set cpo&vim
|
||||
function! SyntaxCheckers_ruby_jruby_GetLocList() dict
|
||||
if syntastic#util#isRunningWindows()
|
||||
let exe = self.getExec()
|
||||
let args = '-W1 -T1 -c'
|
||||
let args = '-T1'
|
||||
else
|
||||
let exe = 'RUBYOPT= ' . self.getExec()
|
||||
let args = '-W1 -c'
|
||||
let args = ''
|
||||
endif
|
||||
|
||||
let makeprg = self.makeprgBuild({ 'exe': exe, 'args': args })
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe': exe,
|
||||
\ 'args': args,
|
||||
\ 'args_after': '-W1 -c' })
|
||||
|
||||
let errorformat =
|
||||
\ '%-GSyntax OK for %f,'.
|
||||
|
@ -20,7 +20,7 @@ set cpo&vim
|
||||
function! SyntaxCheckers_ruby_macruby_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe': 'RUBYOPT= ' . self.getExec(),
|
||||
\ 'args': '-W1 -c' })
|
||||
\ 'args_after': '-W1 -c' })
|
||||
|
||||
let errorformat =
|
||||
\ '%-GSyntax OK,'.
|
||||
|
@ -39,7 +39,7 @@ function! SyntaxCheckers_ruby_mri_GetLocList() dict
|
||||
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe': exe,
|
||||
\ 'args': '-w -T1 -c' })
|
||||
\ 'args_after': '-w -T1 -c' })
|
||||
|
||||
"this is a hack to filter out a repeated useless warning in rspec files
|
||||
"containing lines like
|
||||
|
@ -29,7 +29,7 @@ function! SyntaxCheckers_ruby_rubocop_IsAvailable() dict
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_ruby_rubocop_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args': '--format emacs --silent' })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '--format emacs --silent' })
|
||||
|
||||
let errorformat = '%f:%l:%c: %t: %m'
|
||||
|
||||
|
@ -19,7 +19,7 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_rust_rustc_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args': '--no-trans' })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '--no-trans' })
|
||||
|
||||
let errorformat =
|
||||
\ '%E%f:%l:%c: %\d%#:%\d%# %.%\{-}error:%.%\{-} %m,' .
|
||||
|
@ -39,7 +39,7 @@ function! SyntaxCheckers_sass_sass_GetLocList() dict
|
||||
endif
|
||||
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args': '--cache-location ' . s:sass_cache_location . ' ' . s:imports . ' --check' })
|
||||
\ 'args_before': '--cache-location ' . s:sass_cache_location . ' ' . s:imports . ' --check' })
|
||||
|
||||
let errorformat =
|
||||
\ '%ESyntax %trror: %m,' .
|
||||
|
@ -27,7 +27,8 @@ function! SyntaxCheckers_scala_fsc_GetLocList() dict
|
||||
" working directory changing after being started
|
||||
" that's why we better pass an absolute path
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args': '-Ystop-after:parser ' . g:syntastic_scala_options,
|
||||
\ 'args': g:syntastic_scala_options,
|
||||
\ 'args_after': '-Ystop-after:parser',
|
||||
\ 'fname': syntastic#util#shexpand('%:p') })
|
||||
|
||||
let errorformat =
|
||||
|
@ -24,7 +24,8 @@ set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_scala_scalac_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args': '-Ystop-after:parser ' . g:syntastic_scala_options })
|
||||
\ 'args': g:syntastic_scala_options,
|
||||
\ 'args_after': '-Ystop-after:parser' })
|
||||
|
||||
let errorformat =
|
||||
\ '%E%f:%l: %trror: %m,' .
|
||||
|
@ -69,7 +69,7 @@ function! SyntaxCheckers_sh_sh_GetLocList() dict
|
||||
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe': s:GetShell(),
|
||||
\ 'args': '-n' })
|
||||
\ 'args_after': '-n' })
|
||||
|
||||
let errorformat = '%f: line %l: %m'
|
||||
|
||||
|
@ -12,7 +12,7 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_sh_shellcheck_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args': '-f gcc' })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '-f gcc' })
|
||||
|
||||
let errorformat =
|
||||
\ '%f:%l:%c: %trror: %m,' .
|
||||
|
@ -26,7 +26,7 @@ function! s:SlimrbVersion()
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_slim_slimrb_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args': '-c' })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '-c' })
|
||||
|
||||
if syntastic#util#versionIsAtLeast(s:SlimrbVersion(), [1,3,1])
|
||||
let errorformat =
|
||||
|
@ -21,7 +21,7 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_tcl_nagelfar_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args': '-H' })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '-H' })
|
||||
|
||||
let errorformat =
|
||||
\ '%I%f: %l: N %m,'.
|
||||
|
@ -36,7 +36,7 @@ if !exists('g:syntastic_tex_chktex_showmsgs')
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_tex_chktex_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'post_args': '-q -v1' })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '-q -v1' })
|
||||
|
||||
let errorformat =
|
||||
\ '%EError %n in %f line %l: %m,' .
|
||||
|
@ -19,7 +19,9 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_twig_twiglint_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args': 'lint --format=csv' })
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args_before': 'lint',
|
||||
\ 'args_after': '--format=csv' })
|
||||
|
||||
let errorformat = '"%f"\,%l\,%m'
|
||||
|
||||
|
@ -15,7 +15,7 @@ set cpo&vim
|
||||
function! SyntaxCheckers_typescript_tsc_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args': '--module commonjs',
|
||||
\ 'post_args': '--out ' . syntastic#util#DevNull() })
|
||||
\ 'args_after': '--out ' . syntastic#util#DevNull() })
|
||||
|
||||
let errorformat =
|
||||
\ '%E%f %#(%l\,%c): error %m,' .
|
||||
|
@ -19,7 +19,7 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_vhdl_ghdl_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args': '-s' })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '-s' })
|
||||
|
||||
let errorformat = '%f:%l:%c: %m'
|
||||
|
||||
|
@ -57,7 +57,7 @@ endfunction
|
||||
|
||||
function! SyntaxCheckers_xhtml_tidy_GetLocList() dict
|
||||
let encopt = s:TidyEncOptByFenc()
|
||||
let makeprg = self.makeprgBuild({ 'args': encopt . ' -xml -e' })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': encopt . ' -xml -e' })
|
||||
|
||||
let errorformat=
|
||||
\ '%Wline %l column %v - Warning: %m,' .
|
||||
|
@ -23,7 +23,7 @@ set cpo&vim
|
||||
" and http://www.xmlsoft.org/catalog.html for more information.
|
||||
|
||||
function! SyntaxCheckers_xml_xmllint_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args': '--xinclude --noout --postvalid' })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '--xinclude --noout --postvalid' })
|
||||
|
||||
let errorformat=
|
||||
\ '%E%f:%l: error : %m,' .
|
||||
|
@ -20,7 +20,7 @@ set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_yacc_bison_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe': self.getExec() . ' ' . syntastic#c#NullOutput() })
|
||||
\ 'args_after': syntastic#c#NullOutput() })
|
||||
|
||||
let errorformat =
|
||||
\ '%E%f:%l%.%v-%.%\{-}: %trror: %m,' .
|
||||
|
@ -27,7 +27,7 @@ function! SyntaxCheckers_yaml_jsyaml_GetLocList() dict
|
||||
\ syntastic#util#versionIsAtLeast(syntastic#util#getVersion(self.getExec() . ' --version'), [2])
|
||||
endif
|
||||
|
||||
let makeprg = self.makeprgBuild({ 'args': s:js_yaml_new ? '' : '--compact' })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': (s:js_yaml_new ? '' : '--compact') })
|
||||
|
||||
let errorformat =
|
||||
\ 'Error on line %l\, col %c:%m,' .
|
||||
|
@ -37,7 +37,7 @@ endfunction
|
||||
function! SyntaxCheckers_yaml_yamlxs_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe': s:Exe(),
|
||||
\ 'args': s:Modules() . ' -e ' . syntastic#util#shescape('YAML::XS::LoadFile($ARGV[0])') })
|
||||
\ 'args_before': s:Modules() . ' -e ' . syntastic#util#shescape('YAML::XS::LoadFile($ARGV[0])') })
|
||||
|
||||
let errorformat =
|
||||
\ '%EYAML::XS::Load Error: The problem:,' .
|
||||
|
@ -19,7 +19,7 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_zsh_zsh_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args': '-n' })
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '-n' })
|
||||
|
||||
let errorformat = '%f:%l: %m'
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user