Sunday, October 31, 2004

FxCop 1.312 Released!

FxCop 1.312 Released!


Download


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
========
Design
-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

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

Performance
-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

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

Usage
-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 http://www.gotdotnet.com/team/fxcop/Misc/gotdotnetstyle.aspx?url=1.312_readme.mht for more details on how to migrate custom rules.




This Blog Hosted On: http://www.DotNetJunkies.com/


Comments: Post a Comment

<< Home

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