No Lines of Code detected, the main branch of this project is empty

I am trying SonarCloud for my CI. My project is on Github (it’s not very beautiful, it’s a student project :slight_smile:, I am here to learn so please don’t judge me :wink: ) GitHub - SimonGriang/SQSWebApp
I am having a Github Action for using Sonar. Therefore I used the instructions on SonarCloud for the build.yml and Sonar_Token generation.

My ASP.net Core MVC Web Application has the following structure:

SQSWebApp
|
|- WebApp (with solution and csproj file)
|- UnitTests (MSTest project with all my Unit Test, this project is added to the solution.)

Now I have the Problem that Sonar says my “The main branch of this project is empty.”

Last analysis has warnings

I don’t get why Sonar does not recognize my main project. Even though it shows code smells for the WebApp folder.

You can check out my build.yml file here: SQSWebApp/.github/workflows/build.yml at main · SimonGriang/SQSWebApp · GitHub

Also my Test-Coverage is not visible even though I followed the steps of .NET test coverage & SonarCloud

I could not find anything helpful so far

I really would appreciate any help.

Hey there.

Your source project is full of references to test packages. This results in those projects being categorized as test projects.

Fix that up, and your projects should be correctly classified (or you can just force it).

1 Like

Thank you very much.
Not it works!

1 Like

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