but inside the file you have a different package declared, for example
package org.jetbrains.kover.reproducer.some.inner.pckg // some.inner.pckg has been added
class PackageMismatchClass {}
codecov.io will not see (and thus not calculate coverage for) this file. You can observe it in this report.
If you physically move the file to the "correct" package, it will work as expected.
The problem might be relevant for other tools that use Jacoco format since this behaviour is not possible in Java (package must match location), and tools that analyze Jacoco coverage reports might rely on that.
I haven't noticed any difference in generated XML reports between Jacoco and IntelliJ engines, both generate the following paths:
If you have a Kotlin file with some classes/functions under a certain package, for example
but inside the file you have a different package declared, for example
codecov.io will not see (and thus not calculate coverage for) this file. You can observe it in this report.
If you physically move the file to the "correct" package, it will work as expected.
The problem might be relevant for other tools that use Jacoco format since this behaviour is not possible in Java (package must match location), and tools that analyze Jacoco coverage reports might rely on that.
I haven't noticed any difference in generated XML reports between Jacoco and IntelliJ engines, both generate the following paths:
Runnable reproducer can be found in this repo, there are instructions on how to run it and upload the report.
This was found while investigating https://github.com/Kotlin/kotlinx-kover/issues/16