How to save false positives in a sonar between branches?

Is it possible in sonar to transmit “false positives” between branches?

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

This “branch 2” represents a new sonar project (this may not be so, because sometimes we have two branches at the same time, as well as two sonar projects). But this sonar project “branch 2” lost all marks of “false positives”.

How can we support false positives between two branches?

+6
source share
2 answers

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

+1
source

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

Basically you export permissions from one branch to another. This can be automated using your CI system, as the plugin provides a REST api.

  • Updating problems from another project: http POST to / api / issueresolver / update
  • Export problems from the project: http GET to / api / issueresolver / export
  • Import problems into the project: http POST to / api / issueresolver / import
+1
source

Source: https://habr.com/ru/post/922591/


All Articles