PR incremental analysis work, branch analysis do not

Good morning everyone !

Must-share information :

  • which versions are you using (SonarQube Server / Community Build, Scanner, Plugin, and any relevant extension) : Enterprise Edition v2025.3 (108892) MQR Mode
  • how is SonarQube deployed: zip
  • what are you trying to achieve
    I am trying to get incremental branch analysis to work on my Azure DevOps Server CI pipelines
  • what have you tried so far to achieve this

I have been able to successfully get PR incremental analysis to work fine which drastically lowered analysis time.
On my Prepare Analysis task logs, I get the correct output :

11:21:00.949  Downloading cache. Project key: MyProject, branch: develop.
11:23:19.929  Incremental PR analysis: 6151 files out of 6306 are unchanged.

(Yes it’s a fat repo)

But anytime I try to get a branch to do the same, I get this :

13:24:39.424  Incremental PR analysis: Base branch parameter was not provided.
13:24:39.424  Cache data is empty. A full analysis will be performed.

I have tried setting the sonar.branch.name to master, main or develop manually and tried running scans, I always get the same result.
I think the issue is that it stays in “PR mode” when it should be in branch mode.
I can confirm that this is not a PR, and no PR variables are set in the pipeline.
Also, that is not because the branch has not been found, the message would be explicit about that.

I have also tried creating a whole new pipeline that only does the build + analysis but I get the same result.

If anyone has ever met this issue, I would appreciate some insight.

Thanks !

Hey there.

Incremental analysis, most of the time (a few exceptions) is only supported on PR analysis, and not on branch analysis (docs):

  • To shorten a branch analysis: C, C++, Objective-C, and COBOL.
  • To shorten a pull request analysis: C, C++, Objective-C, Java, JavaScript, C#, VB.NET, TypeScript, Kotlin, PHP, and Python.

So I believe this is expected behavior.

I missed that part indeed.
Thanks for pointing it out.