-
Notifications
You must be signed in to change notification settings - Fork 664
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 incompatible with some yamllint settings #4118
Labels
Comments
Your issue is in fact correct: |
@Qalthos thanks for the confirmation. If this is the expected behaviour, then refusing to run |
ssbarnea
added a commit
that referenced
this issue
May 7, 2024
ssbarnea
added a commit
that referenced
this issue
May 7, 2024
ssbarnea
added a commit
that referenced
this issue
May 7, 2024
ssbarnea
added a commit
that referenced
this issue
May 7, 2024
github-project-automation
bot
moved this from Roadmap
to Done
in 🧰 devtools project board
May 7, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
When running
ansible-lint
with--fix
andwrite_list
set toall
, it will remove quotes from strings where possible.From what I understand,
ansible-lint
does runyamllint
if it is present on the system.yamllint
has a setting for string quotes, e.g.quoted-strings: 'enable'
: this requires all strings to be quoted.This leads to the situation where, when I run
ansible-lint
twice:Issue Type
OS / ENVIRONMENT
ansible-lint 24.2.0 using ansible-core:2.16.4 ansible-compat:4.1.11 ruamel-yaml:0.18.5 ruamel-yaml-clib:0.2.7
STEPS TO REPRODUCE
Here is a minimal repo to demonstrate the issue: https://github.com/pb82/ansible-lint-issue.git
Desired Behavior
A few options:
ansible-lint
to leave quotes aloneansible-lint
respecting thequoted-strings
rule in.yamllint
Actual Behavior
As described above, will lint will fail the second time running.
The text was updated successfully, but these errors were encountered: