Community Build v25.4.0.105899 New Code setup for feature branch

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

With “community-build-v25-4-0-105899” can we run with “specific analysis“ setup for new code?

with “specific analysis“ does it check timestamp of the specific analysis and consider only those commits happen after that timestamp for New Code? doesn’t it do SCM file comparison for this?

Hello @nandy.deba,

SonarQube Community Build does not support feature branch and pull request analysis. This is only supported starting with a paid SonarQube Server offering (like Developer Edition or Enterprise Edition).

Cheers :wine_glass: