Я действительно не уверен, что здесь происходит.
У меня 2 вопроса.
- SonarScanner не принимает аргументы, которые говорят мне, что я могу использовать
- SonarScanner не распознает мой файл свойств.
Что я сделал:
Сначала я установил сканер 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.
Не уверен, почему это так, потому что я скопировал свой файл из здесь .
Затем я делаю 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
Я также пытаюсь dotnet sonarscanner begin /key:"mykey" /d:sonar.host.url="https://sonar.qube"
, но это то же самое, он не может распознать аргумент.
Любые идеи приветствуются.
Мой sonar-project.properties
sonar.login=token
sonar.host=https://sonar.qube
sonar.projectKey=mykey
sonar.projectName=mykey
sonar.sourceEncoding=UTF-8