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

Add Kotlinx-Kover support (500USD Bounty) #3610

Closed
lihaoyi opened this issue Sep 26, 2024 · 0 comments
Closed

Add Kotlinx-Kover support (500USD Bounty) #3610

lihaoyi opened this issue Sep 26, 2024 · 0 comments
Labels
Milestone

Comments

@lihaoyi
Copy link
Member

lihaoyi commented Sep 26, 2024


From the maintainer Li Haoyi: I'm putting a 500USD bounty on this issue, payable by bank transfer on a merged PR implementing this.


The goal of this ticket is to add example/kotlinlib/linting/3-kotlinx-kover example tests for using https://github.com/Kotlin/kotlinx-kover to instrument a KotlinModule's tests with code coverage tracking, in the spirit of example/scalalib/linting/2-contrib-scoverage or https://github.com/lefou/mill-jacoco.

It should implement a trait KotlinxKoverModule in kotlinlib/ that can be mixed in to any KotlinModule and provide KotlinxKoverTests that enable code coverage support, unit tests, and an example test folder that can be included in the documentation demonstrating its usage

@lihaoyi lihaoyi added the bounty label Sep 26, 2024
@lihaoyi lihaoyi changed the title Add Kotlinx-Kover example (500USD Bounty) Add Kotlinx-Kover support (500USD Bounty) Sep 26, 2024
lihaoyi pushed a commit that referenced this issue Sep 30, 2024
This PR adds Kover support declared in #3610.

Overall functionality is similar to what `ScoverageModule` and
https://github.com/lefou/mill-jacoco are doing:

* Each test run gets instrumented by Kover and binary report is
generated (this requires mixing in `KoverTests` trait)
* There is a possibility to generate HTML/XML report out of it using
`__.kover.htmlReport` / `__.kover.xmlReport` respectively on each module
having `KoverModule` mixed in.
* Also there is a possibility to declare module implementing
`KoverReportModule` trait and use `htmlReportAll` / `xmlReportAll` tasks
to collect coverage for all modules in the project.

Kover Agent documentation:
https://kotlin.github.io/kotlinx-kover/jvm-agent
Kover Reporter documentation:
https://kotlin.github.io/kotlinx-kover/cli/

---------

Co-authored-by: 0xnm <0xnm@users.noreply.github.com>
@lihaoyi lihaoyi closed this as completed Sep 30, 2024
@lefou lefou added this to the 0.12.0-RC3 milestone Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants