Differentiating Scanned New code vs Old code


We are using SonarQube LTS version 7.9.5 it is very clear for us to understand new code changes as we have source and target branch parameter which are being passed to sonar-scanner command
Master or Target branch:


Target Branch

Now we are trying to upgrade sonarqube to 8.6 version but we have setup it Test server. In the Test server we are unable to see the new code changes.
I am aware that sonar stopped support sonar.target branches model. Entire code is displayed instead of code changes.

Is there is any way to display or differentiate new code changes in the specific branch.

Bindu Madhavi

Hi Bindu,

In 8.6 you have the same ability to explicitly set the New Code Period that you already had in the main branch. So just update that setting appropriately, run a new analysis & you’ll get the same New Code experience in your branches that you’re used to in the main branch.


Hi Ann Campbell,

I was also facing similar issue, I enabled the option in admin level which you suggested and ran the analysis again.

  1. New code is not differentiating properly, we couldn’t see what are lines changed and which are introducing the new bugs or vuln’s
  2. We do we have clear picture earlier like below screeshot, but currently with the sonar latest version it is not clear for us to check new bugs/vuln’s with the respective code changes

We are expecting something like below.

Our main view is to see like above and quickly say ok only one bug is getting introduced with the master branch code.

Please guide me how do we setup and display only new changes like

Hi @Nagaraju,

Please start a new thread.



Can you please take up this request ? Cannot see only modified lines of code

I have created a new thread and detailed clearly what i am trying to get the help form sonar community