我正在试验 Visual Studio Code Remote。我想使用SonarScanner进行代码质量分析。我已经按照指南在主机上安装了该工具,但是当我尝试从容器中使用它时,我得到:
# dotnet sonarscanner -h
No executable found matching command "dotnet-sonarscanner"
在主机上:
$ dotnet sonarscanner -h
SonarScanner for MSBuild 4.7.1
Using the .NET Core version of the Scanner for MSBuild
Usage:
SonarScanner.MSBuild [begin|end] /key:project_key [/name:project_name] [/version:project_version] [/d:sonar.key=value] [/s:settings_file]
When executing the begin phase, at least the project key must be defined.
Other properties can dynamically be defined with '/d:'. For example, '/d:sonar.verbose=true'.
A settings file can be used to define properties. If no settings file path is given, the file SonarQube.Analysis.xml in the installation directory will be used.
Only the token should be passed during the end phase, if it was used during the begin phase.