Can I run SonarQube code analysis for .NET Core (C#) on Linux?

。_饼干妹妹 提交于 2019-12-10 10:29:15

问题


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.

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.)


回答1:


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

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



来源:https://stackoverflow.com/questions/44114876/can-i-run-sonarqube-code-analysis-for-net-core-c-on-linux

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!