CA2204: Literals should be spelled correctly
|
TypeName |
LiteralsShouldBeSpelledCorrectly |
|
CheckId |
CA2204 |
|
Category |
Microsoft.Usage |
|
Breaking Change |
Non Breaking |
This rule checks a literal string that is passed as a value to a parameter or property when one or more of the following cases is true:
-
The LocalizableAttribute attribute of the parameter or property is set to true.
-
The parameter or property name contains "Text", "Message", or "Caption".
-
The name of the string parameter that is passed to a Console.Write or Console.WriteLine method is either "value" or "format".
This rule parses the literal string into words, tokenizing compound words, and checks the spelling of each word/token. For information about the parsing algorithm, see CA1704: Identifiers should be spelled correctly.
By default, the English (en) version of the spelling checker is used.
To fix a violation of this rule, correct the spelling of the word or add the word to a custom dictionary. For information about how to use custom dictionaries, see How to: Customize the Code Analysis Dictionary.