从资源中的字符串中消除StyleCop错误
|
我收到数十个CA1703:Microsoft.Naming错误
resource Resources.resx\', referenced by name \'code\', correct the spelling of
\'addfile\' in string value \'#set ...\'
这很荒谬,因为StyleCop正在对代码进行拼写检查,以使拼写错误。
如何抑制此StyleCop错误?
我尝试从此提示中使用SuppressMessage,但再次遇到错误-Error 70 The type or namespace name \'SuppressMessageAttribute\' could not be found (are you missing a using directive or an assembly reference?)
[SuppressMessage(\"Microsoft.StyleCop.CSharp.DocumentationRules\", \"CA1703:Microsoft.Naming\", Justification = \"This is tcl script, spelling check is meaningless\")]
public static void Generate(string clientDirectory, string topLevelTestbench, string doFileName)
没有找到相关结果
已邀请:
3 个回复
骇毖煽洁铂
->
上下文菜单项以自动添加针对其中的问题正确填充的
属性。您的资源文件。 (仅使用System.Diagnostics.CodeAnalysis使用指令添加是不够的,因为样本属性实例中的类别或检查ID都不适合CA1703规则。)
栖很钾是狠
确保可以找到SuppressMessage类?
河饶办斜施