jacoco icon indicating copy to clipboard operation
jacoco copied to clipboard

Find source files also in shortened package directories

Open marchof opened this issue 6 years ago β€’ 6 comments

Fixes #939

The PR is missing a test case for Maven. Not sure whether this is possible with a Java project.

@Godin Do you think we can add a Kotlin project to the Maven IT tests? Or do you have another proposal how to test this?

marchof avatar Oct 04 '19 04:10 marchof

Do you think we can add a Kotlin project to the Maven IT tests? Or do you have another proposal how to test this?

@marchof let's deprecate jacoco-maven-plugin in favor of maven-antrun-plugin with already tested JaCoCo Ant Tasks πŸ˜†More seriously - here is example of Maven project for Kotlin that produces following report before this change

before

and following after

after

Godin avatar Oct 04 '19 16:10 Godin

Here is example of how people usually generate aggregated report using Gradle JaCoCo Plugin, it contains two modules with Kotlin source files, where packages are different (a and b), but names of files are the same (Example.kt) and directories denoting packages are completely omitted - example.zip In this case after generation of report by command gradle report, it (build/report/index.html) incorrectly shows the same source file for both packages.

Godin avatar Oct 10 '19 23:10 Godin

Changelog has been added but now it seems like there's a conflict with the master branch. I just stumbled over this when trying to integrade CodeClimate with Jacoco in a Kotlin project. Merging this would be highly appreciated! :+1:

milgner avatar Apr 10 '20 13:04 milgner

Any chance to get this revived, this is still a pita. 😊

Fleshgrinder avatar Aug 30 '21 15:08 Fleshgrinder

Die due the ambiguity that @Godin identified we will probably drop this.

marchof avatar Aug 31 '21 08:08 marchof

Which would bring us back to exposing a configuration property with which this could be enabled, as already discussed in the https://github.com/jacoco/jacoco/issues/939. Let's continue the discussion in the issue then. 😊

Fleshgrinder avatar Aug 31 '21 09:08 Fleshgrinder