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:
dotnet-sonarscanner begin /k:“tsr-sample” /d:sonar.host.url=“http://192.192.1.238:5005” /d:sonar.login=“ba48cd78c13e1ea21b2579d9bd7b2b50b4554d2e”
dotnet build
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.
@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.