Expand a few config parameters.

This commit is contained in:
LCD 47 2014-03-20 07:18:30 +02:00
parent c8f562f0f2
commit 4ded4f4047
7 changed files with 22 additions and 18 deletions

View File

@ -18,7 +18,7 @@ if has('reltime')
let g:syntastic_start = reltime() let g:syntastic_start = reltime()
endif endif
let g:syntastic_version = '3.4.0-4' let g:syntastic_version = '3.4.0-5'
" Sanity checks {{{1 " Sanity checks {{{1

View File

@ -47,7 +47,7 @@ endfunction
function! SyntaxCheckers_actionscript_mxmlc_GetLocList() dict function! SyntaxCheckers_actionscript_mxmlc_GetLocList() dict
let makeprg = self.makeprgBuild({ let makeprg = self.makeprgBuild({
\ 'args_before': (g:syntastic_actionscript_mxmlc_conf != '' ? \ 'args_before': (g:syntastic_actionscript_mxmlc_conf != '' ?
\ ' -load-config+=' . g:syntastic_actionscript_mxmlc_conf : ''), \ ' -load-config+=' . syntastic#util#shexpand(g:syntastic_actionscript_mxmlc_conf) : ''),
\ 'args_after': '-output=' . syntastic#util#DevNull() }) \ 'args_after': '-output=' . syntastic#util#DevNull() })
let errorformat = let errorformat =

View File

@ -34,7 +34,8 @@ endfunction
function! SyntaxCheckers_html_jshint_GetLocList() dict function! SyntaxCheckers_html_jshint_GetLocList() dict
let makeprg = self.makeprgBuild({ let makeprg = self.makeprgBuild({
\ 'exe': expand(g:syntastic_jshint_exec), \ 'exe': expand(g:syntastic_jshint_exec),
\ 'args': (g:syntastic_html_jshint_conf != '' ? '--config ' . g:syntastic_html_jshint_conf : ''), \ 'args': (g:syntastic_html_jshint_conf != '' ?
\ '--config ' . syntastic#util#shexpand(g:syntastic_html_jshint_conf) : ''),
\ 'args_after': '--verbose --extract always' }) \ 'args_after': '--verbose --extract always' })
let errorformat = '%A%f: line %l\, col %v\, %m \(%t%*\d\)' let errorformat = '%A%f: line %l\, col %v\, %m \(%t%*\d\)'

View File

@ -37,7 +37,8 @@ function! SyntaxCheckers_java_checkstyle_GetLocList() dict
let makeprg = self.makeprgBuild({ let makeprg = self.makeprgBuild({
\ 'args_after': '-cp ' . g:syntastic_java_checkstyle_classpath . \ 'args_after': '-cp ' . g:syntastic_java_checkstyle_classpath .
\ ' com.puppycrawl.tools.checkstyle.Main -c ' . g:syntastic_java_checkstyle_conf_file . \ ' com.puppycrawl.tools.checkstyle.Main -c ' .
\ syntastic#util#shexpand(g:syntastic_java_checkstyle_conf_file) .
\ ' -f xml', \ ' -f xml',
\ 'fname': fname }) \ 'fname': fname })

View File

@ -43,7 +43,7 @@ let s:save_cpo = &cpo
set cpo&vim set cpo&vim
function! s:CygwinPath(path) function! s:CygwinPath(path)
return substitute(system("cygpath -m " . a:path), '\n', '', 'g') return substitute(system("cygpath -m " . syntastic#util#shescape(a:path)), '\n', '', 'g')
endfunction endfunction
if !exists("g:syntastic_java_javac_temp_dir") if !exists("g:syntastic_java_javac_temp_dir")
@ -123,8 +123,8 @@ function! s:SplitClasspath(classpath)
endfunction endfunction
function! s:LoadConfigFile() function! s:LoadConfigFile()
if filereadable(g:syntastic_java_javac_config_file) if filereadable(expand(g:syntastic_java_javac_config_file))
exe 'source '.g:syntastic_java_javac_config_file exe 'source ' . fnameescape(expand(g:syntastic_java_javac_config_file))
endif endif
endfunction endfunction
@ -137,9 +137,9 @@ function! s:SaveClasspath()
endfor endfor
" save classpath to config file " save classpath to config file
if g:syntastic_java_javac_config_file_enabled if g:syntastic_java_javac_config_file_enabled
if filereadable(g:syntastic_java_javac_config_file) if filereadable(expand(g:syntastic_java_javac_config_file))
" load lines from config file " load lines from config file
let lines = readfile(g:syntastic_java_javac_config_file) let lines = readfile(expand(g:syntastic_java_javac_config_file))
" strip g:syntastic_java_javac_classpath options from config file lines " strip g:syntastic_java_javac_classpath options from config file lines
let i = 0 let i = 0
while i < len(lines) while i < len(lines)
@ -155,7 +155,7 @@ function! s:SaveClasspath()
" add new g:syntastic_java_javac_classpath option to config " add new g:syntastic_java_javac_classpath option to config
call add(lines, 'let g:syntastic_java_javac_classpath = "'.path.'"') call add(lines, 'let g:syntastic_java_javac_classpath = "'.path.'"')
" save config file lines " save config file lines
call writefile(lines, g:syntastic_java_javac_config_file) call writefile(lines, expand(g:syntastic_java_javac_config_file))
endif endif
" set new classpath " set new classpath
let g:syntastic_java_javac_classpath = path let g:syntastic_java_javac_classpath = path
@ -192,7 +192,7 @@ function! s:SaveConfig()
let lines = getline(1, line('$')) let lines = getline(1, line('$'))
if g:syntastic_java_javac_config_file_enabled if g:syntastic_java_javac_config_file_enabled
" save config file lines " save config file lines
call writefile(lines, g:syntastic_java_javac_config_file) call writefile(lines, expand(g:syntastic_java_javac_config_file))
endif endif
let &modified = 0 let &modified = 0
endfunction endfunction
@ -202,8 +202,8 @@ function! s:EditConfig()
let winnr = bufwinnr('^' . command . '$') let winnr = bufwinnr('^' . command . '$')
if winnr < 0 if winnr < 0
let lines = [] let lines = []
if filereadable(g:syntastic_java_javac_config_file) if filereadable(expand(g:syntastic_java_javac_config_file))
let lines = readfile(g:syntastic_java_javac_config_file) let lines = readfile(expand(g:syntastic_java_javac_config_file))
endif endif
execute (len(lines) + 5) . 'sp ' . fnameescape(command) execute (len(lines) + 5) . 'sp ' . fnameescape(command)
@ -329,7 +329,7 @@ function! s:MavenOutputDirectory()
endif endif
if has('win32unix') if has('win32unix')
let output_dir=s:CygwinPath(output_dir) let output_dir = s:CygwinPath(output_dir)
endif endif
return output_dir return output_dir
endif endif

View File

@ -37,7 +37,8 @@ function! SyntaxCheckers_javascript_jshint_GetLocList() dict
let makeprg = self.makeprgBuild({ let makeprg = self.makeprgBuild({
\ 'exe': exe, \ 'exe': exe,
\ 'args': (g:syntastic_javascript_jshint_conf != '' ? '--config ' . g:syntastic_javascript_jshint_conf : ''), \ 'args': (g:syntastic_javascript_jshint_conf != '' ?
\ '--config ' . syntastic#util#shexpand(g:syntastic_javascript_jshint_conf) : ''),
\ 'args_after': (s:jshint_new ? '--verbose ' : '') }) \ 'args_after': (s:jshint_new ? '--verbose ' : '') })
let errorformat = s:jshint_new ? let errorformat = s:jshint_new ?

View File

@ -23,7 +23,8 @@ set cpo&vim
function! SyntaxCheckers_javascript_jsl_GetLocList() dict function! SyntaxCheckers_javascript_jsl_GetLocList() dict
let makeprg = self.makeprgBuild({ let makeprg = self.makeprgBuild({
\ 'args': (g:syntastic_javascript_jsl_conf != '' ? '-conf ' . g:syntastic_javascript_jsl_conf : ''), \ 'args': (g:syntastic_javascript_jsl_conf != '' ?
\ '-conf ' . syntastic#util#shexpand(g:syntastic_javascript_jsl_conf) : ''),
\ 'args_after': '-nologo -nofilelisting -nosummary -nocontext -process' }) \ 'args_after': '-nologo -nofilelisting -nosummary -nocontext -process' })
let errorformat = let errorformat =