Game Development Reference
In-Depth Information
Figure 13.1 Screen capture of an FxCop project with an assembly targeted for analysis.
Some rules may not be applicable or favorable to a developer, which warrants the
disabling of the rule. For example, even though the .NET runtime implicitly ini-
tializes all managed memory to a default value, many developers feel that all vari-
ables should be explicitly initialized even when the initialized value and the default
value for that data type are the same. Yes, doing so can be viewed as a redundant
step as there is a performance rule that prohibits unnecessary initialization, yet
other developers feel that explicit initialization is necessary in the spirit of main-
tainability. Figure 13.2 shows a screen capture of the rules configuration tab.
Analyzing Your Project
Once your FxCop project has been created and the target assemblies have been
specified, it is time to perform analysis. You do so by clicking the Analyze button
shown in Figure 13.3.
The most advisable approach for fixing guideline violations is to sort the violations
by message level with the errors at the top of the list, and to fix each violation one
by one. It should be noted that there are two types of errors: regular and critical.
Search Nedrilad ::




Custom Search