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):
|
|
|
|
call ale#test#SetFilename('../slimlint-test-files/subdir/file.slim')
|
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter 'slim-lint',
|
|
|
|
\ ale#Env(
|
|
|
|
\ 'SLIM_LINT_RUBOCOP_CONF',
|
|
|
|
\ ale#path#Simplify(g:dir . '/../slimlint-test-files/.rubocop.yml')
|
|
|
|
\ )
|
|
|
|
\ . 'slim-lint %t'
|