I have been using Sonar for Bitbucket for some time and all proejcts has been configured to use branch-based anlaysis (e.g. compare feature branch vs a main develop branch). Recently we have upgraded both SonarQube and this plug-in and it seems all the repo has changed to default to Leak period instead. From description it is comparing against the last release, a couple of question:
1) how does it know when it is the leak period to compare against?
2) is it better / recommended that we use leak period instead of branch based? From branch based, it seems we can find out exactly what technical debt or issues have been introduced in this feature branch into the main development branch, isn't that a more useful approach?
Since version 1.11 of the plug-in, the default is "branch-based" mode. If your default is now leak period suddenly, then this is a bug. What do you see in the repository settings of the plug-in?
Regarding your other questions:
1) The plug-in just uses the last leak period available to compare against. This can be either the last version of your project if you are using -Dsonar.timemachine.period1=previous_version or the last analysis when using -Dsonar.timemachine.period1=previous_analysis.
2) It really depends on your workflow. There are teams that do not analyze their target branches but only the source branches of their pull request. In this case, it makes sense to use leak period mode. For other teams, branch-based mode is better because they clearly see what new issues will be really introduced with a feature branch.
Please let us know if you have further questions.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs