2

I'm trying to execute and report a SonarQube code analysis (without test coverage for now) against a .NET Core project from a Linux build agent.

I downloaded sonar-scanner from this page, and trying to run the report with the following command (the server url is set up in the configuration).

sonar-scanner -Dsonar.projectKey="MyProject" -Dsonar.projectName="MyProject" -Dsonar.sources=$PWD

The execution seems to be successful, I uploaded the full output to this gist.

However, if I go to the project dashboard on the SonarQube site, I don't see any issues or code smells whatsoever.

enter image description here

I wanted to make sure that my project contains at least one error, so I added a goto statement to one of the source files, and checked if that warning is enabled in our Quality Profile, but I still get no issue.
(The sources files themselves are picked up correctly, I can see the list of files and all the source in SonarQube.)

Am I doing something wrong, or is this not expected to work?

(Just to clarify that this is not a duplicate of the existing question about .NET Core: the same command I showed here works for me on Windows, it only does not work on Linux.)

Mark Vincze
  • 7,737
  • 8
  • 42
  • 81
  • 1
    Possible duplicate of [Running SonarQube against an ASP.Net Core solution/project](https://stackoverflow.com/questions/37841439/running-sonarqube-against-an-asp-net-core-solution-project) – Martin Ullrich May 22 '17 at 14:03

1 Answers1

0

This has now been fixed so you should see an error if run this way.

See https://github.com/SonarSource/sonar-csharp/issues/535

Anttu
  • 1,076
  • 1
  • 10
  • 21