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

Implement class filtering using regular expressions #137

Merged
merged 13 commits into from
Nov 25, 2024

Conversation

sohyun-ku
Copy link
Contributor

related to #99

An optional feature is provided to filter classes using regular expressions.
Filtering is based on the result of packages, excluding excludedPackages, and adding additionalPackages.

@sohyun-ku sohyun-ku self-assigned this Nov 19, 2024
@sohyun-ku sohyun-ku requested review from junoyoon and a team as code owners November 19, 2024 08:45
Copy link

github-actions bot commented Nov 19, 2024

Scavenger Test Results

163 files  163 suites   1m 33s ⏱️
274 tests 262 ✅ 12 💤 0 ❌
292 runs  280 ✅ 12 💤 0 ❌

Results for commit 972d905.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@taeyeon-Kim taeyeon-Kim left a comment

Choose a reason for hiding this comment

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

I think it's worth considering getting the packages setting as a regular expression.
What do you think of this suggestion?

@sohyun-ku
Copy link
Contributor Author

@taeyeon-Kim

I agree with your suggestion.
What I was considering is we already have additionalPackages, excludePackages option.
so it seems necessary to prioritize them.

@taeyeon-Kim
Copy link
Contributor

taeyeon-Kim commented Nov 19, 2024

@sohyun-ku Okay good, that's about the same level of setup as you said.
But how about include~ rather than exclude~?? I think the negation has a downside that makes me think twice about it.

@sohyun-ku
Copy link
Contributor Author

sohyun-ku commented Nov 20, 2024

@taeyeon-Kim @kojandy

That's a good opinion, It's confusing to deal with only one case.
So I added it for both cases, and to make it more flexible, I modified it to a class path including the package.

Copy link
Contributor

@taeyeon-Kim taeyeon-Kim left a comment

Choose a reason for hiding this comment

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

👍 👍

Comment on lines +165 to +166
&& (isIncludedByAnnotation(clazz) || isAdditionalPackage(clazz) || isAdditionalByRegex(clazz))
&& !isExcludedByRegex(clazz);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Regular expressions are relatively computationally expensive, so they were placed later in the conditional statements to reduce unnecessary computations.

@sohyun-ku sohyun-ku merged commit a932542 into develop Nov 25, 2024
6 checks passed
@sohyun-ku sohyun-ku deleted the feature/implement-class-name-filtering branch November 25, 2024 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants