SonarQube-7.9-Asp.net Core analysis is not working properly

Hello,

I’ve setup SonarQube-7.9 with Docker container with Postgres.

I’m working on asp.net core project in ubuntu. I’ve installed tool called dotnet-sonarscanner-4.6.2.

I’m trying to achieve code analysis of asp.net core project in sonarqube.

I’m following steps given in sonarqube webui to run tests & share results on sonarqube.
Steps:

  1. dotnet-sonarscanner begin /k:“tsr-sample” /d:sonar.host.url=“http://192.192.1.238:5005” /d:sonar.login=“ba48cd78c13e1ea21b2579d9bd7b2b50b4554d2e”
  2. dotnet build
  3. dotnet-sonarscanner end /d:sonar.login=“ba48cd78c13e1ea21b2579d9bd7b2b50b4554d2e”

All above commands ran successfully and I’m able to see code in sonarqube. But it shows no code-quality results.
I’m attaching screenshots of overview,activity,code,isssues and measures tab.

Other screenshots are attached in google drive link. link

Please check here. and Let me know if i am missing something or what will be the possible solution.

Thanks.

Hi @kalpit,

Please attached the console output for the dotnet-sonarscanner end step.

Which version of ASP.NET Core are you targetting?

Thanks.

Hi @duncanp,

I’m using 2.2.300 ASP.NET core.

And here is the output of dotnet-sonarscanner end.

And you can found other screenshots in this link. sonarqube-link

Please check and suggest solution for same.

Thank you.

@kalpit it looks from the log output that the project folder path has a folder with test in the name i.e. Dapper-Postgres-Migrate-Test. The scanner will treat all of the code under that folder as test code and won’t upload issues for it. You can explicitly mark the projects as being non-test code as described in this post.

More generally, it’s better to send logs as text files rather than screen shots as they are much easier to read and search.