2017-07-13 18:41:01 -04:00
|
|
|
Before:
|
2017-10-05 17:31:00 -04:00
|
|
|
Save g:ale_scala_scalastyle_options
|
|
|
|
Save g:ale_scalastyle_config_loc
|
|
|
|
|
|
|
|
unlet! g:ale_scala_scalastyle_options
|
|
|
|
unlet! g:ale_scalastyle_config_loc
|
|
|
|
|
2017-07-13 18:41:01 -04:00
|
|
|
runtime ale_linters/scala/scalastyle.vim
|
|
|
|
|
|
|
|
After:
|
2017-10-05 17:31:00 -04:00
|
|
|
Restore
|
|
|
|
|
2017-07-13 18:41:01 -04:00
|
|
|
call ale#linter#Reset()
|
|
|
|
|
|
|
|
Execute(Should return the correct default command):
|
|
|
|
AssertEqual
|
|
|
|
\ 'scalastyle %t',
|
|
|
|
\ ale_linters#scala#scalastyle#GetCommand(bufnr(''))
|
|
|
|
|
|
|
|
Execute(Should allow using a custom config file):
|
|
|
|
let g:ale_scalastyle_config_loc = '/dooper/config.xml'
|
|
|
|
|
|
|
|
AssertEqual
|
2017-10-05 17:31:00 -04:00
|
|
|
\ 'scalastyle'
|
|
|
|
\ . ' --config ' . ale#Escape('/dooper/config.xml')
|
|
|
|
\ . ' %t',
|
2017-07-13 18:41:01 -04:00
|
|
|
\ ale_linters#scala#scalastyle#GetCommand(bufnr(''))
|
|
|
|
|
|
|
|
Execute(Should allow using custom options):
|
|
|
|
let g:ale_scala_scalastyle_options = '--warnings false --quiet true'
|
|
|
|
|
|
|
|
AssertEqual
|
2017-10-05 17:31:00 -04:00
|
|
|
\ 'scalastyle'
|
|
|
|
\ . ' --warnings false --quiet true'
|
|
|
|
\ . ' %t',
|
2017-07-13 18:41:01 -04:00
|
|
|
\ ale_linters#scala#scalastyle#GetCommand(bufnr(''))
|