如何在sonarqube 5.0中使用git作为scm提供者(使用声纳 - 跑步者)

Han*_*bel 10 git sonarqube

我遵循sonarqub的官方支持 http://docs.sonarqube.org/display/SONAR/SCM+support

我在上面得到了错误.

我错过了需要配置或配置错误的东西

08:46:33.723 INFO - Sensor SCM Sensor...
08:46:33.897 INFO - SCM provider for this project is: git
08:46:33.898 INFO - Retrieve SCM blame information...
08:46:33.915 INFO - 632 files to be analyzed
08:46:34.377 INFO - Author: PersonIdent[Not Committed Yet, , Tue Feb 3 08:46:34 2015 +0000]
08:46:34.379 INFO - Source commit: null
08:46:34.377 INFO - Author: PersonIdent[Not Committed Yet, , Tue Feb 3 08:46:34 2015 +0000]
08:46:34.924 INFO - Source commit: null
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 1:01.699s
08:46:35.891 INFO - Author: PersonIdent[Not Committed Yet, , Tue Feb 3 08:46:35 2015 +0000]
08:46:34.930 INFO - Author: PersonIdent[Not Committed Yet, , Tue Feb 3 08:46:34 2015 +0000]
08:46:35.930 INFO - Source commit: null
Final Memory: 27M/318M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: Unable to blame file
Run Code Online (Sandbox Code Playgroud)

非常感谢.

Fab*_*eam 13

这是因为在运行分析时,SonarQube期望应提交所有文件.

实际上,SonarQube假设当您运行标准分析(将数据推送到服务器)时,项目的单个文件不应该有任何未提交的更改,因为这可能会推送与真实无关的信息.存储库中的源代码.这就是分析失败的原因.

当您运行预览分析时,情况显然不是这样:由于此类分析不会将数据推送到服务器并且仅在本地报告问题,因此进行未提交的更改并不会出现问题,因此分析不会失败.

我已经更新了文档以使其更清晰.