Game Development Reference
In-Depth Information
Another point to note is that FxCop has a fairly rigid spell checker integrated right
into the tool, and will generally complain about any product or company names
that are not a composition of dictionary words. Additionally, there may be some
acronyms you wish to keep in full uppercase, yet FxCop will complain that they
break design guidelines. It is quite easy to configure FxCop to ignore certain cases
of a rule exception, and this can be done by modifying the CustomDictionary.xml
file that resides in the installation folder of FxCop. If you're working in a multi-
developer environment, be sure to add this file to source control so that all developers
have access to the custom configuration you specify.
Building Custom Rules
You may be reading all the built-in rules available for FxCop and thinking that
they enforce all the policies you have. If this is the case, you do not need to extend
the rules engine. However, some projects require the enforcement of custom rules,
in which case you will need to extend the rules engine in FxCop. The latter half of
this chapter covers building custom FxCop rules and enabling them for enforce-
ment in your projects.
The first thing to do is to create a new C#.NET class library project and reference
the FxCop SDK. Navigate to the installation folder of the FxCop tool, and refer-
ence the FxCopSdk and Microsoft.Cci assemblies. Figure 13.7 shows the assembly
reference screen that should resemble what you see.
Figure 13.7 Dialog shown when referencing the FxCop SDK.
Search Nedrilad ::




Custom Search