In one project in my company, a coverage issue in Sonarqube is faced. Following setup is done in the project:
- Mix of Kotlin and Java
- Jacoco gradle plugin for coverage
- Sonar gradle plugin (relying on Jacoco report to get the coverage)
The faced issue is about the sonar coverage on some kotlin classes. The Jacoco coverage is not reflected in SonarQube only for the kotlin classes (Java classes are properly covered).
It is quite tough to describe my issue because I’m not able to reproduce the issue on a simple project, meaning I’m not able to find the root cause. At the opposite, I’m able to reproduce the issue in the project of my company. Unfortunately, I can’t share the code directly because it is confidential.
After some investigation, I’ve not been able to find the root cause of my issue. Also, the following stackoverflow hint does not solve the problem:
I’m creating this topic to ask for some help. Does anyone has an idea of what could be the root cause of my issue?
By finding the root cause, I would be able to create a reproducer or to find a workarroung to share in a ticket here.
Thanks for your help.