2018-10-18 08:19:27 +00:00
|
|
|
Before:
|
|
|
|
call ale#assert#SetUpLinterTest('ansible', 'ansible_lint')
|
|
|
|
let b:bin_dir = has('win32') ? 'Scripts' : 'bin'
|
|
|
|
|
|
|
|
After:
|
|
|
|
unlet! b:bin_dir
|
|
|
|
unlet! b:executable
|
|
|
|
call ale#assert#TearDownLinterTest()
|
|
|
|
|
2021-02-28 12:43:23 +00:00
|
|
|
Execute(The ansible_lint version <5.0.0 command callback should return default string):
|
|
|
|
GivenCommandOutput ['v4.1.2']
|
2018-10-18 08:19:27 +00:00
|
|
|
AssertLinter 'ansible-lint', ale#Escape('ansible-lint') . ' -p %t'
|
|
|
|
|
2021-02-28 12:43:23 +00:00
|
|
|
Execute(The ansible_lint version >=5.0.0 command callback should return default string):
|
|
|
|
GivenCommandOutput ['v5.1.2']
|
|
|
|
AssertLinter 'ansible-lint', ale#Escape('ansible-lint') . ' --parseable-severity -x yaml'
|
|
|
|
|
2018-10-18 08:19:27 +00:00
|
|
|
Execute(The ansible_lint executable should be configurable):
|
|
|
|
let g:ale_ansible_ansible_lint_executable = '~/.local/bin/ansible-lint'
|
2021-02-28 12:43:23 +00:00
|
|
|
GivenCommandOutput ['v4.1.2']
|
2018-10-18 08:19:27 +00:00
|
|
|
AssertLinter '~/.local/bin/ansible-lint',
|
|
|
|
\ ale#Escape('~/.local/bin/ansible-lint') . ' -p %t'
|