我正在开发一个Xamarin项目。我想用sonarqube检查代码质量。我看到有.net / c#项目的支持。我按照Xamarin的说明here进行了操作。我能够完成前两个步骤Begin和Rebuild。当我执行第三步"结束"
SonarQube.Scanner.MSBuild.exe结束
我收到以下错误
mono /Users/apple/Downloads/sonar-scanner-msbuild-2.3.2.573/SonarQube.Scanner.MSBuild.exe end
SonarQube Scanner for MSBuild 2.3.2
Default properties file was found at /Users/apple/Downloads/sonar-scanner-msbuild-2.3.2.573/SonarQube.Analysis.xml
Loading analysis properties from /Users/apple/Downloads/sonar-scanner-msbuild-2.3.2.573/SonarQube.Analysis.xml
Post-processing started.
SONAR_SCANNER_OPTS is not configured. Setting it to the default value of -Xmx1024m
Calling the SonarQube Scanner...
Execution failed. The specified executable does not exist: /Users/apple/Downloads/sonar-scanner-msbuild-2.3.2.573/sonar-scanner-3.0.3.778\bin\sonar-scanner.bat
The SonarQube Scanner did not complete successfully
13:17:17.361 Creating a summary markdown file...
13:17:17.366 Post-processing failed. Exit code: 1
答案 0 :(得分:2)
目前不支持在非Windows平台上使用扫描仪。
有一个未解决的问题:https://jira.sonarsource.com/browse/SONARMSBRU-319
答案 1 :(得分:2)
现在SonarQube.Scanner.MSBuild.exe支持mac,它可以工作。
MSBuild版本3.0.2的sonarqube不支持非窗口操作系统,现在SonarQube.Scanner.MSBuild.exe 4.0支持mac
声纳C#插件也必须是> 6.6在mac os版本上运行分析。