Master" branch has not been analyzed

Hello,
I have one Android project which is not begin analyse after configuring it from SonarCloud, Below is the error what it gave:

"master" branch has not been analyzed yet and you have multiple branches already. It looks like it is not your Main Branch, check your configuration.

I have checked from Hithub, Master branch is already set as default branch and it is long living branch.

Your help into this highly appreciated

  • versions used : SonarCloud
  • error observed : “master” branch has not been analyzed yet and you have multiple branches already. It looks like it is not your Main Branch, check your configuration.
  • steps to reproduce
  • potential workaround

Hello,

Usually this show up when your default branch on Github is called differently than “master”, can you confirm ?

If that’s the case, you can go in your project Administration -> Branches & Pull Requests and rename the “master” branch to the actual name of your main branch on Github:


image

I have this same issue, and master is the default branch for my project. It seems there is nothing I can do to get analysis to run on my project.

I have the same problem as well. I just created my project here yesterday, we only have the master branch, and I got this message.

I’m also having this issue. The name looks correct to me.


Screen Shot 2021-08-13 at 12.08.24 PM

My project also is having this problem. I just started using the project on SonarCloud last week, we only have a master branch, and SonarCloud is processing our pull requests but not do anything with our master branch.

Can we get some answer on this issue pls ?

@mcpierce ,@klrpdx, @dev-asta

I am facing this issue for my project … did u guys get any leads on this. ?

I ended up having to delete my project on SonarCloud, create a new one, and then one of my fellow developers took to getting the SonarCloud configuration working.

You can take a look at our code and see if anything there helps you.

Hello everyone!

Could you share a link to your projects that have this issue ? And eventually a link to your repo, were the analysis is setup if it’s an open source project ?

If it’s a private project do tell me and I’ll open a private channel to share information.

1 Like

Thanks @mcpierce

Thanks @mcpierce, it seems that everything is fine on your side, the project that you shared seems to be working well.

If anyone else is still having the issue don’t hesitate to share a link to the project that has it so I can give it a look.

I could really use some help here but mine is a private project … how can I start a private chat ? @Gregoire_Aubert

I need help with this as well. If somebody has managed to solve this, would appreciate any pointers that I could get. Thanks

Hello Sashi,

In the case of OS, the main branch was actually not analyzed at all, because of a misconfiguration of the Github Action.

Also the message is a bit misleading because it talks about the branch not being the default branch, but it might also be that the default branch is correctly named but not analyzed at all. The system doesn’t do the difference currently. We will see how we can improve this message.

So if you’ve got this message you should also check your CI configuration to make sure it is triggering the analysis of your main branch too and not only for your PR’s or feature branches.

1 Like

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