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

chore: Simplify use of the doublestar Match for ignore paths #5272

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

lukemassa
Copy link
Contributor

what

Simplify use of the doublestar Match for ignore paths by using MatchUnvalidated.

why

We already explicitly validate all patterns when parsing the config, there's no reason to run Match(), which does additional validation and optionally returns an error.

I didn't quite understand how this package worked until a conversation with the maintainer (bmatcuk/doublestar#85), and now I think this is the correct approach.

tests

Running unit tests.

references

@lukemassa lukemassa requested review from a team as code owners January 24, 2025 19:50
@lukemassa lukemassa requested review from GenPage, nitrocode and X-Guardian and removed request for a team January 24, 2025 19:50
@dosubot dosubot bot added the refactoring Code refactoring that doesn't add additional functionality label Jan 24, 2025
@github-actions github-actions bot added the go Pull requests that update Go code label Jan 24, 2025
Copy link
Contributor

@jamengual jamengual left a comment

Choose a reason for hiding this comment

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

nice find!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 24, 2025
@lukemassa lukemassa merged commit cbd70c9 into runatlantis:main Jan 24, 2025
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code lgtm This PR has been approved by a maintainer refactoring Code refactoring that doesn't add additional functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants