What is base branch used for in pull request decoration?

We are working on setting up pull request decoration (we are on SonarQube 8.3.1).

One of the required parameters is sonar.pullrequest.base, which is the “branch into which the Pull Request will be merged.”

Can someone clarify what this parameter is used for?
Is SonarQube somehow comparing the scan results between current branch and the base branch? if not, what is this parameter needed for ?

Hi Lior,

It synchronizes issue data from the master branch. There’s a note about this on the Branch Analysis page of our docs, see “Issue Creation and Synchronization.”

i read that and i must say that this part was not clear to me at all.

It means things like:

  • avoid reopening issues in the PR’s changed code that might have previous been marked False Positive or Won’t Fix on the parent branch
  • if an issue is reopened, treat it as such and carry history forward rather than regarding it like it was brand new
  • set the stage so new issues on the PR branch will carry their history to the parent branch when merged