SonarQube未能分析我的解决方案

问题描述 投票:1回答:2

我正在尝试为我的开源项目设置SonarQube,但我很难用我的CI(AppVeyor)自动化该过程。

SonarQube分析失败,没有更多细节,除了我必须查看日志。但我不知道在哪里找到它们。我试过在AppVeyor VM上做远程,但我没有任何相关的东西。登录.sonarqube文件夹不包含AppVeyor输出上打印的信息。

由于这是我第一次尝试将SonarQube添加到项目中,我不知道在哪里查看。我在互联网上搜索错误没有成功。

这是我在AppVeyor输出上得到的错误的一部分:

[exec] 14:14:38.867 INFO: Analysis report generated in 421ms, dir size=436 KB
[exec] 14:14:39.012 INFO: Analysis reports compressed in 143ms, zip size=230 KB
[exec] 14:14:39.012 INFO: Analysis report generated in C:\projects\markify\src\.sonarqube\out\.sonar\scanner-report
[exec] 14:14:39.012 DEBUG: Upload report
[exec] 14:14:39.225 DEBUG: POST 403 https://sonarcloud.io/api/ce/submit?projectKey=Markify&projectName=Markify | time=212ms
[exec] 14:14:39.234 INFO: ------------------------------------------------------------------------
[exec] 14:14:39.234 INFO: EXECUTION FAILURE
[exec] ##teamcity[buildProblem description='Analysis Failed: Check Build Log']]
[exec] 14:14:39.234 INFO: ------------------------------------------------------------------------
[exec] 14:14:39.234 INFO: Total time: 35.907s
[exec] 14:14:39.324 ERROR: Error during SonarQube Scanner execution
[exec] 14:14:39.324 ERROR: Insufficient privileges
[exec] 14:14:39.324 ERROR: 
[exec] 14:14:39.324 ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
[exec] 14:14:39.323 INFO: Final Memory: 69M/168M
[exec] 14:14:39.324 INFO: ------------------------------------------------------------------------
[exec] 14:14:39.324 DEBUG: Execution getVersion
[exec] 14:14:39.325 DEBUG: Execution stop
[exec] Process returned exit code 1
[exec] The SonarQube Scanner did not complete successfully
[exec] 14:14:39.535  Creating a summary markdown file...
[exec] 14:14:39.537  Post-processing failed. Exit code: 1
[exec] [EndPhase] : Failed. Check Log
[exec] ##teamcity[buildProblem description='sonar-scanner return non 0 error code']]
[exec] [CxxSonarQubeMsbuidRunner] Failed analyze project, check log
BUILD FAILED

这里是分析失败的构建:https://ci.appveyor.com/project/Takumii/markify/build/1.0.501

该项目可以在这里找到:https://github.com/Julien-Pires/Markify/tree/sonarqube

我正在使用NAnt来执行Sonarqube分析。所有用于Sonarqube的参数都可以在这里找到:https://github.com/Julien-Pires/Markify/blob/sonarqube/default.build

sonarqube static-analysis sonarcloud
2个回答
0
投票
 [exec] 14:14:39.324 ERROR: Error during SonarQube Scanner execution
 [exec] 14:14:39.324 ERROR: Insufficient privileges

这表明了许可问题,正如我detailed before in this answer。请参阅“Authorization / Group”以检查您是否具有发布SonarQube分析的必要权限。


0
投票

请确保您拥有对试图发布分析报告的sonarqube服务器的必要访问权限。

© www.soinside.com 2019 - 2024. All rights reserved.