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.
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.
For the version of SonarQube, I use : 6.7.7
In the filter I chosed this one :
With this filter, sometimes I get errors that are less than the date I selected, like the image in my first question
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!