2017-06-29 10:40:03 +00:00
|
|
|
Before:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#SetUpLinterTest('pug', 'puglint')
|
2017-06-29 10:40:03 +00:00
|
|
|
|
|
|
|
After:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#TearDownLinterTest()
|
2017-06-29 10:40:03 +00:00
|
|
|
|
|
|
|
Execute(puglint should detect local executables and package.json):
|
|
|
|
call ale#test#SetFilename('puglint_project/test.pug')
|
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter
|
2017-12-19 18:23:09 +00:00
|
|
|
\ ale#path#Simplify(g:dir . '/puglint_project/node_modules/.bin/pug-lint'),
|
|
|
|
\ ale#Escape(ale#path#Simplify(g:dir . '/puglint_project/node_modules/.bin/pug-lint'))
|
|
|
|
\ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/puglint_project/package.json'))
|
2018-07-15 17:24:53 +00:00
|
|
|
\ . ' -r inline %t'
|
2017-06-29 10:40:03 +00:00
|
|
|
|
|
|
|
Execute(puglint should use global executables if configured):
|
|
|
|
let g:ale_pug_puglint_use_global = 1
|
|
|
|
|
|
|
|
call ale#test#SetFilename('puglint_project/test.pug')
|
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter 'pug-lint',
|
2017-06-29 10:40:03 +00:00
|
|
|
\ ale#Escape('pug-lint')
|
2017-12-19 18:23:09 +00:00
|
|
|
\ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/puglint_project/package.json'))
|
2018-07-15 17:24:53 +00:00
|
|
|
\ . ' -r inline %t'
|
2017-06-29 10:40:03 +00:00
|
|
|
|
|
|
|
Execute(puglint should detect .pug-lintrc):
|
|
|
|
call ale#test#SetFilename('puglint_project/puglint_rc_dir/subdir/test.pug')
|
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter ale#path#Simplify(g:dir . '/puglint_project/node_modules/.bin/pug-lint'),
|
2017-12-19 18:23:09 +00:00
|
|
|
\ ale#Escape(ale#path#Simplify(g:dir . '/puglint_project/node_modules/.bin/pug-lint'))
|
|
|
|
\ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/puglint_project/puglint_rc_dir/.pug-lintrc'))
|
2018-07-15 17:24:53 +00:00
|
|
|
\ . ' -r inline %t'
|
2017-06-29 10:40:03 +00:00
|
|
|
|
|
|
|
Execute(puglint should detect .pug-lintrc.js):
|
|
|
|
call ale#test#SetFilename('puglint_project/puglint_rc_js_dir/subdir/test.pug')
|
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter ale#path#Simplify(g:dir . '/puglint_project/node_modules/.bin/pug-lint'),
|
2017-12-19 18:23:09 +00:00
|
|
|
\ ale#Escape(ale#path#Simplify(g:dir . '/puglint_project/node_modules/.bin/pug-lint'))
|
|
|
|
\ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/puglint_project/puglint_rc_js_dir/.pug-lintrc.js'))
|
2018-07-15 17:24:53 +00:00
|
|
|
\ . ' -r inline %t'
|
2017-06-29 10:40:03 +00:00
|
|
|
|
|
|
|
Execute(puglint should detect .pug-lintrc.json):
|
|
|
|
call ale#test#SetFilename('puglint_project/puglint_rc_json_dir/subdir/test.pug')
|
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter ale#path#Simplify(g:dir . '/puglint_project/node_modules/.bin/pug-lint'),
|
2017-12-19 18:23:09 +00:00
|
|
|
\ ale#Escape(ale#path#Simplify(g:dir . '/puglint_project/node_modules/.bin/pug-lint'))
|
|
|
|
\ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/puglint_project/puglint_rc_json_dir/.pug-lintrc.json'))
|
2018-07-15 17:24:53 +00:00
|
|
|
\ . ' -r inline %t'
|