Sunday, October 31, 2004

FxCop 1.312 Released!

FxCop 1.312 Released!


Major features of this release
-Simplification of report xml.
-New Fix Categories: Each message is marked to indicate if the suggested fix will constitute a breaking change for previously shipped code.
-User Interface Improvements: windowing behavior has been made more consistent
-Auto Update: Sign up to get notified when a new version of FxCop is available.

New Rules
-Avoid excessive parameters on generic types
-Collections should implement generic interface
-Do not declare static members on generic types
-Do not expose generic lists
-Do not nest generic types in member signatures
-Enums should have zero value
-Generic methods should provide type parameter
-Members should not expose certain concrete types
-Types should not extend certain base types
-Use generic event handler instances
-Use generics where appropriate

-Avoid overloads in ComVisible Interfaces
-Call GetLastError immediately after PInvoke
-Com visible base types should be ComVisible
-Do not use idle process priority
-Do not use times that prevent power state changes
-Compound words should be cased correctly
-Do not name enum values ‘Reserve’’
-Resource string compound words should be cased correctly

-Avoid calls that box value types
-Avoid costly calls where possible
-Avoid unnecessary string creation
-Avoid unused parameters
-Do not cast unnecessarily
-Do not ignore method results
-Do not initialize unnecessarily
-Remove unused locals
-Use literals where appropriate

-Avoid testing for floating point equality
-PInvoke declarations should be portable
-Catch non-CLSCompliant exceptions in general handlers
-Review sql queries for security vulnerabilities

-Call base class methods on ISerializable types
-Do not dispose objects multiple times
-Do not raise reserved exception types
-Implement ISerializable correctly
-Implement serialization methods correctly
-Literals should be spellect correctly
-Mark all non-serializable fields
-Provide deserialization methods for optional fields
-Rethrow to preserve stack details
-Review Boolean assignment evaluations
-Use managed equivalents of win32 api

Migrating Custom Rules
Please see the readme at for more details on how to migrate custom rules.

This Blog Hosted On:

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?