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

Accept any directories under src in ResourceParser #868

Merged
merged 2 commits into from
Sep 23, 2024

Conversation

marcel-gepardec
Copy link
Contributor

@marcel-gepardec marcel-gepardec commented Sep 23, 2024

Added accepted directories to accept all recursive directories within "src".

What's changed?

Previously it only checked whether the path contains one of the DEFAULT_IGNORED_DIRECTORIES.
Now it checks whether the path also contains one of the DEFAULT_ACCEPTED_DIRECTORIES.
Now "src" will return false almost instantly and will not return true although there could be a build or out folder within the "src" folder.

What's your motivation?

Motivation was the open Issue #850. This is a fix to this issue and maybe a feature to be considered.

@timtebeek timtebeek added bug Something isn't working enhancement New feature or request labels Sep 23, 2024
@timtebeek timtebeek changed the title Add accepted directories Accept any directories under src in ResourceParser Sep 23, 2024
Copy link
Contributor

@timtebeek timtebeek left a comment

Choose a reason for hiding this comment

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

Nice and measured improvement here @marcel-gepardec , thanks!

@timtebeek timtebeek merged commit 97fafbb into openrewrite:main Sep 23, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Recipe org.openrewrite.text.FindAndReplace ignores files that have "build" or "out" directories in its path
2 participants