2017-11-12 12:09:19 +00:00
|
|
|
Before:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#SetUpLinterTest('less', 'stylelint')
|
2017-11-12 12:09:19 +00:00
|
|
|
unlet! b:executable
|
|
|
|
|
|
|
|
After:
|
|
|
|
unlet! b:executable
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#TearDownLinterTest()
|
2017-11-12 12:09:19 +00:00
|
|
|
|
|
|
|
Execute(node_modules directories should be discovered):
|
|
|
|
call ale#test#SetFilename('stylelint_paths/nested/testfile.less')
|
|
|
|
|
2017-12-19 18:23:09 +00:00
|
|
|
let b:executable = ale#path#Simplify(
|
2017-11-12 12:09:19 +00:00
|
|
|
\ g:dir
|
|
|
|
\ . '/stylelint_paths/node_modules/.bin/stylelint'
|
|
|
|
\)
|
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter b:executable, ale#Escape(b:executable) . ' --stdin-filename %s'
|
2017-11-12 12:09:19 +00:00
|
|
|
|
|
|
|
Execute(The global override should work):
|
|
|
|
let b:ale_less_stylelint_executable = 'foobar'
|
|
|
|
let b:ale_less_stylelint_use_global = 1
|
|
|
|
|
|
|
|
call ale#test#SetFilename('stylelint_paths/nested/testfile.less')
|
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter 'foobar', ale#Escape('foobar') . ' --stdin-filename %s'
|
2017-11-12 12:09:19 +00:00
|
|
|
|
|
|
|
Execute(Extra options should be configurable):
|
|
|
|
let b:ale_less_stylelint_options = '--whatever'
|
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter 'stylelint',
|
|
|
|
\ ale#Escape('stylelint') . ' --whatever --stdin-filename %s'
|