kotlinx-kover
kotlinx-kover copied to clipboard
Kover Not Excluding Function Parameters with Annotation Tag
Describe the bug I created a very basic annotation class that mostly works. It does exclude most of the function I want to exclude.
But it doesn't exclude the parameters of the function.
I even tried using it directly on the parameter and it still fails to exclude the parameter.
@Retention(AnnotationRetention.RUNTIME)
@Target(
AnnotationTarget.CLASS,
AnnotationTarget.CONSTRUCTOR,
AnnotationTarget.FIELD,
AnnotationTarget.FUNCTION,
AnnotationTarget.LOCAL_VARIABLE,
AnnotationTarget.PROPERTY,
AnnotationTarget.TYPE,
AnnotationTarget.TYPE_PARAMETER,
AnnotationTarget.VALUE_PARAMETER,
)
annotation class KoverExcludeGenerated
And in my build.gradle, I have
koverReport {
androidReports('debug') {
filters {
excludes {
annotatedBy(
'*KoverExcludeGenerated'
)
}
}
}
}
Expected behavior I expect parameters to be excluded when a function is excluded.
Reproducer A link to your project, if it is open source. Otherwise, please try to reproduce the problem on a small project. If this is not feasible, give an example of the code on which the problem manifests itself.
Reports
Environment
- Kover Gradle Plugin version: 0.7.6
- Gradle version: 8.5
- Kotlin project type: Kotlin/Android Library
- Coverage Toolset (if customized in build script): Kover
Any updates on that bug? I use kover version 0.8.2 and have the same problem of being unable to exclude interface with default params
@BulatInDrive, sorry, no updates yet