+ "and which should be re-factored to be split in several classes.</p>")
public class ClassComplexityCheck extends SquidCheck {
- @RuleProperty(description = "Maximum complexity allowed.", defaultValue = "200")
- private Integer max;
+ public static final int DEFAULT_MAX = 200;
+
+ @RuleProperty(description = "Maximum complexity allowed.", defaultValue = "" + DEFAULT_MAX)
+ private Integer max = DEFAULT_MAX;
@Override
public void visitClass(SourceClass sourceClass) {
+ "'inheritance' when 'composition' would suit better.</p>")
public class DITCheck extends SquidCheck {
- @RuleProperty(description = "Maximum depth of the inheritance tree.", defaultValue = "5")
- private Integer max;
+ public static final int DEFAULT_MAX = 5;
+
+ @RuleProperty(description = "Maximum depth of the inheritance tree.", defaultValue = "" + DEFAULT_MAX)
+ private Integer max = DEFAULT_MAX;
@Override
public void visitClass(SourceClass sourceClass) {
+ "so the risk of regression increases exponentially.</p>")
public class MethodComplexityCheck extends SquidCheck {
- @RuleProperty(description = "Maximum complexity allowed.", defaultValue = "10")
- private Integer max;
+ public static final int DEFAULT_MAX = 10;
+
+ @RuleProperty(description = "Maximum complexity allowed.", defaultValue = "" + DEFAULT_MAX)
+ private Integer max = DEFAULT_MAX;
@Override
public void visitMethod(SourceMethod sourceMethod) {