Issue with long live branches in Sonarqube enterprise edition

Hi All,

We are using
Sonarqube 7.9 Enterprise edition
Azure DevOps Sonarscan task v4
Our branch names are

and for prepare analysis task in Azure Task we have defined this$(Build.SourceBranchName)

and in sonarqube
Long living branches pattern: (master|release/).*

but still for above mentioned branch in sonarqube it shows as short lived branch

Hey Ankit,

SonarQube is probably getting tripped up on the / in your regex. You can see why on if you paste in the expression you’re trying to use.

I would recommend escaping the slash like this:


On a separate topic, out of curiosity, why override the parameter? The extension/task should do a good job figuring that all out on its own.