Sonarqube projects passing but metrics not showing for some projects in Projects view

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    Sonarqube Community 8.9.7
  • what are you trying to achieve
    Have metrics showing for all projects that pass quality gates
  • what have you tried so far to achieve this
    Removing sonar.exclusions and sonar.properties, removing just sonar.exclusions

Hello,

I have a team that is having an issue where, for some of their projects, they do not see the metrics on the Project view despite the projects passing. Their sonar files are nearly identical across all projects, but some do not show the metrics, instead saying “The main branch of this project is empty.” Clicking into the project we are able to view all metrics fine.

Most of the projects are not scanning from the main branch, however there are a few that are still showing metrics despite this.

Please let me know what info/files I can share to help troubleshoot this.

Hi,

Welcome to the community!

Unfortunately, the Projects page and the main Project homepage only reflect the measures from the main branch.

The measures you’re seeing there are going to be from the last analysis of the main branch.

Note that there is a long-standing backlog ticket to allow you to promote another branch to be the main one. It’s possible it will be included in 9.7 (it’s at the bottom of the list, though, so I’m not holding my breath).

 
Ann

Hi Ann,

Thanks for the quick response and confirmation. I was pretty sure that this was the case but the team wanted to confirm.

Have a great weekend!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.