Release branch analysis

Have used sonarqube a few years back with great success; new company and I’m rolling it out again.

This time I’m trying sonarcloud, but we are also considering hosting sonarqube ourselves;

We use fairly standard git flow style for managing repo;

  • master = our production branch;
  • develop = our development branch;
  • feature/x which target the develop branch;
  • release/* = our release branches;

What I’m after at the moment is just to be able to see a list of new issues introduced in each historical release, and also to track the develop branch.

I’ve tried a lot of combinations, but it seems whenever I scan a release branch it either goes in as a long living branch but does not show me new issues introduced in that branch from the older release, or even as compared to the master branch.

I have gone through lots of documentation and the help forums, but it seems as though the way branches are managed have been in flux lately – which leads to lots of answers that are no longer relevant. This is my last attempt:

  • git checkout develop ; sonar-scanner
  • git checkout release/20.3.5 ; sonar-scanner

I was hoping you could reply with some steps to set this up properly.

Hello @fromz,

Welcome to our community!

What I understand from your message is that you are using a version-based release model. For that, I would recommend the following:

  • Set the new code definition to “Previous version”. You can find the documentation here.
  • On the same page as above you will also find documentation on how to set up versions using the command line (if you are not using Maven or Gradle).
    • This can be done manually as well on the “Activity” tab of your project page.
  • Your release branches should be long-living branches. You can find the adjustable naming pattern on the following page: Project page --> Administration --> Branches & Pull Requests.

Using that approach, your new code will be everything that was added since the last release and will only show those issues.


Thank you Martin!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.