Replace IntegerProperty
This commit is contained in:
@ -14,8 +14,10 @@ public class AvoidDeeplyNestedIfStmtsRule extends AbstractApexRule {
|
||||
private int depth;
|
||||
private int depthLimit;
|
||||
|
||||
private static final IntegerProperty PROBLEM_DEPTH_DESCRIPTOR = new IntegerProperty("problemDepth",
|
||||
"The if statement depth reporting threshold", 1, 25, 3, 1.0f);
|
||||
private static final IntegerProperty PROBLEM_DEPTH_DESCRIPTOR
|
||||
= IntegerProperty.builder("problemDepth")
|
||||
.desc("The if statement depth reporting threshold")
|
||||
.min(1).max(25).defalt(3).uiOrder(1.0f).build();
|
||||
|
||||
public AvoidDeeplyNestedIfStmtsRule() {
|
||||
definePropertyDescriptor(PROBLEM_DEPTH_DESCRIPTOR);
|
||||
|
@ -37,8 +37,10 @@ import net.sourceforge.pmd.properties.IntegerProperty;
|
||||
*/
|
||||
public class StdCyclomaticComplexityRule extends AbstractApexRule {
|
||||
|
||||
public static final IntegerProperty REPORT_LEVEL_DESCRIPTOR = new IntegerProperty("reportLevel",
|
||||
"Cyclomatic Complexity reporting threshold", 1, 30, 10, 1.0f);
|
||||
public static final IntegerProperty REPORT_LEVEL_DESCRIPTOR
|
||||
= IntegerProperty.builder("reportLevel")
|
||||
.desc("Cyclomatic Complexity reporting threshold")
|
||||
.min(1).max(30).defalt(10).uiOrder(1.0f).build();
|
||||
|
||||
public static final BooleanProperty SHOW_CLASSES_COMPLEXITY_DESCRIPTOR = new BooleanProperty(
|
||||
"showClassesComplexity", "Add class average violations to the report", true, 2.0f);
|
||||
|
Reference in New Issue
Block a user