SonarQube New code coverage analysis issue

Hi Team,

We are using SonarQube community 9.4 and Enterprise edition 8.9.

For New code in sonarqube dashboard, I am able to see three options1. Previous version, 2. Number of days 3. Specific Analysis.

I have two git tags in my repository… I want see the new code between the two tags.
Is it possible to configure to get the new code coverage between the tags. If Yes, how to configure?

Quick response is appreciated.

Ediga Naresh Goud

Hey there.

Sure, you can scan the old tag and then the new tag (the first scan will be considered the baseline, and the next scan what is “new”).

Thanks for response Colin…

I need to understand, how the SonarQube will detect or identifies the git tags from SonarQube. In versioning we gave versions in pom.xml, the SonarQube will detects the versions.

Is there any settings in SonarQube or any API call for this (detects the git tags automatically from GitHub).

And also in between the two tags, if there are multiple builds done …does SonarQube calculates coverage for all buiilds in between the two tags.


SonarQube isn’t aware of git tags. Although if you can derive the git tag from your environment (through an environment variable or parsing output from git) you could pass that to sonar.projectVersion.

Nope. Just the two builds that you performed.