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 does not respect yamllint error level #4355

Open
Hipska opened this issue Oct 4, 2024 · 2 comments
Open

ansible-lint does not respect yamllint error level #4355

Hipska opened this issue Oct 4, 2024 · 2 comments

Comments

@Hipska
Copy link

Hipska commented Oct 4, 2024

Summary

Rules for yamllint set to warning aren't automatically warnings in ansible-lint as well. It only does that when the rule is also added to warn_list, which is duplicating configs.

Issue Type
  • Bug Report
OS / ENVIRONMENT
ansible-lint --version
ansible-lint 24.9.2 using ansible-core:2.17.4 ansible-compat:24.9.1 ruamel-yaml:0.18.6 ruamel-yaml-clib:0.2.8
  • ansible installation method: OS package
  • ansible-lint installation method: OS package
STEPS TO REPRODUCE

.yamllint

---

rules:
  line-length:
    level: warning
    allow-non-breakable-inline-mappings: true
Desired Behavior
yaml[line-length]: Line too long (413 > 80 characters) (warning)
initiate.yml:25

yaml[line-length]: Line too long (413 > 80 characters) (warning)
initiate.yml:29
Actual Behavior
yaml[line-length]: Line too long (413 > 80 characters)
initiate.yml:25

yaml[line-length]: Line too long (413 > 80 characters)
initiate.yml:29
@Hipska Hipska added bug new Triage required labels Oct 4, 2024
@Qalthos Qalthos removed the new Triage required label Oct 16, 2024
@Qalthos
Copy link
Contributor

Qalthos commented Oct 16, 2024

This seems like an ask for reasonable behavior. We do look at .yamllint, so we could use that to inform the level of yaml rules, though I'm not sure how complicated that would be.

@Hipska
Copy link
Author

Hipska commented Jan 27, 2025

Even disable yaml rules does not seem to be respected..

---

rules:
  truthy: disable

Results:

yaml[truthy]: Truthy value should be one of [false, true]
handlers/main.yml:5

@ssbarnea ssbarnea added enhancement and removed bug labels Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

3 participants