我真的不确定这里发生了什么。
我有 2 个问题。
首先我安装了扫描仪dotnet tool install --global dotnet-sonarscanner
然后我尝试运行dotnet sonarscanner begin /key:"mykey" /s:"./sonar-project.properties",这给了我以下错误消息:
SonarScanner for MSBuild 4.6
Using the .NET Core version of the Scanner for MSBuild
Loading analysis properties from path\sonar-project.properties
Unable to read the SonarQube analysis settings file 'path\sonar-project.properties'. Please fix the content of this file.
Run Code Online (Sandbox Code Playgroud)
不知道为什么这是因为我从这里复制了我的文件。
然后我这样做dotnet scanner being /key:"mykey" /?,它告诉我我可以使用/d:sonar.verbose=true. 我立即尝试此命令dotnet sonarscanner being /key:"mykey" /d:sonar.verbose=true并遇到此错误消息。
22:39:19.402 22:39:19.399 Unrecognized command line argument: being
22:39:19.403 22:39:19.4 Unrecognized command line argument: d:sonar.verbose=true
22:39:19.404 Expecting at least the following command line argument:
- SonarQube project key
When connecting to a SonarQube server earlier than version 6.1, the following command line arguments are also required:
- SonarQube project name
- SonarQube project version
The full path to a settings file can also be supplied. If it is not supplied, the exe will attempt to locate a default settings file in the same directory as the SonarQube Scanner for MSBuild.
Use '/?' or '/h' to see the help message.
22:39:19.405 Pre-processing failed. Exit code: 1
Run Code Online (Sandbox Code Playgroud)
我也尝试过dotnet sonarscanner begin /key:"mykey" /d:sonar.host.url="https://sonar.qube",但这是同样的事情,它无法识别该参数。
欢迎任何想法。
sonar.login=token
sonar.host=https://sonar.qube
sonar.projectKey=mykey
sonar.projectName=mykey
sonar.sourceEncoding=UTF-8
Run Code Online (Sandbox Code Playgroud)
小智 10
您必须将“/k”更改为“-k”
dotnet sonarscanner begin -k:"proj_key" -d:sonar.host.url="http://myurl"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3090 次 |
| 最近记录: |