SonarCloud not showing all branches or PRs

  • ALM used: GitHub

  • CI system used: Jira and MSBuild SonarScanner

  • Scanner command used when applicable (private details masked)

steps {                
                withSonarQubeEnv('SonarCloud') {
                    sh "dotnet ${MSBUILD_SONARQUBE_SCANNER} begin /o:${SONAQUBE_ORG} /k:${SONAQUBE_PROJECTKEY}"
                    sh "dotnet build ${MSBUILD_SONARQUBE_SOLUTION}"
                    sh "dotnet ${MSBUILD_SONARQUBE_SCANNER} end"
  • Languages of the repository: C#/.NET

  • Error observed (wrap logs/code around with triple quotes ``` for proper formatting)
    I have many branches (long and short lived), and many PRs in this repo, but do not see them here after several scans.

  • Steps to reproduce
    set up a Jenkins pipeline with MSBuild SonarScanner and the pipeline step above, note that branches and PRs are not shown in SonarCloud

Hey there.

Take a look at this post (and the post linked within)

ok, do you have examples of how to get this from a Jenkins pipeline? I’m sure that would help people following this thread.

I think this post (linked in the previous post) should help: