2017-09-02 14:48:00 +00:00
|
|
|
Before:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#SetUpLinterTest('slim', 'slimlint')
|
2017-09-02 14:48:00 +00:00
|
|
|
let g:default_command = 'slim-lint %t'
|
|
|
|
|
|
|
|
After:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#TearDownLinterTest()
|
2017-09-02 14:48:00 +00:00
|
|
|
|
|
|
|
Execute(The default command should be correct):
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter 'slim-lint', 'slim-lint %t'
|
2017-09-02 14:48:00 +00:00
|
|
|
|
|
|
|
Execute(The command should have the .rubocop.yml prepended as an env var if one exists):
|
2021-03-20 22:11:22 +00:00
|
|
|
call ale#test#SetFilename('../test-files/slimlint/subdir/file.slim')
|
2017-09-02 14:48:00 +00:00
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter 'slim-lint',
|
|
|
|
\ ale#Env(
|
|
|
|
\ 'SLIM_LINT_RUBOCOP_CONF',
|
2021-03-20 22:11:22 +00:00
|
|
|
\ ale#path#Simplify(g:dir . '/../test-files/slimlint/.rubocop.yml')
|
2018-07-15 17:24:53 +00:00
|
|
|
\ )
|
|
|
|
\ . 'slim-lint %t'
|