I am trying to generate a SonarQube report for an iOs mobile app and I keep getting ‘The main branch has no line of code’ when I am running the SonarScanner command.
The branch I used to check out the code from Git used to be called ‘main’. I have created a ‘master’ branch. But this didn’t solve the issue.
Renaming the branch from ‘main’ to ‘master’ is the only viable solution I can think of as I have setup everything correctly.
After extensive research on Google, it seems a common issue but no one has really found a fix.
I guess your analysis shows up in SonarQube as a non-main branch?
Is the branch in question the project’s default branch? Because we’ve done work on treating the default branch as the main one for SonarQube 9.8 (E.T.A. 12 Dec).