【发布时间】:2016-11-17 04:03:31
【问题描述】:
在 SonarQube 中排除 C# 文件时,仍会为这些排除的文件列出 fxcop 问题。我们尝试了不同的方法来排除 C# 文件,在 SonarQube 服务器设置中以及在 ms 项目文件中,如下所示:
<Compile Include="test.cs">
<SonarQubeExclude>true</SonarQubeExclude>
</Compile>
即使明确排除了此文件,仍会列出有关该文件的 fxcop 问题。不知何故,SonarQube 似乎没有解析问题与该文件相关的信息。这些问题列在正确的模块中,但没有文件的行号,即使构建的原始输出包含 fxop 问题中的行号。
有谁知道如何在 SonarQube 中正确排除 C# 文件,从而不列出 fxcop 问题?
【问题讨论】:
-
您是否尝试在 SonarQube 质量配置文件中关闭 fxcop 规则?
-
好吧,我们需要 fxcop 规则,我们只想排除自动生成的源文件,因为我们无法修复这些文件中的问题。
-
您能否举一个具体示例,其中 FxCop 输出包含正确的文件和行位置,而 SonarQube 未正确导入问题?
-
一个例子是:
d:\Projekte\Model\test.cs(14): warning CA1819: Microsoft.Performance : Ändern Sie 'HINWEISLOG.LOG_ID' so, dass eine Auflistung zurückgegeben wird, oder erstellen Sie daraus eine Methode. [d:\Projekte\testproj.csproj]路径名其实是120个字符左右,我这里已经缩短了。 -
我的报告 [link] (stackoverflow.com/questions/39097875/exclude-list-not-working) 我不知道 FxCop 是问题所在。
标签: sonarqube sonarlint sonarlint-vs