New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No support for yamllint yet? #129
Comments
It looks like ansible-lint is supposed to call yamllint using the YamllintRule, but this doesn't seem to work for me, or at the very least it doesn't pick up my |
If you have yamllint installed, it will include problems reported by it too. The trick is that yamllint must be installed inside the same python venv as ansible-lint itself. Yamllint is not called directly by the extension, it is called by ansible-lint itself while it is looking at all the files from the repo. I can assure you that it works as I am using it daily. What can make this harder to debug is the fact that ansible-lint does silently ignores absence of yamllint. I am almost sure that is what you encounter. |
Well, I can't even make ansible-lint to incorporate yamllint when using Thank you for your quick reply though! I will close this issue for now. |
The issue was that we were still using ansible-lint 4.*, which doesn't include the YamllintRule. But after updating ansible-lint to 5.0.12, I just can't get this extension to work at all.
ansible-lint works nicely on the console, but the extension is completely non-functional and just doesn't show any error messages. When I downgrade ansible-lint to version 4, it immediately starts working again. I have absolute no idea how to debug this. It would be nice if this extension could print some errors if something is wrong instead of just failing silently. I am trying for over an hour now. |
The issue is that ansible-lint, when invoked by this extension, doesn't find my ansible installation. But this can only be seen when debugging this extension and opening the "debug console". For some reason, this error never finds its way into the It's a bummer that the extension doesn't inherit the PATH of the currently active environment. We aren't using Venv, but conda environments instead. If this extension can only be used by putting symlinks and stuff into the global PATH, there is no way I can make my coworkers use this extension. What a bummer. |
I have a suggestion: Maybe you could allow us to define a custom I got this to work by hacking may own env-parameter into the code in
(Again, please keep in mind, I don't know TypeScript or JavaScript at all.). So, the extension can find the ansible executable now. But now it can't parse a single line that ansible-lint outputs.
I guess the regex just doesn't match the actual output. |
It works now! The parse issue I've just described happened because I still had So, this just leaves the PATH issue. What do you think about my suggestion to make this configurable? If we could configure the PATH (as suggested, maybe as an addition to the default PATH, but please prepend the configured PATH to the global one) per-workspace, I think that would be a nice solution. Should I open another issue for this? @ssbarnea |
These findings are really useful as they should help us improve it. Configured output in settings should not affect the tool. Still, at this moment we do not even check the version of the linter, but we should, and have a popup msg when we detect a problem. |
The README states:
The VSCode extension description states:
But I cannot find any support for yamllint. In fact, when I search this repo for the word
yamllint
, the only matches are in text files.Is this feature yet to come?
Edit: I know this sounds like a "feature request", but I've posted this as a "bug" because the current project descriptions advertise a feature that may not be there. In this case, I think this is a "bug" in the descriptions.
The text was updated successfully, but these errors were encountered: