如何在 SonarQube 中重用 fxcop.xml

How to reuse fxcop.xml in SonarQube

Nant/Jenkins 对 FxCop 进行了 运行 分析。然后触发 SonarQube C# 分析,并成功执行。

我们想重新使用 Jenkins 的 fxcop.xml 结果文件用于 Sonar 的分析。

我们试过这个配置,但没有成功:

sonar.fxcop.mode=reuseReport
sonar.fxcop.reportsPaths=fxcop.xml

SonarQube 正在请求 FxCopCmd.exe 的路径。如果指定,Sonar 将再次 运行ning FxCop 分析。我们不希望那样。

根据 this thread sonar.fxcop.mode 不再受支持。

引自线程:

You can skip the execution of FxCop on a specific project by using another Quality Profile for it, that does not contain any FxCop rule.

Indeed, it is important for the evolution of a project's technical debt to be trackable over time. Changes in the rules that are applied during the analysis has an obvious impact on the technical debt, and therefore should be tracked.

The "sonar.fxcop.mode" property did not allow that, and was therefore removed. For example, with the reuseReports mode, you could launch just 1 or 2 rules, whereas in SonarQube all FxCop rules are enabled. Skipping the FxCop analysis fully when all FxCop rules are enabled in SonarQube is obviously deceiving.

The reuseReports mode should not be required, as SonarQube is able to drive FxCop's execution.

我想 FxCop 应该直接从 Sonarqube 启动。