mirror of https://github.com/dense-analysis/ale
Merge pull request #2914 from hsanson/2913-fix-checkstyle-config-with-options
Fix 2913 - checkstyle config file ignored.
This commit is contained in:
commit
68b484a49f
|
@ -52,7 +52,7 @@ endfunction
|
|||
function! ale_linters#java#checkstyle#GetCommand(buffer) abort
|
||||
let l:options = ale#Var(a:buffer, 'java_checkstyle_options')
|
||||
let l:config_option = ale#Var(a:buffer, 'java_checkstyle_config')
|
||||
let l:config = l:options !~# '\v(^| )-c' && !empty(l:config_option)
|
||||
let l:config = l:options !~# '\v(^| )-c ' && !empty(l:config_option)
|
||||
\ ? s:GetConfig(a:buffer, l:config_option)
|
||||
\ : ''
|
||||
|
||||
|
|
|
@ -20,11 +20,11 @@ Execute(The checkstyle executable should be configurable):
|
|||
\ . ' %s'
|
||||
|
||||
Execute(Custom options should be supported):
|
||||
let b:ale_java_checkstyle_options = '--foobar'
|
||||
let b:ale_java_checkstyle_options = '--foobar -cp -classpath /path/to/checkstyle-8.7-all.jar'
|
||||
|
||||
AssertLinter 'checkstyle',
|
||||
\ ale#Escape('checkstyle')
|
||||
\ . ' --foobar'
|
||||
\ . ' --foobar -cp -classpath /path/to/checkstyle-8.7-all.jar'
|
||||
\ . ' -c ' . ale#Escape('/google_checks.xml')
|
||||
\ . ' %s'
|
||||
|
||||
|
|
Loading…
Reference in New Issue