Zero Lines of Code

I have analyzed my project with following lines. But no analyze result for the project folder. But another folder looks like analyzed. What is the problem?

  • dotnet sonarscanner begin /d:sonar.token=${SONAR_TOKEN} /k:“TTT_Api” /“${SONAR_HOST_URL}” /v:${CI_COMMIT_BRANCH}
  • dotnet restore “src/APIs/XXX.API/XXX.API.csproj” -s $NEXUS_REPOSITORY/nuget-group/
  • dotnet build “src/APIs/XXX.API/XXX.API.csproj” -c Release --no-restore
  • dotnet sonarscanner end /d:sonar.token=${SONAR_TOKEN}


Welcome to the community!

It looks like the project in question was detected as a test project. We don’t count Lines of Code for tests, only for source files. That would be why you can have issues but no lines of code.


Hi @ganncamp ,
Thank you for your reply. This is not a test project. Is there any flag to analyze all of the code?


This is what you’re looking for.


Thank you so much @ganncamp, it works.

1 Like

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