Must-share information (formatted with Markdown):
-
which versions are you using (SonarQube Server / Community Build, Scanner, Plugin, and any relevant extension) :
- Community Build v25.4.0.105899,
- SonarScanner CLI 7.1.0.4889
-
how is SonarQube deployed: zip
-
what are you trying to achieve:
- Trying to scan feature branch with sonar.newCode.referenceBranch=master, so that all changes in feature branch gets compared with master branch to be considered as ‘New Code’.
-
what have you tried so far to achieve this
- From SonarQube UI created local project with New Code = Reference Branch
- While running scans for feature branch -
- checked out feature branch (.git/refs/remotes/origin/ has both feature and master branch details)
- done code build
- from Sonar-scanner passing -Dsonar.newCode.referenceBranch=master
- in UI sonar project shows New Code: Compared to master
- But It is not identifying any new code in UI analysis, though there are change lines in feature branch compared to master branch