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

1 Comment

  • 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

Comments have been disabled for this content.