Leak period doesn't work for temporarily deleted files

  • 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).

Jim,

It looks like the exact situation you described is fixed by SONAR-8368, which will be implemented in the upcoming SonarQube v7.4.

Colin

1 Like

Do we know if this fix is going to be propagated back into the 6.7.x (LTS) branch?

Hi,

We do know. It will not. :wink:

Ann

1 Like