Why SonarQube display problems out of leak period?

I am working on a project that dates back to more than 10 years, and we thought of integrating Sonar to analyze all the new code that will be added from May 01, 2020.
On SonarQube, I select the filter that allows me to display just the problems of the leak period, but it gets me alertes out the period I chosed.

Is it normal to have this kind of behavior ?

In the attached image I put the filter started from May 14, 2020 but the alert dates from April 08, 2019.
Capture

Hi Mahmoud,

Which version of SonarQube are you using? The configurations for New Code (formerly called “Leak”) Period and display of New vs. Overall Code have changed in recent releases.

Also, your screenshot indicates to me that you may believe the leak period setting controls whether issues will be shown at all, which is not the case. All issues, even those in legacy code, will be seen if you’re looking at the Issues tab for the project. You need to filter for “New Code” under the Creation Date filter area if you only want to see the new issues.

Hi @Jeff_Zapotoczny

Thank you for your quickly response.

For the version of SonarQube, I use : 6.7.7
In the filter I chosed this one :
Capture
With this filter, sometimes I get errors that are less than the date I selected, like the image in my first question

If you click the New Code label (“période de fuite” in your screenshot) you would be limited automatically to only issues in new code.

Your version of SonarQube is quite old and unsupported. I’d suggest you upgrade at least to the 7.9 LTS.

Yes, I also chose “Période de fuite”, but I still have alerts that are not related to this period.
I hope this screenshot is clear enough to show you the problem :


Maybe it’s a bug in this old version of SonarQube.

It’s quite possible you’ve run into something we fixed in SonarQube 7.x, as there were a number of improvements made regarding proper backdating on issues. I strongly encourage you to upgrade when you can!

Ok, I take note and I will ask our team to upgrade to version 7.x

Thank you @Jeff_Zapotoczny

1 Like