Make analysis code stop warning about a specific variable name

I have a variable called allowedZHs . ZH is an abbreviation for the domain. ZHs is its plural form. I would like to continue to use this plural form. I find it more expressive than the β€œregular” form of β€œ ZHs ”.
I tried to say Code Analysis by adding the Code Analysis Dictionary . This works fine for a single " ZH " form, but it does not work for a plural form.
I still get warning CA1704 .

I tried to add it as a recognized word and add it as an abbreviated paragraph:

 <Dictionary> <Words> <Recognized> <Word>ZHs</Word> </Recognized> </Words> <Acronyms> <CasingExceptions> <Acronym>ZHs</Acronym> </CasingExceptions> </Acronyms> </Dictionary> 

Any ideas what I'm doing wrong?

+7
source share
1 answer

The bad news is that there is no way to use the dictionary to allow multiple abbreviations in older versions of FxCop. (See, for example, Kevin Blasco's answer at http://social.msdn.microsoft.com/Forums/eu/vstscode/thread/56af1337-895d-47ec-ac72-71cf0316ea60. ). The good news is that the version that comes with VS 2012 allows them to be excluded from -the-box, so you don’t even have to touch the dictionary when you are eventually updated.

+3
source

All Articles