Issues marked as resolved/wontfix in master branch are still shown as issues in other branches


We’re using SonarQube 8.9.8. We marked some false positive issues as resolved in our master branch (but the master branch isn’t the main branch in sonarqube). However, SonarQube still points out these issues in other branches created from master and fails the analysis.

Is there any way to mark an issue as resolved in a way so it take effect across all branches?

Even security hotspot issues that were marked as “safe” in master branch are still shown as issues in new branches.


Hey there.

Issue states will not transfer to existing branches (except for the first time a new branch is analyzed), but they should transfer to new branches (one-time, on the first analysis of that new branch).

Can you clarify what behavior is happening here?

Hi, thanks for the reply.

What’s happening for me is:

  1. Master branch had security hotspots and vulnerabilities.
  2. The security hotspots I reviewed and marked as safe and the vulnerabilities I closed because they were false positives.
  3. Created another branch from master for a pull request.
  4. The new branch shows all the security hotspots and vulnerabilities I had closed in the master branch. These show up in the “Overall Code” tab, not under “New Code”.

Thanks @samwise

Can you tell me how your new code period is configured for this project, and for the new branch that you created?

Hi @Colin, this is how New Code is configured:

Project level:

Branch level:

Hey @Lelouch and @Colin , were you guys able to resolve this issue? I am seeing a similar issue.

Hey, I think it was fixed by putting the correct branch under the “New Code” settings shown in my previous screenshot. That should fix the issue for all new branches (not for existing branches).

All I see is you have a screenschot of the default settings under the new code section. Could you please tell me what change you made?

What I am trying is similar to yours. I am seeing that if the code smell is marked as “wont fix” in the master then it gets synchronized with the new branches created off the master. But what if I want to synchronize the code marked as wont fix from a branch to the master. So that eventually the new branches created from master gets synchronize with that branch which marked the code smell as wont fix.

You can’t do this. See what Colin said:

The transferring of issue status from one branch to another is a one time thing that happens on the first analysis of a branch. Since your master branch is already analyzed, it won’t get issue statuses from any other branch.