We have been using SonarCloud successfully for about a year on our private projects. Recently, the main page on our organization shows “The main branch of this project is empty” for the Project in question, and the browser for the branch itself shows “The main branch has no lines of code.” The code page on the project however, does show our code as expected. All the analysis themselves look fine, and all background tasks show successful completion.
I have cleared out all the PRs from the “Branches and Pull Requests” page, and noticed that there was a weird instance where one main branch appeared as though it was a PR into another main branch. I have also tried re-naming the main branch and running a new build to see if the newly listed branch was shown correctly, and it was not.
ALM: Bitbucket Cloud
CI: TeamCity
Scanner: sonar-scanner-msbuild-5.0.4.24009
Language: C#
Our command line to start scanning looks like:
C:\sonar-scanner-msbuild-5.0.4.24009-net46\SonarScanner.MSBuild.exe begin `
/o:<org> `
/d:sonar.host.url=https://sonarcloud.io `
/d:sonar.login=<login> `
/k:<Project> `
/n:<Project> `
/v:2.0.0.2499 `
/d:sonar.branch.name=develop `
/d:sonar.inclusions=Navigator*/**/*.cs `
/d:sonar.exclusions=**/*.g.cs,**/*.Designer.cs,ConfigurationConverter/**/* `
/d:sonar.cs.dotcover.reportsPaths=dotCover.html