New project, "dev branch has not been analyzed yet..." message

I’m setting up a new .NET C# project in SonarCloud and the scan runs successfully in a GitHub Action and I can see the PRs appearing in SonarCloud and the SonarCloud comment appearing in GitHub.

However, my “main” (dev) branch analysis results are not reported. I only see the message:

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

My trigger in the GitHub action looks like this:

name: SonarCloud Build
      - dev
    types: [opened, synchronize, reopened]

However even after merging the my GitHub action YAML with that trigger to my dev branch, the analysis results do not appear in SonarCloud.

Am I missing something else?

  • ALM used: GitHub
  • CI system used: Azure DevOps, GitHub Actions
  • Scanner command used:
.\.sonar\scanner\dotnet-sonarscanner begin /k:"[project key]" /o:"[org name]" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /"" /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml
dotnet build --no-incremental [solution name]
dotnet-coverage collect 'dotnet test' -f xml  -o 'coverage.xml'
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
  • Languages of the repository: C#

So it turned out adding this project put us over our organization’s LOC limit. Once we upgraded our subscription, I re-ran the GitHub Action manually and the results show now.

As a bit of feedback, it would be nice if there was a way to surface this “maximum allowed lines limit” issue in a more visible area of the site.

I only discovered this by going to the project’s Administration → Background Tasks section and then opening the error details for the failed analysis.

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