mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-09 22:14:44 +08:00
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
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user