The main branch of this project is empty for certain services

I want to the sonar report of dev branch specifically .
But for certain services it shows “The main branch of this project is empty”.

Not finding option to change the branch name in project settings.

  • Community Edition
  • Version 9.6
    sonarqube running as docker container .

Please assist on this


Since branches don’t exist in Community Edition, I guess you’re using the “Community Branch Plugin”? If so, you should direct your questions to its maintainers.


Hi Ann,
Thank you for your response.
yes I am using community edition.

Hi @ganncamp ,

I came across something with "$BRANCH_NAME" adding it in displays which branch being scanned currently ?

Tried using it in but no luck. Is other any other way to check which branch getting scanned currently ?
Can we change the scanning to be performed only on “Develop” branch in community edition only ?

Please help me out on this scenario .


Community Edition simply doesn’t support branches.


Thank you for your response !

Hi @ganncamp ,
One last question
How does the sonarqube knows we triggering from master branch .
Because when i add sonarqube stage in any branch and trigger it , I see project being created in sonarqube dashboard .

Is that its only picking up master/main branch present in the repo inspite of we trigger different branches !

Please clarify me on this


If you’re in Community Edition, which doesn’t support branches, then every analysis must be of the main branch, since nothing else is supported/possible.


Okay .
It means even if we trigger test or feature or dev branch , sonarqube checks only for the main branch and displays the analyze report of main branch in sonarqube dashboard .
Please Correct me if i am wrong !


SonarQube analyzes the code you give it. If you give it main branch code, it analyzes main branch code. Give it a feature branch, and it analyzes that code. And reports everything as the main (i.e. only) branch of the project.


Great !
Though it analyze from every branch we give but report gets generated only for main branch rite .