Can we only show analysis of new code which is being pushed on SonarQube. We dont want SonarQube to show the complete picture of our code as it has lot of technical debts and displaying it would give a bad picture

Can we only show analysis of new code which is being pushed on SonarQube. We dont want SonarQube to show the complete picture of our code as it has lot of technical debts and displaying it would give a bad picture

Hi @visheshgupta08071992,

It’s not possible to show only new code, but SonarQube will separate new code from overall code for you and display it in separate tabs on each project’s home page. You should check out this article then take a look at how to define your new code period.

Regards,

Cameron.

1 Like

Thanks @Cameron . With separate Tabs do you mean new code which is being pushed would be shown in yellow part while the white part shows the overall picture of code as shown in below attached screenshot.

image

Please correct me if you meant some thing else. However if you meant the same what I have mentioned above,Then it would not suffice our requirement. We want that sonar does not display the analysis of old code at all.It should only display analysis of whatever new code is being pushed.

Awaiting for your inputs.

Thanks.

Hi @visheshgupta08071992,

You’re using a quite old version of SonarQube. Newer versions have a UI change that completely separates new code from overall code in different tabs, with new code the default view:

Having said that, we still think that overall code metrics are useful, so it’s not possible to completely turn off that part of the UI.

I hope that clarifies.

Regards,

Cameron.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.