我试图使用System.Diagnostics.CodeAnalysis.SuppressMessage属性来阻止sonarqube在代码库中的特定方法上提出这个问题。我不太清楚抑制消息属性应该采取什么样的形式。我在没有运气的情况下尝试了几种不同的方法。
[SuppressMessage("csharpsquid", "S1871:Two branches in the same conditional structure should not have exactly the same implementation")]
public static string SomeMethod(string input)以下是问题文档的链接:http://dist.sonarsource.com/plugins/csharp/rulesdoc/0.9.0-RC/S1871.html
用途:声纳-夏普-插件-5.3.2
发布于 2016-10-31 13:51:15
SonarQube C#插件版本5.4.0.464解决了这个问题。看看这张票:https://jira.sonarsource.com/browse/SONARCS-613
https://stackoverflow.com/questions/40338610
复制相似问题