Move “Won't fix” between projects in Sonarqube

2020-02-15 04:44发布

问题:

I am using SonarQube to analyze my code before uploading to Gerrit and as a step in the review process in Gerrit. The same code is analyzed twice and I have two projects, e.g. "development-project" and "gerrit-project" in SonarQube. I then sometimes marks something as "Won't fix" or " False positive" etc in my "developpment-project". I would like to move that to the "gerrit-project". Is that possible?

回答1:

I was in similar situation and I created simple command line tool for copying Won't Fix and False-Positive resolution types from one SonarQube project to another. A bit clumsy solution, you need to run it after each merge, but better than manually resolve the same issues in two or more SonarQube projects.

You can find the tool on GitHub - https://github.com/HonzaTau/SqCopyResolution



回答2:

Unfortunately you cannot. There is information, in SonarQube documentation, that projects created with sonar.branch parameter are treated as independent* projects.

*independent - not associated with any other project


http://docs.sonarqube.org/display/SONAR/Local+and+Branch+Analysis:

[...] you add the sonar.branch=[branch key] analysis property to the release branch to create a second, independent project in SonarQube.



标签: sonarqube