FxCop & Robbers…

If you write .NET code and aren’t using FxCop, you should start. It really does help you to produce better code and learn best practices as well. I’m not going to go into a long diatribe about how or why you should use it, plenty of other folks have done that. Rather, I wanted to mention an issue that I had as I began to use it…

I noticed a large number of errors, thus a large part of my time, were due to FxCop not recognizing my company name, project name, or other words that were actually correct. While I appreciate the concern, I HATE false positives and resign ed myself to simply ignoring spelling in general – not something I wanted to do but I felt it was the lesser of the two evils. Fortunately, I’m ever the “Googler” and managed to dig up a little feature I was unaware of – CustomDictionary.xml. Basically, you follow their format and can have certain acronyms/words allowed and even disallowed based on this handy little file. So I’ve added it to my BuildSystem [sorry link was to old site] so that it is now at both the repository level and at the project level.

CustomDictionary.xml format:

<?xml version=”1.0″?>
<Dictionary>
<Words>
<Recognized>
<Word>YourCompany</Word>
<Word>MyProject</Word>
</Recognized>
<Deprecated />
<Inappropriate />
</Words>
<Acronyms>
<CasingExceptions/>
</Acronyms>
</Dictionary>

Advertisements

Comments are closed.

%d bloggers like this: