2018-07-01 09:21:59 +00:00
|
|
|
Before:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#SetUpLinterTest('ruby', 'reek')
|
2018-07-01 09:21:59 +00:00
|
|
|
|
|
|
|
After:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#TearDownLinterTest()
|
2018-07-01 09:21:59 +00:00
|
|
|
|
|
|
|
Execute(The reek callbacks should return the correct default values):
|
2018-07-15 17:24:53 +00:00
|
|
|
WithChainResults ['reek 5.0.0']
|
|
|
|
AssertLinter 'reek', [
|
2018-08-24 15:33:59 +00:00
|
|
|
\ ale#Escape('reek') . ' --version',
|
|
|
|
\ ale#Escape('reek') . ' -f json --no-progress --no-color --stdin-filename %s',
|
2018-07-15 17:24:53 +00:00
|
|
|
\]
|
2018-07-01 09:21:59 +00:00
|
|
|
|
|
|
|
" Try with older versions.
|
|
|
|
call ale#semver#ResetVersionCache()
|
2018-07-15 17:24:53 +00:00
|
|
|
|
|
|
|
WithChainResults ['reek 4.8.2']
|
|
|
|
AssertLinter 'reek', [
|
2018-08-24 15:33:59 +00:00
|
|
|
\ ale#Escape('reek') . ' --version',
|
|
|
|
\ ale#Escape('reek') . ' -f json --no-progress --no-color',
|
2018-07-15 17:24:53 +00:00
|
|
|
\]
|
2018-07-01 09:21:59 +00:00
|
|
|
|
2018-08-24 15:33:59 +00: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'
|
|
|
|
\ . ' -f json --no-progress --no-color --stdin-filename %s',
|
|
|
|
|
|
|
|
" Try with older versions.
|
|
|
|
call ale#semver#ResetVersionCache()
|
|
|
|
|
|
|
|
WithChainResults ['reek 4.8.2']
|
|
|
|
AssertLinter 'bundle', ale#Escape('bundle')
|
|
|
|
\ . ' exec reek'
|
|
|
|
\ . ' -f json --no-progress --no-color'
|
|
|
|
|
2018-07-01 09:21:59 +00:00
|
|
|
Execute(The reek version check should be cached):
|
2018-07-15 17:24:53 +00:00
|
|
|
WithChainResults ['reek 5.0.0']
|
|
|
|
AssertLinter 'reek', [
|
2018-08-24 15:33:59 +00:00
|
|
|
\ ale#Escape('reek') . ' --version',
|
|
|
|
\ ale#Escape('reek') . ' -f json --no-progress --no-color --stdin-filename %s',
|
2018-07-15 17:24:53 +00:00
|
|
|
\]
|
2018-07-01 09:21:59 +00:00
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
WithChainResults []
|
|
|
|
AssertLinter 'reek', [
|
2018-07-01 09:21:59 +00:00
|
|
|
\ '',
|
2018-08-24 15:33:59 +00:00
|
|
|
\ ale#Escape('reek') . ' -f json --no-progress --no-color --stdin-filename %s',
|
2018-07-15 17:24:53 +00:00
|
|
|
\]
|