How to make a branch analysis to always use master as baseline in SonarQube 8.1?

Which versions are you using?
SonarQube 8.1 Developer Edition

What are you trying to achieve?
We upgraded our SonarQube from version 7.9 and the property is now deprecated so we want to get away from it.
In our work flow, we always create/fork a branch from master which then is merged back via a pull request. We used to use the properties and to say that the analysis in our branches should always use master as a baseline, so the branch analysis could detect what code is new in the pull request.

Now with the abolish of short/long lived branches, a branch is just a branch. The new code period is set by default to be the previous version ran by SonarQube in the same branch and the first analysis of a branch is not able to detect new issues, as there is no base line yet at that point. Setting the new code period to a certain number of days is not really an option for us and, at branch level, we only can set it to an analysis of the branch and not from another branch like master.

What we are trying to achieve now is what is the best way in SonarQube 8.1 to run analysis in a branch always comparing to the forked from branch or hardcoded it to master it’s also an option. If possible not using the PR decorator feature, because when we first create a branch we don’t have a PR yet and it would be great to detect new issues even before a PR is created.

What have you tried so far to achieve this?
I tried to use still the deprecated property, but it doesn’t seem to give the same results as before the 8.1 version. I guess because of the SLB/LLB change.

Thank you in advance!

I have the same problem, someone answered to you?

Nop, I ended up using the Pull Request feature:

Thank you for your answer, but for me only pull request does’nt work. I need that a BASELINE versionto be a specific version setted in the master branch and i made a test and the pull request setting the new code on the last master branch version, isnt’it?


see this threads for current discussion and status