WARN IF Count > IN SELECT METHODS WHERE NbBCInstructions > ORDER BY NbBCInstructions DESC
// METHODS WHERE NbBCInstructions > are extremely complex and
// should be split in smaller methods
// (except if they are automatically generated by a tool).
WARN IF Count > IN SELECT METHODS WHERE BCCyclomaticComplexity > ORDER BY BCCyclomaticComplexity DESC
// METHODS WHERE BCCyclomaticComplexity > are hard to understand and maintain.
// METHODS WHERE BCCyclomaticComplexity > are extremely complex and should be split
// in smaller methods (except if they are automatically generated by a tool).
WARN IF Count > IN SELECT METHODS WHERE
!NameLike AND
!(IsClassConstructor OR IsConstructor OR
IsPropertyGetter OR IsPropertySetter OR
IsIndexerGetter OR IsIndexerSetter OR
IsEventAdder OR IsEventRemover OR
IsOperator)
WARN IF Count > IN SELECT METHODS WHERE NbParameters > ORDER BY NbParameters DESC
// METHODS WHERE NbParameters > might be painful to call and might degrade performance.
// You should prefer using additional properties/fields to the declaring type to handle
// numerous states. Another alternative is to provide a class or structure dedicated to
// handle arguments passing (for example see the class System.Diagnostics.ProcessStartInfo
// and the method System.Diagnostics.Process.Start(ProcessStartInfo))
WARN IF Count > IN SELECT METHODS WHERE NbVariables > ORDER BY NbVariables DESC
// METHODS WHERE NbVariables > are hard to understand and maintain.
// METHODS WHERE NbVariables > are extremely complex and should be split in
// smaller methods (except if they are automatically generated by a tool).
WARN IF Count > IN SELECT TYPES WHERE NbMethods > ORDER BY LCOM DESC
// TYPES WHERE NbMethods > might be hard to understand and maintain
// but there might be cases where it is relevant to have a high value for NbMethods.
// For example, the System.Windows.Forms.DataGridView standard class has more than methods.
WARN IF Count > IN SELECT TYPES WHERE NbFields > AND !IsEnumeration
// TYPES WHERE NbFields > AND !IsEnumeration might be hard to understand and maintain
// but there might be cases where it is relevant to have a high value for NbFields.
// For example, the System.Windows.Forms.Control standard class has more than fields.
// The value of the metric SizeOfInst might be a better indicator of complex type.
WARN IF Count > IN SELECT TYPES WHERE SizeOfInst > ORDER BY SizeOfInst DESC
// TYPES WHERE SizeOfInst > might degrade performance (depending on the number of
// instances created at runtime) and might be hard to maintain.
// However it is not a rule since sometime there is no alternative
// (the size of instances of the System.Net.NetworkInformation.SystemIcmpV6Statistics
// standard class is bytes).
WARN IF Count > IN SELECT TYPES WHERE LCOM > AND NbFields > AND NbMethods > ORDER BY LCOM DESC
// TYPES WHERE LCOM > AND NbFields > AND NbMethods > might be problematic.
// However, it is very hard to avoid such non-cohesive types. The LCOMHS metric
// is often considered as more efficient to detect non-cohesive types.
WARN IF Count > IN SELECT TYPES WHERE LCOMHS > AND NbFields > AND NbMethods > ORDER BY LCOMHS DESC
// TYPES WHERE LCOMHS > AND NbFields > AND NbMethods > should be avoided.
// Note that this constraint is stronger than the constraint
// TYPES WHERE LCOM > AND NbFields > AND NbMethods >.
SELECT TYPES WHERE DepthOfInheritance > ORDER BY DepthOfInheritance DESC
// TYPES WHERE DepthOfInheritance > might be hard to maintain. However it is not
// a rule since sometime your classes might inherit from tier classes which have a
// high value for depth of inheritance. For example, the average depth of inheritance
// for framework classes which derive from System.Windows.Forms.Control is .
WARN IF Count > IN SELECT TYPES WHERE (SizeOfInst > ) ORDER BY SizeOfInst DESC
// Type with big instances can be problematic
// (Obviously the SizeOfInst metric does not do a deep traverse.
// Any instance reference field wBCl count for bytes.
// It is also unable to cop with generic types properly)
WARN IF Percentage > IN SELECT METHODS WHERE IsUsingBoxing OR IsUsingUnboxing
// With generics, boxing and unboxing should be very rare.
WARN IF Percentage > IN SELECT ASSEMBLIES WHERE NormDistFromMainSeq > ORDER BY NormDistFromMainSeq DESC
WARN IF Count > IN SELECT ASSEMBLIES WHERE RelationalCohesion < OR RelationalCohesion >
// As classes inside an assembly should be strongly related,
// the cohesion should be high. On the other hand, a value which is too high may
// indicate over-coupling. A good range for RelationalCohesion is to .