0

I can set the branch name and sonarqube project ID when I use the Sonar Scanner, which is used to publish my scanner result up to the server. How to I also set the New Code to a specific reference branch name? This link tells me know to configure it on the SonarQube web front, https://docs.sonarqube.org/latest/project-administration/new-code-period/ . But, I want to set it at the scanner. Similar to sonar.pullrequest.base, but, for a regular branch.

Is it possible? I know there are different scanners out there, so, if you know any scanner can do it, that would be great.

Thanks

BoBoDev
  • 847
  • 1
  • 8
  • 17

1 Answers1

0

sonar.branch.target is no more supported in SonarQube LTS version 8.9

This property earlier used via branch Sonar.properties file to get the delta for SonarQube report. Since this is removed from 8.9 version you will not get correct NEW code delta report.

Below new property released in SonarQube v9.4 and need to be replaced for sonar.branch.target to get the exact delta report for new code.

sonar.newCode.referenceBranch =dev1

https://www.sonarsource.com/products/sonarqube/downloads/lts/ new 9.9 SonarQube LTS version is available here

Harshal Patil
  • 349
  • 1
  • 7
  • 26