Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Jones <jesjones@mono-cvs.ximian.com>2009-07-08 09:29:24 +0400
committerJesse Jones <jesjones@mono-cvs.ximian.com>2009-07-08 09:29:24 +0400
commitdd53320dc8e7f3823fcc8161be1f83bdd1d7f18d (patch)
tree84032c1c506c7a47426659bb019221050d596e07 /gendarme/rules/Gendarme.Rules.Smells/AvoidLargeClassesRule.cs
parent344a391b955589fe36d8601a64b59cdca7f000d7 (diff)
Edited most of the Smells rule descriptions.
svn path=/trunk/mono-tools/; revision=137533
Diffstat (limited to 'gendarme/rules/Gendarme.Rules.Smells/AvoidLargeClassesRule.cs')
-rw-r--r--gendarme/rules/Gendarme.Rules.Smells/AvoidLargeClassesRule.cs15
1 files changed, 10 insertions, 5 deletions
diff --git a/gendarme/rules/Gendarme.Rules.Smells/AvoidLargeClassesRule.cs b/gendarme/rules/Gendarme.Rules.Smells/AvoidLargeClassesRule.cs
index bcc16c79..1b3d6408 100644
--- a/gendarme/rules/Gendarme.Rules.Smells/AvoidLargeClassesRule.cs
+++ b/gendarme/rules/Gendarme.Rules.Smells/AvoidLargeClassesRule.cs
@@ -35,16 +35,21 @@ using Gendarme.Framework.Rocks;
namespace Gendarme.Rules.Smells {
+ // TODO: The summary should explain what a field prefix is.
+ // What do field prefixes have to do with large classes?
+ // The problem text says that the issue with large classes is that "duplicated code will not
+ // be far away". This does not seem to me to be the real issue with large classes. The
+ // problem is more that they are difficult to understand and to maintain.
+ // Can the default be changed?
+
/// <summary>
/// This rule allows developers to measure the classes size. When a
/// class is trying to doing a lot of work, then you probabily have
/// the Large Class smell.
///
- /// The rule counts all fields and if exists common prefixes in fields
- /// it could be a point for extract a new class too. It's quite hard
- /// determine when a class is doing a lot of work, then in following
- /// versions you will can select a maximum number of fields, by
- /// default this amount is 25.
+ /// This rule will fire if a type contains too many fields (over 25 by default) or
+ /// has fields with common prefixes. If the rule does fire then the type should
+ /// be reviewed to see if new classes should be extracted from it.
/// </summary>
/// <example>
/// Bad example: