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']
|
2021-07-20 01:00:49 +00:00
|
|
|
AssertLinter 'ansible-lint', ale#Escape('ansible-lint') . ' --nocolor -p %t'
|
2018-10-18 08:19:27 +00:00
|
|
|
|
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']
|
2021-07-31 03:35:43 +00:00
|
|
|
AssertLinter 'ansible-lint', ale#Escape('ansible-lint') . ' --nocolor --parseable-severity -x yaml %s'
|
2021-02-28 12:43:23 +00:00
|
|
|
|
2022-05-09 11:27:21 +00:00
|
|
|
Execute(The ansible_lint version >=6.0.0 command callback should return default string):
|
|
|
|
GivenCommandOutput ['v6.0.2']
|
|
|
|
AssertLinter 'ansible-lint', ale#Escape('ansible-lint') . ' --nocolor -f json -x yaml %s'
|
|
|
|
|
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',
|
2021-07-20 01:00:49 +00:00
|
|
|
\ ale#Escape('~/.local/bin/ansible-lint') . ' --nocolor -p %t'
|