Visual Studio 2012
CA1704:IdentifiersShouldBeSpelledCorrectly
|
类型名 |
IdentifiersShouldBeSpelledCorrectly |
|
CheckId |
CA1704 |
|
类别 |
Microsoft.Naming |
|
是否重大更改 |
是 |
如何:自定义代码分析字典。
-
将不应造成冲突的单词添加到 Dictionary/Words/Recognized 路径下。
-
将应造成冲突的单词添加到 Dictionary/Words/Unrecognized 路径下。
-
CA1726:使用首选词条。
-
将首字母缩写词大小写规则的异常添加到 Dictionary/Acronyms/CasingExceptions 路径下。
下面是自定义字典文件的结构示例。
<Dictionary> <Words> <Unrecognized> <Word>cb</Word> </Unrecognized> <Recognized> <Word>stylesheet</Word> <Word>GotDotNet</Word> </Recognized> <Deprecated> <Term PreferredAlternate="EnterpriseServices">ComPlus</Term> </Deprecated> </Words> <Acronyms> <CasingExceptions> <Acronym>CJK</Acronym> <Acronym>Pi</Acronym> </CasingExceptions> </Acronyms> </Dictionary>