Latest Replies
Saturday
Jun072008

FxCop rules that Microsoft has turned on internally

FxCop is an application that analyzes managed code assemblies (code that targets the .NET Framework common language runtime) and reports information about the assemblies, such as possible design, localization, performance, and security improvements.

FxCop 1.36 beta

It is really easy to integrate FxCop checks into your continuous integration project. FxCop has command-line processor, also MSBuild Contrib (set of extra tasks for MSBuild), NAnt Contrib (is it still alive?) and CC.NET dashboard provide support for it out-of-the-box.

Here's the sample for FxCop + MSBuild.Contrib

<Target Name="Report">
  <MakeDir Directories="$(ArtifactDirectory)" />
  <FxCop ToolPath="Resource/Tool/FxCop" 
    ProjectFile="MyProject.fxcop" 
    AnalysisReportFileName="$(ArtifactDirectory)/MyProject.fxcop-result.xml" />    
</Target>

However не все йогурты одинаково полезны not all FxCop rules are equally useful. And after enabling full FxCop scan you might find yourself overwhelmed with all these "Correct the spelling" (FxCop has its own dictionary...) or "Do not nest type...". Do not worry, even Microsoft does not use all the rules. Here's the list of FxCop rules that are used internally within the Developer Department.

Basically they have 2 sets of rules - Public Rule Set and Non-Public Rule Set. First one includes the second one.

Additionally you can write custom rules for the tool, but there is no FxCop Contrib project yet.

« How to run free NCover on a 64 bit machine | Main | [self.todo] - Some things that might be worth checking out »

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>