2018-07-01 05:21:59 -04:00
|
|
|
Before:
|
2018-07-15 13:24:53 -04:00
|
|
|
call ale#assert#SetUpLinterTest('ruby', 'reek')
|
2018-07-01 05:21:59 -04:00
|
|
|
|
|
|
|
After:
|
2018-07-15 13:24:53 -04:00
|
|
|
call ale#assert#TearDownLinterTest()
|
2018-07-01 05:21:59 -04:00
|
|
|
|
|
|
|
Execute(The reek callbacks should return the correct default values):
|
2018-07-15 13:24:53 -04:00
|
|
|
WithChainResults ['reek 5.0.0']
|
|
|
|
AssertLinter 'reek', [
|
2018-08-24 11:33:59 -04:00
|
|
|
\ ale#Escape('reek') . ' --version',
|
2018-10-16 13:37:39 -04:00
|
|
|
\ ale#Escape('reek') . ' -f json --no-progress --no-color --force-exclusion --stdin-filename %s',
|
2018-07-15 13:24:53 -04:00
|
|
|
\]
|
2018-07-01 05:21:59 -04:00
|
|
|
|
|
|
|
" Try with older versions.
|
|
|
|
call ale#semver#ResetVersionCache()
|
2018-07-15 13:24:53 -04:00
|
|
|
|
|
|
|
WithChainResults ['reek 4.8.2']
|
|
|
|
AssertLinter 'reek', [
|
2018-08-24 11:33:59 -04:00
|
|
|
\ ale#Escape('reek') . ' --version',
|
2018-10-16 13:37:39 -04:00
|
|
|
\ ale#Escape('reek') . ' -f json --no-progress --no-color --force-exclusion',
|
2018-07-15 13:24:53 -04:00
|
|
|
\]
|
2018-07-01 05:21:59 -04:00
|
|
|
|
2018-08-24 11:33:59 -04:00
|
|
|
Execute(Setting bundle appends 'exec reek'):
|
|
|
|
let g:ale_ruby_reek_executable = 'bundle'
|
|
|
|
|
|
|
|
WithChainResults ['reek 5.0.0']
|
|
|
|
AssertLinter 'bundle', ale#Escape('bundle')
|
|
|
|
\ . ' exec reek'
|
2018-10-16 13:37:39 -04:00
|
|
|
\ . ' -f json --no-progress --no-color --force-exclusion --stdin-filename %s',
|
2018-08-24 11:33:59 -04:00
|
|
|
|
|
|
|
" Try with older versions.
|
|
|
|
call ale#semver#ResetVersionCache()
|
|
|
|
|
|
|
|
WithChainResults ['reek 4.8.2']
|
|
|
|
AssertLinter 'bundle', ale#Escape('bundle')
|
|
|
|
\ . ' exec reek'
|
2018-10-16 13:37:39 -04:00
|
|
|
\ . ' -f json --no-progress --no-color --force-exclusion'
|
2018-08-24 11:33:59 -04:00
|
|
|
|
2018-07-01 05:21:59 -04:00
|
|
|
Execute(The reek version check should be cached):
|
2018-07-15 13:24:53 -04:00
|
|
|
WithChainResults ['reek 5.0.0']
|
|
|
|
AssertLinter 'reek', [
|
2018-08-24 11:33:59 -04:00
|
|
|
\ ale#Escape('reek') . ' --version',
|
2018-10-16 13:37:39 -04:00
|
|
|
\ ale#Escape('reek') . ' -f json --no-progress --no-color --force-exclusion --stdin-filename %s',
|
2018-07-15 13:24:53 -04:00
|
|
|
\]
|
2018-07-01 05:21:59 -04:00
|
|
|
|
2018-07-15 13:24:53 -04:00
|
|
|
WithChainResults []
|
|
|
|
AssertLinter 'reek', [
|
2018-07-01 05:21:59 -04:00
|
|
|
\ '',
|
2018-10-16 13:37:39 -04:00
|
|
|
\ ale#Escape('reek') . ' -f json --no-progress --no-color --force-exclusion --stdin-filename %s',
|
2018-07-15 13:24:53 -04:00
|
|
|
\]
|