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):
|
2019-04-07 09:58:06 -04:00
|
|
|
GivenCommandOutput ['reek 5.0.0']
|
2018-07-15 13:24:53 -04:00
|
|
|
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
|
|
|
|
2019-04-07 09:58:06 -04:00
|
|
|
GivenCommandOutput ['reek 4.8.2']
|
2018-07-15 13:24:53 -04:00
|
|
|
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'
|
|
|
|
|
2019-04-07 09:58:06 -04:00
|
|
|
GivenCommandOutput ['reek 5.0.0']
|
2018-08-24 11:33:59 -04:00
|
|
|
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()
|
|
|
|
|
2019-04-07 09:58:06 -04:00
|
|
|
GivenCommandOutput ['reek 4.8.2']
|
2018-08-24 11:33:59 -04:00
|
|
|
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):
|
2019-04-07 09:58:06 -04:00
|
|
|
GivenCommandOutput ['reek 5.0.0']
|
2018-07-15 13:24:53 -04:00
|
|
|
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
|
|
|
|
2019-04-07 09:58:06 -04:00
|
|
|
GivenCommandOutput []
|
2018-07-15 13:24:53 -04:00
|
|
|
AssertLinter 'reek', [
|
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
|
|
|
\]
|