2017-07-17 19:28:21 +00:00
|
|
|
Before:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#SetUpLinterTest('yaml', 'swaglint')
|
2017-07-17 19:28:21 +00:00
|
|
|
|
|
|
|
After:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#TearDownLinterTest()
|
2017-11-15 17:21:17 +00:00
|
|
|
|
2017-07-17 19:28:21 +00:00
|
|
|
Execute(The yaml swaglint command callback should return the correct default string):
|
2018-08-02 22:44:12 +00:00
|
|
|
AssertLinter 'swaglint', ale#Escape('swaglint') . ' -r compact --stdin'
|
2017-07-17 19:28:21 +00:00
|
|
|
|
|
|
|
Execute(The yaml swaglint command callback should be configurable):
|
|
|
|
let g:ale_yaml_swaglint_executable = '~/.local/bin/swaglint'
|
2018-07-15 17:24:53 +00:00
|
|
|
|
|
|
|
AssertLinter '~/.local/bin/swaglint',
|
2018-08-02 22:44:12 +00:00
|
|
|
\ ale#Escape('~/.local/bin/swaglint') . ' -r compact --stdin'
|
2017-07-17 19:28:21 +00:00
|
|
|
|
|
|
|
Execute(The yaml swaglint command callback should allow a global installation to be used):
|
|
|
|
let g:ale_yaml_swaglint_executable = '/usr/local/bin/swaglint'
|
|
|
|
let g:ale_yaml_swaglint_use_global = 1
|
2018-07-15 17:24:53 +00:00
|
|
|
|
|
|
|
AssertLinter '/usr/local/bin/swaglint',
|
2018-08-02 22:44:12 +00:00
|
|
|
\ ale#Escape('/usr/local/bin/swaglint') . ' -r compact --stdin'
|
2017-07-17 19:28:21 +00:00
|
|
|
|
|
|
|
Execute(The yaml swaglint command callback should allow a local installation to be used):
|
|
|
|
call ale#test#SetFilename('swaglint_paths/docs/swagger.yaml')
|
2017-10-05 21:31:00 +00:00
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter
|
2017-12-19 18:23:09 +00:00
|
|
|
\ ale#path#Simplify(g:dir . '/swaglint_paths/node_modules/.bin/swaglint'),
|
2018-08-02 22:44:12 +00:00
|
|
|
\ ale#Escape(ale#path#Simplify(g:dir . '/swaglint_paths/node_modules/.bin/swaglint'))
|
2018-07-15 17:24:53 +00:00
|
|
|
\ . ' -r compact --stdin'
|