summaryrefslogtreecommitdiff
path: root/ale_linters/ansible
diff options
context:
space:
mode:
authorJames Cherti <60946298+jamescherti@users.noreply.github.com>2021-07-05 12:48:32 +0000
committerGitHub <noreply@github.com>2021-07-05 21:48:32 +0900
commitaf13c350d2499aaa42f77ad8cfc070e97df06dd2 (patch)
tree4bf0b86cdb93430a9c36da3429df66578959dd07 /ale_linters/ansible
parent87e079a9b25ebf5818b8451874ce2a8bd614226f (diff)
downloadale-af13c350d2499aaa42f77ad8cfc070e97df06dd2.zip
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 "<<NO OUTPUT RETURNED>>": ``` :ALEInfo (finished - exit code 0) ['/bin/bash', '-c', ''ansible-lint'' --parseable-severity -x yaml < ''/tmp/vVyvn4B/7/test2.yml''] <<<NO OUTPUT RETURNED>>>' ``` 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.
Diffstat (limited to 'ale_linters/ansible')
-rw-r--r--ale_linters/ansible/ansible_lint.vim2
1 files changed, 1 insertions, 1 deletions
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']