【发布时间】:2016-09-22 18:31:27
【问题描述】:
我在 SonarQube 分析期间收到警告 Missing blame information for the following files。
[INFO] [22:19:57.714] Sensor SCM Sensor
[INFO] [22:19:57.715] SCM provider for this project is: git
[INFO] [22:19:57.715] 48 files to be analyzed
[INFO] [22:19:58.448] 0/48 files analyzed
[WARN] [22:19:58.448] Missing blame information for the following files:
(snip 48 lines)
[WARN] [22:19:58.449] This may lead to missing/broken features in SonarQube
[INFO] [22:19:58.449] Sensor SCM Sensor (done) | time=735ms
我正在使用 SonarQube 5.5,分析由 Maven 在 Jenkins 作业中对多模块 Java 项目完成。 Git 插件 1.2 已安装。
在 bash shell 中对任何有问题的文件手动运行 git blame 会产生预期的输出。
我发现的相关问题都是关于 SVN,我的问题是 Git。
如何获取有关 Sonarqube 的 git blame 信息?
【问题讨论】:
-
如果我理解您的描述,您有一个使用多个 git 存储库的简单 Jenkins 项目吗?您的声纳项目是 Jenkins 拉取的所有 git 模块的总和。
-
没有。关系 git/jenkins 是一对一的。
-
所以你可以看看this post。我有 Jenkins 在单个 Jenkins 项目中管理多个 git 项目的问题
-
没有。这不是问题的根本原因。所有文件都已提交,但 JGit 对 SonarQube 撒了谎。这是 JGit 中一个 5 年历史、文档完善且未解决的错误。请参阅下面的答案。
标签: java git maven jenkins sonarqube