StyleCop.Analyzers : Disable SA1633 & SA1652

标签 stylecop

我已经咨询过configuration documentation,但是找不到任何东西。

我想禁用以下两个规则:

SA1633: The file header is missing or not located at the top of the file.
SA1652: Enable XML documentation output.

我的stylecop.json看起来像这样:
{
  "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
  "settings": {
    "orderingRules": {
      "usingDirectivesPlacement": "outsideNamespace"
    }
  }
}

有任何想法吗?

最佳答案

启用和禁用规则是通过规则集文件而不是配置.json文件完成的。有关使用规则集文件的详细信息,请参见https://msdn.microsoft.com/en-us/library/dd264996.aspx

关于StyleCop.Analyzers : Disable SA1633 & SA1652,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35837242/

相关文章:

c# - 如何在 StyleCop 设置和并发性中的单个 "Custom Rules"节点下组合多个自定义 StyleCop 规则

c# - StyleCop 和 FxCop 规则相互排斥

c# - 变量名不能以 'm_' : StyleCop Rule 1308 - Why is it considered a bad (or not good/standard) practice? 开头

windows-installer - Visual Studio 安装项目启动条件以检查 StyleCop

c# - Format Line 实际上没有格式化。

c# - StyleCop 使用 XDocument/XElement/XAttribute 愉快地创建 Xml

visual-studio-2010 - 强制ReSharper使用StyleCop设置进行代码清理

visual-studio-2010 - 如何让 Stylecop 忽略解决方案中的项目?

.net - MS StyleCop 和 CruiseControl.NET

resharper - StyleCop,优点/缺点