- versions used: SQ 6.7.3, SonarJava 5.6
- error observed: Issues being reported as “new” with no change over leak period
- steps to reproduce:
Analyze version “A” of a project. Version A has some existing issues. Set the “leak period” to a specific version. (I mark the analysis as version “BASELINE” and then set the leak period to “BASELINE”.)
At this point, an additional analysis of the project will show no new issues. (So far, so good.)
Delete a class from your project - one that has issues - let’s call this version “B”. Rerun analysis - no new issue. (Still good.)
Now discard version B - you decide NOT to delete the class.
Perform analysis on version A again. At this point, the code is identical to the “BASELINE” version. However SQ will report “new” issues for the file which was temporarily deleted in the version B analysis.
- potential workaround:
The only workaround I can find is to manually update the version, setting the new analysis as the BASELINE (even though the code hasn’t changed).