我已经咨询过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/