From b8359c1114229737563bde4e2478ca2309ce6e7a Mon Sep 17 00:00:00 2001 From: ix5 Date: Thu, 18 Oct 2018 10:19:27 +0200 Subject: Allow custom executable for ansible linters (#1977) * Allow custom executable for ansible linters * Add ansible-lint tests * ansible-lint: simplify linter command * Rename linter "ansible" to "ansible_lint" * Add ansible-lint options to documentation * Add alias ansible-lint for ansible_lint --- .../test_ansible_lint_command_callback.vader | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/command_callback/test_ansible_lint_command_callback.vader (limited to 'test') diff --git a/test/command_callback/test_ansible_lint_command_callback.vader b/test/command_callback/test_ansible_lint_command_callback.vader new file mode 100644 index 00000000..ddc6c6c8 --- /dev/null +++ b/test/command_callback/test_ansible_lint_command_callback.vader @@ -0,0 +1,17 @@ +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() + +Execute(The ansible_lint command callback should return default string): + AssertLinter 'ansible-lint', ale#Escape('ansible-lint') . ' -p %t' + +Execute(The ansible_lint executable should be configurable): + let g:ale_ansible_ansible_lint_executable = '~/.local/bin/ansible-lint' + + AssertLinter '~/.local/bin/ansible-lint', + \ ale#Escape('~/.local/bin/ansible-lint') . ' -p %t' -- cgit v1.2.3