How does SonarQube calculate estimated code coverage after merge?

SonarQube: 8.3, Scanner: 4.0.0.1744

We currently use SonarQube to track release code coverage. We use separate branches for each release. Since we want to track code coverage trends across releases, we currently do analysis on the release branch, but we specify branch as master and tag it with a release version when we upload code coverage data.

Now we are working on using SonarQube for GitHub PR analysis.

  • How does SQ calculate estimated code coverage after merge?
  • Documentation only refers to analysis of the feature branch. Do we need to set up a regular analysis of the master branch for SQ to be able to calculate coverage after merge to master?
  • Does our current implementation of release code coverage affect PR analysis?

Hey there.

It looks like you’ve also raised this issue through commercial support! Let’s not duplicate effort – but feel free to come back to this thread after you’ve worked with support to help out the community at large!

Sure, I didn’t mean to duplicate. I created the support ticket when I noticed that there wasn’t a response here. Once the support ticket is resolved I can update the solution here or I can delete the thread here.