在 Sonar 中看不到基于行的 SCM 责备信息

Can't see line based SCM blame infomation in Sonar

我目前正在尝试最新 (5.1.2) SonarQube 中的 SCM blame 功能。我的问题是检索到的 blame 只显示整个文件的最新提交。这意味着一个用户负责整个文件。根据 documentation,应该可以让 SCM 信息基于行——每行都有提交 ID、日期和用户。

我们正在为 SCM 使用 Perforce。

在TeamCity中,它被设置为带有流动参数的maven构建步骤:

-Dsonar.jdbc.url=%system.sonar.staging.jdbc.url%
-Dsonar.jdbc.driverClassName=net.sourceforge.jtds.jdbc.Driver
-Dsonar.jdbc.dialect=postgresql
-Dsonar.jdbc.username=%system.sonar.staging.jdbc.username%
-Dsonar.jdbc.password=%system.sonar.staging.jdbc.password%
-Dsonar.host.url=%system.sonar.staging.host.url%
-Dsonar.scm.forceReloadAll=true
-Dsonar.perforce.port=%vcsroot.port%
-Dsonar.perforce.username=%vcsroot.user%
-Dsonar.perforce.password.secured=%vcsroot.user%
-Dsonar.scm.provider=perforce
-Dsonar.perforce.clientName=%env.P4Workaround%
-Dmaven.scm.perforce.clientspec.name=%env.P4Workaround%d%

我是否需要调整某些东西,或者这可能是 SonarQube 中的错误?

您使用的 SonarQube Perforce 插件是什么版本。这个问题应该在 1.2 版本中得到修复。但是您可能需要从头开始分析项目以查看更改(删除 UI 中的项目然后进行新分析)。