cremersstijn
cremersstijn

Reputation: 2395

How to keep false positives in sonar between branches?

Is it possible in sonar to transfer "false positives" between branches?

This is our workflow: we develop in branch 1, we do our sonar checks on this branch, when branch 1 will be released, we merge this into the trunk, then we create branch 2 from the trunk, and we do our sonar checks on branches2.

This "branch 2" is a new sonar project (it can't be the same because we sometimes have 2 branches open at the same time and also 2 sonar projects). But this "branch 2" sonar project has lost all the "false positives" marks.

How can we keep the false positives between 2 branches?

Upvotes: 8

Views: 2077

Answers (2)

Jakub Janoštík
Jakub Janoštík

Reputation: 186

There is a plugin that can be used for this https://github.com/willemsrb/sonar-issueresolver-plugin (also available in update center)

Basically you export the resolutions from one branch into another one. This can be automated using your CI system since the plugin provides REST api.

  • Update issues from another project: http POST to /api/issueresolver/update
  • Export issues from a project: http GET to /api/issueresolver/export
  • Import issues in a project: http POST to /api/issueresolver/import

Upvotes: 1

No, this is not possible yet. You can ask for this feature and discuss it on the Sonar user mailing-list.

Upvotes: 2

Related Questions