FxCop rules contest.

I won Visual Assist X (1-user license) at Codeproject (article contest) and I really don’t need it. So here is the deal, the one that will send me most of rules for FxCop (Design rules preferred) will get this Visual Assist X (1-user license). All of the rules (including their sender) will be published here.  

I mean code that implement new ruls such as ... http://tatochip.com/archive/2004/07/19/2678.aspx

Published Friday, August 27, 2004 9:57 PM by nattYGUR

Comments

# re: FxCop rules contest.

Friday, August 27, 2004 2:33 PM by PravinKumar
DesignRules in FxCop
------------------------
Abstract types should not have public constructors
Assemblies are marked CLSCompliant
Assemblies have strong names
Assemblies have version numbers
Assemblies should have the ComVisible attribute
Attributes should have accessors for all arguments
Attributes specify AttributeUsage
Avoid having a namespace with a small number of types
Avoid passing value types as ref (pointer) parameters
Avoid using out parameters
Consider having only one dimensional indexers
Consider passing base types as parameters
Consider replacing methods with properties
Consider replacing repeated arguments with a parameter array argument
Default Parameters are not used
Enumeration should have the FlagsAttribute attribute
Enumerations should use a CLS-compliant integral type as the underlying type
Enumerations should use System.Int32 as the underlying type
Event handlers return void
Events have two parameters
Exceptions require multiple constructors
Explicit method implementations in unsealed classes should provide alternate methods with protected accessibility
Externally visible nested types should not be used
ICloneable implementations have strongly typed members
ICollection implementations have strongly typed members
IComparable implementations override operators
IComparable implementations override System.Object.Equals
IEnumerator implementations have strongly typed members
IList implementations have strongly typed members
Interface definitions should not be empty
Members marked with the ObsoleteAttribute attribute should provide a value for ObsoleteAttribute.Message
Only integral values or strings should be used for indexers
Properties should not be write-only
Reference types are not passed as ref (pointer) parameters
Reference types should not override the equality operator
Sealed types do not declare protected members
Sealed types do not declare virtual members
System.Exception and System.SystemException are not caught
The .NET event model should be used whenever appropriate
The first parameter of an event is a System.Object type
The second parameter of an event is a System.EventArgs type
Types belong in a namespace
Types do not have externally visible instance fields
Types marked with the ObsoleteAttribute attribute should provide a value for ObsoleteAttribute.Message
Types overriding addition and subtraction operators should override the equality operator
Types that allocate unmanaged resources implement IDisposable
Types that implement ISerializable are marked Serializable
Types with only static members should be sealed (NotInheritable)
Types with only static members should not have public or protected constructors
URI parameters should be of type System.Uri rather than string
URI properties should be of type System.Uri rather than string
URI return values should be of type System.Uri rather than string

# re: FxCop rules contest.

Friday, August 27, 2004 4:55 PM by nomad
FXCop RULES!

# Wanna win a free Visual Assist License?

Tuesday, August 31, 2004 6:35 PM by TrackBack

# re: FxCop rules contest.

Sunday, September 12, 2004 7:03 AM by Ram
a great FXCop Rule Example:
http://download.microsoft.com/download/d/3/1/d31fff33-fd97-488f-9bbd-4b7402905716/Bugslayer0409.exe
NJoy

ramStern@gmail.com

# re: FxCop rules contest.

Wednesday, September 15, 2004 9:29 PM by David M. Kean
I have started posting new rules (such as internal Microsoft rules) on my blog if you are interested...

http://managedfromdownunder.blogspot.com/

Leave a Comment

(required) 
(required) 
(optional)
(required)