We have a paid Sonarcloud.io subscription and a private project and Sonarcloud integrates against a private Bitbucket GIT repository and is triggered via the Bitbucket-pipelines integration. Its Java code and we use Jacoco to run the unit-tests and produce the coverage metrics (XML report file)
Im aware of New Code results differ between main and feature branches and we have a similar issue for Sonarcloud.
Feature-branches and develop-branches that had “green coverage” showed after merging to master a drop of ~ 20% in coverage making them red.
One example (with blurred private details) below. This is considered on a release-branch as good:
and same package as seen by Sonarcloud after release-branch got merged to master:
all the Java classes that show up here newly are not touched in the last 30 days, also clicking on them doesnt show any (wrongly) highlighted code that was touched the last 30 days.
I can share more details in a private discussion, since its non-public source code.
Thanks a lot