Old issues reappearing when re-running scan on test branch after fixing issues in master

We are experiencing unexpected behavior with SonarQube branch analysis.

Scenario:

We scanned the test branch, and several issues were reported.

Later, we fixed some of those issues in the master branch and ran the SonarQube scan again for master.

After that, we triggered a new scan again for the test branch.

Now SonarQube is showing many issues again that were already scanned earlier, and the issue counts seem inconsistent.

Questions:

Why are previously scanned issues appearing again when re-running the analysis on the test branch?

Does SonarQube reset issue tracking when scanning different branches?

Is there any configuration required to maintain issue history between branch scans?

Environment Details:

SonarQube Version: Community EditionVersion 10.4.1 (build 88267)

Hi,

Welcome to the community!

It doesn’t sound like you fixed the issues in the test branch? Only in master?

 
Ann

Code is not in sync with test and master branch.

Hi,

If the issue hasn’t been fixed in all copies of the code, then I would expect the issue to still show up.

 
Ann