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

Add write_exclude_list config option #4256

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

frq-asgard-josi
Copy link

As proposed here (#4236), we would like to exclude specific rules from the write_list via config file, without automatically applying auto-fixes each time ansible-lint is executed.

This PR provides a possible solution for this (while being fully backwards compatible) by introducing a new config key.

@frq-asgard-josi frq-asgard-josi requested a review from a team as a code owner July 11, 2024 12:25
@frq-asgard-josi frq-asgard-josi requested review from Qalthos and priyamsahoo and removed request for a team July 11, 2024 12:25
@frq-asgard-josi
Copy link
Author

It might be helpful if someone with the required permissions would add the 'enhancement' label so the test have a chance to run. As far as i can see, I can't do that myself.

@frq-asgard-josi frq-asgard-josi changed the title feat(config): add write_exclude_list config option Add write_exclude_list config option Jul 18, 2024
Copy link

sonarcloud bot commented Jul 24, 2024

Copy link
Contributor

@Qalthos Qalthos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@frq-asgard-josi
Copy link
Author

Tests using the exclude list, including one that covers https://github.com/ansible/ansible-lint/pull/4256/files#diff-bbe37334f229af898f52a3ec76e32c5e43c8f2fec8640764775370e6202aa360R154 will be needed.

As this isn't a priority for us at the moment, it will probably take a while until I get to this but it is still on my ToDo list.

@frq-asgard-josi
Copy link
Author

I added some basic tests for the new config option. For some reason there is a license test failing for some of the older python versions but I don't really know why.

@frq-asgard-josi frq-asgard-josi marked this pull request as ready for review October 31, 2024 11:59
@ssbarnea
Copy link
Member

ssbarnea commented Nov 2, 2024

@frq-asgard-josi rebase your change, it should address the current failures. Apparently you do not allow us to update the branch ourselves. (see bottom of the right column for that permission on PR page)

@frq-asgard-josi
Copy link
Author

@frq-asgard-josi rebase your change, it should address the current failures. Apparently you do not allow us to update the branch ourselves. (see bottom of the right column for that permission on PR page)

I couldn't find the option to give you permission for that. This might be because the repository isn't owned by me but my organization? Anyway, I rebased my changes to include recent changes to main and fixed remaining errors so this should be ready for review :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

4 participants