From af13c350d2499aaa42f77ad8cfc070e97df06dd2 Mon Sep 17 00:00:00 2001 From: James Cherti <60946298+jamescherti@users.noreply.github.com> Date: Mon, 5 Jul 2021 12:48:32 +0000 Subject: Add stdin ("-") to the command-line arguments of ansible-lint >=5.0.0 (#3786) * Added an explicit stdin argument to ansible-lint >=5.0.0 (ansible_lint.vim). This commit fixes the issue "<>": ``` :ALEInfo (finished - exit code 0) ['/bin/bash', '-c', ''ansible-lint'' --parseable-severity -x yaml < ''/tmp/vVyvn4B/7/test2.yml''] <<>>' ``` Reason: Ansible-lint ignores stdin when "-" or "/dev/stdin" is not specified explicitly. Tested with: ansible-lint 5.0.12 using ansible 2.11.2 * Update ansible-lint tests. --- ale_linters/ansible/ansible_lint.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ale_linters') diff --git a/ale_linters/ansible/ansible_lint.vim b/ale_linters/ansible/ansible_lint.vim index f83de01a..d901abfd 100644 --- a/ale_linters/ansible/ansible_lint.vim +++ b/ale_linters/ansible/ansible_lint.vim @@ -73,7 +73,7 @@ endfunction function! ale_linters#ansible#ansible_lint#GetCommand(buffer, version) abort let l:commands = { - \ '>=5.0.0': '%e --parseable-severity -x yaml', + \ '>=5.0.0': '%e --parseable-severity -x yaml -', \ '<5.0.0': '%e -p %t' \} let l:command = ale#semver#GTE(a:version, [5, 0]) ? l:commands['>=5.0.0'] : l:commands['<5.0.0'] -- cgit v1.2.3