Changed defaults

This commit is contained in:
oowekyala
2017-08-07 22:08:58 +02:00
parent a712f5cc5c
commit c9783209f4
2 changed files with 5 additions and 3 deletions

View File

@ -30,10 +30,10 @@ import net.sourceforge.pmd.lang.rule.properties.IntegerProperty;
public class CyclomaticComplexityRule extends AbstractJavaMetricsRule {
private static final IntegerProperty CLASS_LEVEL_DESCRIPTOR = new IntegerProperty(
"classReportLevel", "Total class complexity reporting threshold", 1, 200, 40, 1.0f);
"classReportLevel", "Total class complexity reporting threshold", 1, 600, 80, 1.0f);
private static final IntegerProperty METHOD_LEVEL_DESCRIPTOR = new IntegerProperty(
"methodReportLevel", "Cyclomatic complexity reporting threshold", 1, 30, 10, 1.0f);
"methodReportLevel", "Cyclomatic complexity reporting threshold", 1, 50, 10, 1.0f);
private static final Map<String, MetricVersion> VERSION_MAP;

View File

@ -25,7 +25,9 @@
details on the calculation, see the documentation of the [Cyclo metric](/pmd_java_metrics_index.html#cyclomatic-complexity-cyclo).
Generally, numbers ranging from 1-4 denote low complexity, 5-7 denote moderate complexity, 8-10 denote
high complexity, and 11+ is very high complexity.
high complexity, and 11+ is very high complexity. By default, this rule reports methods with a complexity >= 10.
Additionnally, classes with many methods of moderate complexity get reported as well once the total of their
methods' complexities reaches 80, even if none of the methods was directly reported.
Reported methods should be broken down into several smaller methods. Reported classes should probably be broken down
into subcomponents.