我有以下内容,我收集的内容应该禁用一部分代码上的stylecop规则。
[SuppressMessage("Microsoft.StyleCop.CSharp.DocumentationRules",
"SA1300:ElementMustBeginWithUpperCaseLetter",
Justification = "External API, no control")]
public void receivedEvent(NV.nConsumeEvent evt)
{
}
但它没有效果,警告一直显示出来。怎么了?
答案 0 :(得分:7)
SA1300似乎属于NamingRules,而不属于DocumentationRules。
所以,正确的抑制是:
[SuppressMessage(
"Microsoft.StyleCop.CSharp.NamingRules",
"SA1300:ElementMustBeginWithUpperCaseLetter",
Justification = "External API, no control")]
public void receivedEvent(NV.nConsumeEvent evt)
{
}