I'm having troubles with the code analysis tool in Visual Studio 2010; I have a class used to manipulate multi-strings, therfore I named my class MultiString
. When I run the code analysis tool I get the warning:
CA1704 : Microsoft.Naming : Correct the spelling of 'Multi' in type name 'MultiString'.
The same problem arises when is use the term multiString
as paramter name or IsMultiApplicationCard
as property name.
Thanks to the topic Code Analysis - CA1704: Correct the spelling of 'Ps' I found out that the term multi is unrecognized by default. Now I wonder why (I'm not a native speaker). Isn't multi a valid word? What word should I use instead? Or would you suggest to use Multiapplication and Multistring?
MultiString
is parsed by Code Analysis intomulti, string
, which are then both checked against the dictionaries.Multi
is a valid prefix for a word, but not a word by itself, i.e.multicolored
is one word, so it should not be writtenmulti colored
. For this reason, the standard dictionary supplied by Microsoft inC:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\CustomDictionary.xml
explicitly specifiesmulti
as unrecognised; that in turn means that addingMulti
to a custom dictionary is ineffective: Code Analysis will still reject it — but not explain why your dictionary entry is ineffective!You best option seems to be to use
Multistring
(as you have noted yourself); second best would be to suppress CA1704 for this particular case; an administrator could presumably edit the standard dictionary, but that would need repeating after any updates, and seems a pretty dirty trick.