ALE linting with ansible-lint for filetype=yaml.ansible #5061
Replies: 1 comment
-
Did you get it working yet? There's one linter in the enabled list:
However the configuration suggests an attempt to use also a couple of ones:
In other words, adding those to
Examination output of tool looks reasonable enough to me. It might be interesting to note the version number to be 25, or rather 25.8.1, though. As well as the ansible version 2.18.9 appearing before the full tool version.
If looking at the source code, we learn that ale knows about <5.0.0, ≥5.0.0 and ≥6.0.0. The will be launched in different ways depending on version. Comparing the output below with the sources gives me the impression the version is understood as being <5.0.0, likely due to failure to parse the version string at all.
In other words, this is not about your comprehension, it seems you've actually stumbled upon a bug. I would not be surprised if it picks up the version of ansible rather than the version of ansible-lint. I have however not attempted to verify that.
Do you think you could open an issue for this problem? Alternatively a pull-request if you could find a fix. The latter would of course be better. A first step towards a solution could possibly be to call
I used to have the ansible-language-server configured and working, but thank god I no longer need to have anything to do with ansible. It's a buggy bloody footgun, causing more problems than its solving imo. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am currently struggling with implementing the ALE plugin for VIM 9.1. Generally, I would like the ansible-linting suggestions to show up in my codebase as diagnostics. So far the yaml-lint is working with ALE, i.e. findings are shown in the gutter. This does not count for ansible-lint unfortunately. My :ALEInfo
As you see, ALE is detecting ansible-lint but for some reason it is not being incorporated in the vimgutter or diagnostics window.
ansible-lint --version
ansible-lint 25 using ansible-core:2.18.9 ansible-compat:25.8.1 ruamel-yaml:0.18.15 ruamel-yaml-clib:0.2.12
Does anybody has ansible-lint working with ALE and vim. For context: I use the pearofducks/ansible-vim plugin for correct filetype setting and syntax highlighting.
Beta Was this translation helpful? Give feedback.
All reactions