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

Load rule ignores from external text file #3004

Merged
merged 1 commit into from Feb 11, 2023
Merged

Load rule ignores from external text file #3004

merged 1 commit into from Feb 11, 2023

Conversation

ssbarnea
Copy link
Member

@ssbarnea ssbarnea commented Feb 9, 2023

Ansible-lint will load skip rules from .ansible-lint-ignore file that is adjacent to its config file. The file format is very simple, containing the filename and the rule to be ignored. It also supports comments starting with #.

  • Adds ability to load ignores from file
  • Implements --generate-ignore for dumping ignores for current violations
  • Adds documentation about ignores
  • Change summary message to point to documentation for ignores
  • This feature also deprecates progressive mode due to its performance and testing problems, like testing of pull-requests with multiple commits.

Fixes: #1584
Fixes: #3012
Closes: #2934
Related: #2880

@ssbarnea ssbarnea requested review from a team as code owners February 9, 2023 17:43
@ssbarnea ssbarnea changed the title Allow igores from test/sanity/ignores.txt Allow ignores from test/sanity/ignores.txt Feb 9, 2023
@ssbarnea ssbarnea changed the title Allow ignores from test/sanity/ignores.txt Allow ignores from tests/sanity/ignores.txt Feb 9, 2023
@apatard

This comment was marked as outdated.

@mattclay

This comment was marked as resolved.

.ansible-lint Outdated Show resolved Hide resolved
docs/configuring.md Outdated Show resolved Hide resolved
@ssbarnea ssbarnea changed the title Allow ignores from tests/sanity/ignores.txt [DNM] Allow ignores from tests/sanity/ignores.txt Feb 9, 2023
@ssbarnea ssbarnea marked this pull request as draft February 9, 2023 18:41
@cidrblock
Copy link
Contributor

Related: #3012

@ssbarnea ssbarnea changed the title [DNM] Allow ignores from tests/sanity/ignores.txt [DNM] Load rule ignores from external text file Feb 10, 2023
@ssbarnea ssbarnea changed the title [DNM] Load rule ignores from external text file Load rule ignores from external text file Feb 10, 2023
@ssbarnea ssbarnea marked this pull request as ready for review February 10, 2023 16:57
.ansible-lint Outdated Show resolved Hide resolved
@mattclay mattclay dismissed their stale review February 10, 2023 17:35

Dismissing my review now that ansible-test references have been removed.

src/ansiblelint/loaders.py Show resolved Hide resolved
Copy link
Member

@mattclay mattclay left a comment

Choose a reason for hiding this comment

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

Now that ansible-test references have been removed, I'll leave the reviewing to the regular ansible-lint contributors.

@ssbarnea ssbarnea force-pushed the feat/ignore-txt branch 4 times, most recently from e77b613 to a3a7982 Compare February 11, 2023 16:36
@ssbarnea ssbarnea merged commit d55953d into main Feb 11, 2023
@ssbarnea ssbarnea deleted the feat/ignore-txt branch February 11, 2023 18:25
@ssbarnea ssbarnea self-assigned this Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
4 participants