-
Couldn't load subscription status.
- Fork 54
Aligned filtering for JaCoCo reports with Kover reporting #770
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
base: main
Are you sure you want to change the base?
Conversation
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`
cfcd07a to
616314f
Compare
kover-gradle-plugin/src/main/kotlin/kotlinx/kover/gradle/plugin/dsl/KoverVersions.kt
Outdated
Show resolved
Hide resolved
kover-gradle-plugin/src/main/kotlin/kotlinx/kover/gradle/plugin/tools/jacoco/Commons.kt
Show resolved
Hide resolved
kover-gradle-plugin/src/main/kotlin/kotlinx/kover/gradle/plugin/tools/jacoco/Commons.kt
Outdated
Show resolved
Hide resolved
| && filters.excludesAnnotations.isEmpty() | ||
| && filters.excludeInheritedFrom.isEmpty() | ||
| && filters.includesClasses.isEmpty() | ||
| && filters.includesAnnotations.isEmpty() | ||
| && filters.includeInheritedFrom.isEmpty() |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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