summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoracio Sanson <hsanson@gmail.com>2021-07-20 10:00:49 +0900
committerGitHub <noreply@github.com>2021-07-20 10:00:49 +0900
commita6719c2d4fa0d4f5f2cdbaf8ece8de6c4faf1295 (patch)
tree5d741a53dbc8e173b51ac0b7e06b0bf370e76e1b
parentf83a1f70d542ac885b72d1161140d6d999e2d7b2 (diff)
downloadale-a6719c2d4fa0d4f5f2cdbaf8ece8de6c4faf1295.zip
Fix 3673 - Add nocolor option to ansible-lint (#3811)
Co-authored-by: Horacio Sanson <horacio@allm.inc>
-rw-r--r--ale_linters/ansible/ansible_lint.vim4
-rw-r--r--test/linter/test_ansible_lint.vader6
2 files changed, 5 insertions, 5 deletions
diff --git a/ale_linters/ansible/ansible_lint.vim b/ale_linters/ansible/ansible_lint.vim
index d901abfd..e1b123ab 100644
--- a/ale_linters/ansible/ansible_lint.vim
+++ b/ale_linters/ansible/ansible_lint.vim
@@ -73,8 +73,8 @@ 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 -p %t'
+ \ '>=5.0.0': '%e --nocolor --parseable-severity -x yaml -',
+ \ '<5.0.0': '%e --nocolor -p %t'
\}
let l:command = ale#semver#GTE(a:version, [5, 0]) ? l:commands['>=5.0.0'] : l:commands['<5.0.0']
diff --git a/test/linter/test_ansible_lint.vader b/test/linter/test_ansible_lint.vader
index 80c219b1..a35d8604 100644
--- a/test/linter/test_ansible_lint.vader
+++ b/test/linter/test_ansible_lint.vader
@@ -9,14 +9,14 @@ After:
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'
+ AssertLinter 'ansible-lint', ale#Escape('ansible-lint') . ' --nocolor -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 -'
+ AssertLinter 'ansible-lint', ale#Escape('ansible-lint') . ' --nocolor --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'
+ \ ale#Escape('~/.local/bin/ansible-lint') . ' --nocolor -p %t'