Skip to content
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

ansible-lint --fix scope is harmful #4326

Open
andrewimeson opened this issue Sep 11, 2024 · 0 comments
Open

ansible-lint --fix scope is harmful #4326

andrewimeson opened this issue Sep 11, 2024 · 0 comments
Labels
bug new Triage required

Comments

@andrewimeson
Copy link
Contributor

andrewimeson commented Sep 11, 2024

Summary

The --fix feature dealing with formatting of YAML is scope creep beyond what I want a tool named ansible-lint to do. I don't want ansible-lint linting YAML form (I run yamllint separately so that I can lint non-Ansible files, and have clear separation of tools), but at least I can disable that and it gets out of the way.

I handle YAML auto-formatting with a separate tool (yamlfix or Prettier). I would expect ansible-lint --fix to only fix Ansible-specific issues, but it reformats the whole file. I don't even use the feature because it's incompatible with my YAML formatting and linting tools.

Since #4139 and #4158, I have to deal with a warning that I can't suppress because of a feature that has a scope beyond what it should.

Please consider whittling down the feature to remove YAML formatting concerns and instead recommend other tools for that purpose. At a minimum, the warning about incompatible yamllint settings should be suppressible.

Issue Type
  • Bug Report
@andrewimeson andrewimeson added bug new Triage required labels Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug new Triage required
Projects
Status: No status
Development

No branches or pull requests

1 participant