Skip to content

Conversation

@shanshin
Copy link
Collaborator

Added support of filtering by annotations and ancestors to the wrapper of the JaCoCo reporter.

Upgraded the minimal and default JaCoCo version to 0.8.13

@shanshin shanshin requested a review from fzhinkin October 17, 2025 18:09
Added support of filtering by annotations and ancestors to the wrapper of the JaCoCo reporter.

Upgraded the minimal and default JaCoCo version to `0.8.13`
Comment on lines 24 to 28
&& filters.excludesAnnotations.isEmpty()
&& filters.excludeInheritedFrom.isEmpty()
&& filters.includesClasses.isEmpty()
&& filters.includesAnnotations.isEmpty()
&& filters.includeInheritedFrom.isEmpty()
Copy link
Contributor

Choose a reason for hiding this comment

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

If all of them empty, toRegex may return null and then we'll exit a function in that case. WDYT?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't see much difference in the approach, toRegex is called only in one place.

Copy link
Contributor

Choose a reason for hiding this comment

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

The logic behind my proposal: we're checking only those filters here that are quirked to construct regex-filter. If a set of such filters will change in the future, we may forget to update it both here and in RegexFilter, but if the check will be co-located with RegexFilter construction, then it'll be harder to forget about the update.

But I don't have a strong opinion on that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I prefer not to use null as magic value, I added the isEmpty property.

@shanshin shanshin requested a review from fzhinkin October 24, 2025 22:39
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.

2 participants