Improve jacoco parsing and improve kotlin support #1280
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1279
The jacoco parser made some relatively safe assumptions about the jacoco report, except when jacoco is used to instrument kotlin. Kotlin doesn't have the same restrictions as java when it comes to top level classes, so the report parsing will just immediately error out.
This improves the parser by making it sourcefilename centric instead of class centric (falling back on the pattern of top level class + .java == sourcefilename if the sourcefilename is missing).
In addition, when aggregated across multiple projects, the report commonly doesn't have the full relative paths, so we need to be able to find both java and kotlin files. There is also an assumption that a fully qualified class can only exist in one location and it would panic; however, this isn't entirely uncommon, so don't panic, but instead, inform the user that its not fully supported.