I sorted some bugs on one branch (let’s call it “dev”), after a scan on another branch (“nightly”) the same bugs (dismissed as Won’t Fix or False Positive) appear again. “dev” was merged into “nightly” before running the scan.
According to the “Issue Creation and Synchronization” section of the branches analysis documentation, the issues are synchronized when a branch is created and when via an open pull request.
Otherwise, the long-living branches are considered independent and you have to do the issue resolution in them independently.
Did you merge “dev” into “nightly” using a pull request?
“the long-living branches are considered independent and you have to do the issue resolution in them independently”
I find that is a bug. Having to repeat the same work for the same issues across different branches is just annoying, and doesn’t represent any added value.
If your branches are not independent, you can set the “New Code” definition for your “dev” branch. In order for the issue synchronization to kick in, you need to set it to “Reference Branch” and specify the “nightly” branch as the reference.
I’m not Sonar admin so I don’t have access to settings to try your suggestion. We ended up having master scanned daily and only doing bug triage there. It’s what the management wants anyway.