SonarQube Analysis Discrepancy Between Branches: No Issues on MY_BRANCH, but Detected After Merge in

Hey folks,

Got a SonarQube puzzle here and I’m trying to figure out what’s going on. When I run the first command to check out MY_BRANCH, Sonar doesn’t show any issues, cool. But then, when I merge into develop and fire off the second command, things get messy. Sonar starts complaining about issues that, from what I understood, should have already popped up in MY_BRANCH.

Anybody been through this? I’m a bit lost here. Could it be something with the order of the commands or what?

Just to give you the full picture, MY_BRANCH is created from develop.

I’ve poked around in the settings, took a look at the logs, but so far, no dice. If anyone could lend a hand, I’d be really grateful! Thanks!

Sonar Version: 8.9.10.61524 (SonarCommunity Edition)

Commands:

  1. mvn sonar:sonar -Dsonar.projectKey=PROJECT_KEY -Dsonar.host.url=https://sonar.com -Dsonar.login=login -Dsonar.password=password -Dsonar.scm.provider=git -Dsonar.branch.target=develop -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco-ut/jacoco.xml,target/site/jacoco-it/jacoco.xml -Dsonar.branch.name=MY_BRANCH

  2. mvn sonar:sonar -Dsonar.projectKey=PROJECT_KEY -Dsonar.host.url=https://sonar.com -Dsonar.login=login -Dsonar.password=password -Dsonar.scm.provider=git -Dsonar.branch.target=develop -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco-ut/jacoco.xml,target/site/jacoco-it/jacoco.xml -Dsonar.branch.name=develop

Hi,

Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

8.9.10 → 9.9.3 → 10.3 (last step optional)

You may find these resources helpful:

If you have questions about upgrading, feel free to open a new thread for that here.

In addition, branch analysis is only supported in the Developer Edition of SonarQube and above. If you’re using some external plugins to enable support, we won’t be able to help you here :man_shrugging: You should reach out to the maintainer of that plugin instead.