-
Notifications
You must be signed in to change notification settings - Fork 52
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
Wrong code coverage percentage when we have Preview function in our class #736
Comments
Hi, please provide the list of classes above |
without It means that kover ignores my function based on my configuration. But why it is counting that in class function count? (the result is 50%) |
I'm see this too. I have annotatedBy("androidx.compose.desktop.ui.tooling.preview.Preview") in the config, sometimes they are correctly ignored, sometimes partially ignore, sometimes not ignored at all. In some cases, I'd have excellent coverage if it weren't for this. |
@johngray1965 exactly, it says that the class is 100% covered. But 50% of the methods. It means it considers Preview function. |
There seems to be some pattern of when it's working and when its not, but I haven't been able to see it just yet. |
Describe the bug
I can not exclue my functions which were annotated by @Preview (androidx.compose.desktop.ui.tooling.preview.Preview) in my KMP project.
@Preview
@composable
@KoverIgnore
private fun Preview() {
AppTheme {
.........
kover {
reports {
verify {
rule {
minBound(80) //80% minimum coverage
}
}
filters {
excludes {
// Entire Points
classes("MainKt") // Desktop
classes("*.MainActivity") // Android
}
Environment
The text was updated successfully, but these errors were encountered: