SonarQube analysis without main branch

I’ve created a script to retrieve SonarQube metrics and issues for a project. I am trying to fetch these details from a feature branch, but there’s a problem:

  1. The main branch has never been analyzed in SonarQube, and I am not allowed to run the analysis on the main branch.
  2. When I use the script to fetch the metrics, I only get empty results.
  3. However, I can see the feature branch analysis and its details on the SonarQube dashboard.

Is there a way to retrieve the metrics and issues for the feature branch without running an analysis on the main branch?

Hey there.

As noted in the template post, what version of SonarQube are you using?