0
votes

Greetings !!!

I am using SonarQube: Version 7.4 & have added below plugins SonarQube new QualityGate:

  1. LineCoverage on new code
  2. Condition Coverage on new code
  3. Coverage on new code
  4. New Code Period

To implement: New Code Period (Number of days)

My requirement: To add a new code period SonarQube plugin for the existing project (project-1)

What I did:

  1. I create a new Sonar Quality Gate for a project
  2. Removed existing Sonar report for the project-1
  3. Added “New Code Period - Number of days (2020-10-20)” plugin from SonarQube specific to project-1

Problem statement:

1st: After executing SonarQube CI, I am not able to see any new issue appear (wrt New Code Period) in the dashboard (since the day I mentioned - 2020-10-20)

Is it due to Sonar Project is newly created (without any history) which would fail to fetch the issue from the past days?

2nd: If I rerun the SonarQube CI without any code update in Project-1, Line Coverage on new code/Condition Coverage on new code appear as 0%

Is this due to No NEW code added from the last build?

I would like to know what could be the issue. Any help, pointers, suggestions would be grateful.

Thanks in Advance.

1

1 Answers

0
votes

For 0% Coverage, below is the fix with the below updates

In all Coverage, I have UnChecked the ‘On New Code’ and only use ‘Coverage on New Code’ to track the new code quality. It worked as expected.

Snapshot: Prior 0% Coverage enter image description here

Update (After uncheck new Code):

enter image description here

And also New Code Period changes are reflecting. enter image description here

Thanks, everyone :)