我如何使用git作为sonarqube 5.0中的scm提供程序(使用声纳运行器) [英] How can I use git as the scm provider in sonarqube 5.0 ( using sonar-runner )

查看:174
本文介绍了我如何使用git作为sonarqube 5.0中的scm提供程序(使用声纳运行器)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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



我得到了上述错误。我错过了

一些需要配置或配置错误的信息

  08:46:33.723信息 - 传感器SCM传感器... 
08 :46:33.897信息 - 此项目的SCM提供者是:git
08:46:33.898 INFO - 检索SCM责备信息...
08:46:33.915信息 - 要分析的632个文件
08:46:34.377信息 - 作者:PersonIdent [未承诺,但2月3日08:46:34 2015 +0000]
08:46:34.379信息 - 来源提交:null
08 :46:34.377 INFO - 作者:PersonIdent [未承诺,但2月3日08:46:34 2015 +0000]
08:46:34.924信息 - 来源提交:null
信息: - -------------------------------------------------- --------------------
INFO:EXECUTION FAILURE
INFO:---------------- ------------------------------------------- -------------
总时间:1:01.699s
08:46:35.891信息 - 作者:PersonIdent [还没有承诺,2月3日星期二08:46 :35 2015 +0000]
08:46:34.930信息 - 作者:PersonIdent [尚未兑现,2月3日星期二08:46:34 2015 +0000]
08:46:35.930信息 - 来源提交:空
最终内存:27M / 318M
信息:------------------------------- -----------------------------------------
错误:Sonar期间出错跑步者执行
错误:无法执行Sonar
错误:导致:无法指责文件



非常感谢。

解决方案

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



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



运行预览分析时显然不是这种情况:因为这种分析不会将数据推送到服务器,并且只能报告问题在本地出现,那么没有任何问题没有提交更改,因此分析不会失败。



我更新了文档,以使其更清晰。


I following the official support of sonarqub http://docs.sonarqube.org/display/SONAR/SCM+support

and I got the error at above.

did I miss something need to config, or configure wrong

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

thanks very much.

解决方案

This is because when running an analysis, SonarQube expects that all files should be committed.

Indeed, SonarQube assumes that when you run a standard analysis (that pushes data to the server), there should not be any uncommitted changes on a single file of the project, because this would potentially push information that won't be relevant with the real source code on the repository. That's why the analysis will fail.

This is obviously not the case when you run a preview analysis: as this kind of analysis does not push data to the server and only reports issues locally, then it's not a problem to have uncommitted changes and the analysis will therefore not fail.

I've updated the documentation to make this clearer.

这篇关于我如何使用git作为sonarqube 5.0中的scm提供程序(使用声纳运行器)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆