SonarCloud - "The main branch has no lines of code."

We started a free 14 day trial with sonarcloud hoping to have it replace SonarQube.
However, in my testing, I am unable to analyse any of my projects.

DETAILS:

  • Azure DevOps for PR Decorations
  • Updated the Quality Profile to analyse the entire project
  • Project is running in C#
  • Renamed the master branch to “develop”, which is our main branch

However, each pull request where we merge our features into the develop branch passes without any issues.

When I run our projects against SonarQube, we fail and provides me the details I need to address my issues.

What is it that I am doing wrong here?

Hello Mason!

And welcome to the community forum!

I think your develop branch is seen as a short living branch. If you go into the branch management screen:
image

You should be able to rename your main branch (called master by default) to develop. Then delete the existing short living branch called develop.
And then running a new analysis of your develop branch should fill the main branch. And from now on PR’s targeting your develop branch should be analyzed correctly.

I had already renamed the main branch to develop and still unable to analyze the app.

Do you have any error showing during the analysis that you could share ?
Or in the background tasks of you project on SonarCloud ?

There are no errors.

Ok, and do you have issues correctly reported in your develop branch and in your PR’s ?
Are your Quality profiles and quality gates correctly setup ?
Could you share anything to help troubleshoot or understand what’s going on ? (logs, screenshot, conf,…)