From 038e4a8c31feb03beea02c09d953affc8c460515 Mon Sep 17 00:00:00 2001 From: serapas Date: Sun, 28 Feb 2021 13:43:23 +0100 Subject: Fix ansible-lint linter definition. (#3601) * Fix ansible-lint linter definition. Use ansible-lint's feature auto-detection instead of temporary file. For auto-detection to work, ansible project has to be also a git repository. Don't use yaml rules. These are checked by yamllint. Refactor pattern to work with ansible-lint >=5.0 version. Clean-up obsolete test cases. * Pull Request changes --- test/command_callback/test_ansible_lint_command_callback.vader | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'test/command_callback') diff --git a/test/command_callback/test_ansible_lint_command_callback.vader b/test/command_callback/test_ansible_lint_command_callback.vader index ddc6c6c8..a3fbde23 100644 --- a/test/command_callback/test_ansible_lint_command_callback.vader +++ b/test/command_callback/test_ansible_lint_command_callback.vader @@ -7,11 +7,16 @@ After: unlet! b:executable call ale#assert#TearDownLinterTest() -Execute(The ansible_lint command callback should return default string): +Execute(The ansible_lint version <5.0.0 command callback should return default string): + GivenCommandOutput ['v4.1.2'] AssertLinter 'ansible-lint', ale#Escape('ansible-lint') . ' -p %t' +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' + Execute(The ansible_lint executable should be configurable): let g:ale_ansible_ansible_lint_executable = '~/.local/bin/ansible-lint' - + GivenCommandOutput ['v4.1.2'] AssertLinter '~/.local/bin/ansible-lint', \ ale#Escape('~/.local/bin/ansible-lint') . ' -p %t' -- cgit v1.2.3