I am using sonar false-positive feature in my project deployed on sonar server. If I had declared as false positive on master branch. What happens if i analyzed dev branch which is same files.?

I am using sonar false-positive feature in my project deployed on sonar server and i have marked some violation instances as false positive in master branch.

Now i have analyzed same project, but different branch in sonar having the same code base and deploy it on sonar. As code base is almost simlilar for both of my projects this is obvious that those “50” violation instances will occurs here also, which i have marked as false-positive in my previous analysis of master branch.

Now i dont want to spend time to mark these instances as false-positive again.

so i want to ask is there any way to mark these “5o” violation instances as false-positive by refering my first project without doing manually??

Hi,

As described in the docs issues are synchronized at the first analysis of a long-lived branch.

 
Ann

We are encountering what appears to be a similar issue, different scenario. Using OSS edition, so no longer have “branch support”.

We choose which development branch to analyze and at some point in time, switch to another branch to analyze. Say as app v3 is replaced by v4. Branches had common ancestor.

After that, it seems all issues marked as false positive re-appear again. Any way to prevent that, other than explicitly //NOSONAR ?

Hi,

In the Issues documentation check out the section titled ‘Understanding which Issues are “New”’. It describes how SonarQube understands that the issue raised yesterday is the same as the issue raised today in order to maintain the FP marking. In your switch from branch to branch, it’s likely that enough about the issue locations has changed that SonarQube can’t maintain the continuity.

 
Ann