Kotlin / kotlinx-kover

Apache License 2.0
1.28k stars 48 forks source link

Set XML report name to be the module name #527

Closed MGaetan89 closed 4 months ago

MGaetan89 commented 4 months ago

What is your use-case and why do you need this feature?

Currently, the XML coverage report generated by Kover, when using the default engine, has its name set to Intellij Coverage Report, ie:

<report name="Intellij Coverage Report">

When using JaCoCo, the name is set to the module's name (for example :app).

Would it be possible to have the same behaviour for both engines? The report name may be used by other tools, for example https://github.com/marketplace/actions/jacoco-report. Having a unique/identifiable name for each report may then be useful.

Describe the solution you'd like

It would be great if Kover's default engine could use the module's name for the report name, instead of Intellij Coverage Report.

shanshin commented 4 months ago

Thanks for the idea!

zuevmaxim commented 4 months ago

@shanshin I'll need to extend com.intellij.rt.coverage.report.api.ReportApi#xmlReport with title parameter

MGaetan89 commented 4 months ago

I see that you already included the new title parameter @zuevmaxim, thank you 🙂

@shanshin once the changes mentioned above in intellij-coverage are released, are you open for external contributor to add the title parameter in Kover?

shanshin commented 4 months ago

@MGaetan89, of course, with pleasure!

Early next week, we plan to release a minor release with a few minor fixes.

shanshin commented 4 months ago

Implemented in 0.7.6

MGaetan89 commented 4 months ago

Thanks for the quick release @shanshin! I just updated to Kover 0.7.6, and it appears to be working fine 👍🏻