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

Exclude pattern matching update doesn't work after a first run #65

Closed
NinoDLC opened this issue Nov 18, 2021 · 4 comments
Closed

Exclude pattern matching update doesn't work after a first run #65

NinoDLC opened this issue Nov 18, 2021 · 4 comments
Labels
S: waiting for clarification Status: additional information required to proceed

Comments

@NinoDLC
Copy link
Contributor

NinoDLC commented Nov 18, 2021

Happens on a basic android project.

Top level build.gradle file :

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        ...
        classpath("org.jetbrains.kotlinx:kover:0.4.2")
    }
}

apply plugin: 'kover'

Module level build.gradle file :

...
android {
    ...
    testOptions {
        unitTests.all {
            if (name == "testDebugUnitTest" || name == "testReleaseUnitTest") {
                kover {
                    //excludes = [".*_.*"]
                }
            }
        }
    }
}

Reproduction :
run ./gradlew koverHtmlReport
uncomment the excludes line
run again ./gradlew koverHtmlReport

Result :
image

Expected :
image

Branch with the full code :
https://github.com/NinoDLC/Kotlin_Flow_To_The_View/tree/kover_integration

Comments :
It seems a change to the gradle file on the "exclude" line won't "update" the tasks correctly (the "sync" on Android Studio is way too fast for exemple)

@NinoDLC NinoDLC changed the title Exclude pattern matching doesn't work after a first run Exclude pattern matching update doesn't work after a first run Nov 18, 2021
@shanshin
Copy link
Collaborator

Hi,
at the moment, filtering is not implemented when generating reports (#17).
The exclusions that you changed affect the test run, so in order for them to have an effect on report, you need to regenerate the binary report file.
To do this, try clearing the build directory, e.g. ./gradlew clean koverHtmlReport.

@shanshin
Copy link
Collaborator

Duplicate #17

@shanshin
Copy link
Collaborator

shanshin commented Nov 29, 2021

@NinoDLC, please, check in version 0.4.4

@shanshin shanshin added the S: waiting for clarification Status: additional information required to proceed label Nov 29, 2021
@shanshin
Copy link
Collaborator

Feel free to reopen if the problem is not gone on 0.5.0+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S: waiting for clarification Status: additional information required to proceed
Projects
None yet
Development

No branches or pull requests

2 participants