Added overloads of setProperty for multivalued properties
This commit is contained in:
@ -4,8 +4,6 @@
|
||||
|
||||
package net.sourceforge.pmd.lang.apex.rule.apexunit;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTModifierNode;
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTUserClass;
|
||||
import net.sourceforge.pmd.lang.apex.ast.ApexNode;
|
||||
@ -21,7 +19,7 @@ import apex.jorje.services.Version;
|
||||
public abstract class AbstractApexUnitTestRule extends AbstractApexRule {
|
||||
|
||||
public AbstractApexUnitTestRule() {
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Bug Risk"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Bug Risk");
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 100);
|
||||
setProperty(CODECLIMATE_BLOCK_HIGHLIGHTING, false);
|
||||
}
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
package net.sourceforge.pmd.lang.apex.rule.complexity;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTBreakStatement;
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTContinueStatement;
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTDoLoopStatement;
|
||||
@ -45,7 +43,7 @@ public abstract class AbstractNcssCountRule extends AbstractStatisticalApexRule
|
||||
this.nodeClass = nodeClass;
|
||||
|
||||
setProperty(MINIMUM_DESCRIPTOR, 1000d);
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Complexity"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Complexity");
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 100);
|
||||
setProperty(CODECLIMATE_BLOCK_HIGHLIGHTING, false);
|
||||
}
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
package net.sourceforge.pmd.lang.apex.rule.complexity;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTIfBlockStatement;
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTUserClass;
|
||||
import net.sourceforge.pmd.lang.apex.rule.AbstractApexRule;
|
||||
@ -22,7 +20,7 @@ public class AvoidDeeplyNestedIfStmtsRule extends AbstractApexRule {
|
||||
public AvoidDeeplyNestedIfStmtsRule() {
|
||||
definePropertyDescriptor(PROBLEM_DEPTH_DESCRIPTOR);
|
||||
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Complexity"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Complexity");
|
||||
// Note: Remedy needs better OO design and therefore high effort
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 200);
|
||||
setProperty(CODECLIMATE_BLOCK_HIGHLIGHTING, false);
|
||||
|
@ -6,8 +6,6 @@ package net.sourceforge.pmd.lang.apex.rule.complexity;
|
||||
|
||||
import static apex.jorje.semantic.symbol.type.AnnotationTypeInfos.IS_TEST;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTUserClass;
|
||||
|
||||
/**
|
||||
@ -19,7 +17,7 @@ public class ExcessiveClassLengthRule extends ExcessiveLengthRule {
|
||||
super(ASTUserClass.class);
|
||||
setProperty(MINIMUM_DESCRIPTOR, 1000d);
|
||||
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Complexity"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Complexity");
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 150);
|
||||
setProperty(CODECLIMATE_BLOCK_HIGHLIGHTING, false);
|
||||
}
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
package net.sourceforge.pmd.lang.apex.rule.complexity;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTMethod;
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTParameter;
|
||||
import net.sourceforge.pmd.util.NumericConstants;
|
||||
@ -19,7 +17,7 @@ public class ExcessiveParameterListRule extends ExcessiveNodeCountRule {
|
||||
public ExcessiveParameterListRule() {
|
||||
super(ASTMethod.class);
|
||||
setProperty(MINIMUM_DESCRIPTOR, 4d);
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Complexity"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Complexity");
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 50);
|
||||
setProperty(CODECLIMATE_BLOCK_HIGHLIGHTING, false);
|
||||
}
|
||||
|
@ -7,8 +7,6 @@ package net.sourceforge.pmd.lang.apex.rule.complexity;
|
||||
import static apex.jorje.semantic.symbol.type.ModifierTypeInfos.PUBLIC;
|
||||
import static apex.jorje.semantic.symbol.type.ModifierTypeInfos.STATIC;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTFieldDeclarationStatements;
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTMethod;
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTUserClass;
|
||||
@ -33,7 +31,7 @@ public class ExcessivePublicCountRule extends ExcessiveNodeCountRule {
|
||||
public ExcessivePublicCountRule() {
|
||||
super(ASTUserClass.class);
|
||||
setProperty(MINIMUM_DESCRIPTOR, 20d);
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Complexity"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Complexity");
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 150);
|
||||
setProperty(CODECLIMATE_BLOCK_HIGHLIGHTING, false);
|
||||
}
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
package net.sourceforge.pmd.lang.apex.rule.complexity;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTMethod;
|
||||
import net.sourceforge.pmd.stat.DataPoint;
|
||||
import net.sourceforge.pmd.util.NumericConstants;
|
||||
@ -23,7 +21,7 @@ public class NcssConstructorCountRule extends AbstractNcssCountRule {
|
||||
public NcssConstructorCountRule() {
|
||||
super(ASTMethod.class);
|
||||
setProperty(MINIMUM_DESCRIPTOR, 20d);
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Complexity"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Complexity");
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 50);
|
||||
setProperty(CODECLIMATE_BLOCK_HIGHLIGHTING, false);
|
||||
}
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
package net.sourceforge.pmd.lang.apex.rule.complexity;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTMethod;
|
||||
import net.sourceforge.pmd.stat.DataPoint;
|
||||
import net.sourceforge.pmd.util.NumericConstants;
|
||||
@ -23,7 +21,7 @@ public class NcssMethodCountRule extends AbstractNcssCountRule {
|
||||
public NcssMethodCountRule() {
|
||||
super(ASTMethod.class);
|
||||
setProperty(MINIMUM_DESCRIPTOR, 40d);
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Complexity"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Complexity");
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 50);
|
||||
setProperty(CODECLIMATE_BLOCK_HIGHLIGHTING, false);
|
||||
}
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
package net.sourceforge.pmd.lang.apex.rule.complexity;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTFieldDeclaration;
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTMethod;
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTUserClass;
|
||||
@ -28,7 +26,7 @@ public class NcssTypeCountRule extends AbstractNcssCountRule {
|
||||
public NcssTypeCountRule() {
|
||||
super(ASTUserClass.class);
|
||||
setProperty(MINIMUM_DESCRIPTOR, 500d);
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Complexity"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Complexity");
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 250);
|
||||
setProperty(CODECLIMATE_BLOCK_HIGHLIGHTING, false);
|
||||
}
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
package net.sourceforge.pmd.lang.apex.rule.complexity;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Stack;
|
||||
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTBooleanExpression;
|
||||
@ -79,7 +78,7 @@ public class StdCyclomaticComplexityRule extends AbstractApexRule {
|
||||
definePropertyDescriptor(SHOW_CLASSES_COMPLEXITY_DESCRIPTOR);
|
||||
definePropertyDescriptor(SHOW_METHODS_COMPLEXITY_DESCRIPTOR);
|
||||
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Complexity"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Complexity");
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 250);
|
||||
setProperty(CODECLIMATE_BLOCK_HIGHLIGHTING, false);
|
||||
}
|
||||
|
@ -7,7 +7,6 @@ package net.sourceforge.pmd.lang.apex.rule.complexity;
|
||||
import static apex.jorje.semantic.symbol.type.ModifierTypeInfos.FINAL;
|
||||
import static apex.jorje.semantic.symbol.type.ModifierTypeInfos.STATIC;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -32,7 +31,7 @@ public class TooManyFieldsRule extends AbstractApexRule {
|
||||
public TooManyFieldsRule() {
|
||||
definePropertyDescriptor(MAX_FIELDS_DESCRIPTOR);
|
||||
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Complexity"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Complexity");
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 200);
|
||||
setProperty(CODECLIMATE_BLOCK_HIGHLIGHTING, false);
|
||||
}
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
package net.sourceforge.pmd.lang.apex.rule.performance;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTDmlDeleteStatement;
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTDmlInsertStatement;
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTDmlMergeStatement;
|
||||
@ -23,7 +21,7 @@ import net.sourceforge.pmd.lang.ast.Node;
|
||||
public class AvoidDmlStatementsInLoopsRule extends AbstractApexRule {
|
||||
|
||||
public AvoidDmlStatementsInLoopsRule() {
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Performance"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Performance");
|
||||
// Note: Often more complicated as just moving the SOQL a few lines.
|
||||
// Involves Maps...
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 150);
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
package net.sourceforge.pmd.lang.apex.rule.performance;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTDoLoopStatement;
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTForEachStatement;
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTForLoopStatement;
|
||||
@ -18,7 +16,7 @@ import net.sourceforge.pmd.lang.ast.Node;
|
||||
public class AvoidSoqlInLoopsRule extends AbstractApexRule {
|
||||
|
||||
public AvoidSoqlInLoopsRule() {
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Performance"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Performance");
|
||||
// Note: Often more complicated as just moving the SOQL a few lines.
|
||||
// Involves Maps...
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 150);
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
package net.sourceforge.pmd.lang.apex.rule.security;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@ -35,7 +34,7 @@ public class ApexBadCryptoRule extends AbstractApexRule {
|
||||
private final Set<String> potentiallyStaticBlob = new HashSet<>();
|
||||
|
||||
public ApexBadCryptoRule() {
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Security"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Security");
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 100);
|
||||
setProperty(CODECLIMATE_BLOCK_HIGHLIGHTING, false);
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ public class ApexCRUDViolationRule extends AbstractApexRule {
|
||||
private static final String[] RESERVED_KEYS_FLS = new String[] { "Schema", S_OBJECT_TYPE, };
|
||||
|
||||
public ApexCRUDViolationRule() {
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Security"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Security");
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 100);
|
||||
setProperty(CODECLIMATE_BLOCK_HIGHLIGHTING, false);
|
||||
}
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
package net.sourceforge.pmd.lang.apex.rule.security;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTMethod;
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTUserClass;
|
||||
import net.sourceforge.pmd.lang.apex.ast.ApexNode;
|
||||
@ -22,7 +20,7 @@ public class ApexCSRFRule extends AbstractApexRule {
|
||||
public static final String INIT = "init";
|
||||
|
||||
public ApexCSRFRule() {
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Security"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Security");
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 100);
|
||||
setProperty(CODECLIMATE_BLOCK_HIGHLIGHTING, false);
|
||||
}
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
package net.sourceforge.pmd.lang.apex.rule.security;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
@ -40,7 +39,7 @@ public class ApexDangerousMethodsRule extends AbstractApexRule {
|
||||
|
||||
public ApexDangerousMethodsRule() {
|
||||
super.addRuleChainVisit(ASTUserClass.class);
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Security"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Security");
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 100);
|
||||
setProperty(CODECLIMATE_BLOCK_HIGHLIGHTING, false);
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
package net.sourceforge.pmd.lang.apex.rule.security;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Pattern;
|
||||
@ -33,7 +32,7 @@ public class ApexInsecureEndpointRule extends AbstractApexRule {
|
||||
private final Set<String> httpEndpointStrings = new HashSet<>();
|
||||
|
||||
public ApexInsecureEndpointRule() {
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Security"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Security");
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 100);
|
||||
setProperty(CODECLIMATE_BLOCK_HIGHLIGHTING, false);
|
||||
}
|
||||
|
@ -5,7 +5,6 @@
|
||||
package net.sourceforge.pmd.lang.apex.rule.security;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@ -38,7 +37,7 @@ public class ApexOpenRedirectRule extends AbstractApexRule {
|
||||
|
||||
public ApexOpenRedirectRule() {
|
||||
super.addRuleChainVisit(ASTUserClass.class);
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Security"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Security");
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 100);
|
||||
setProperty(CODECLIMATE_BLOCK_HIGHLIGHTING, false);
|
||||
}
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
package net.sourceforge.pmd.lang.apex.rule.security;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
@ -50,7 +49,7 @@ public class ApexSOQLInjectionRule extends AbstractApexRule {
|
||||
private final HashMap<String, Boolean> selectContainingVariables = new HashMap<>();
|
||||
|
||||
public ApexSOQLInjectionRule() {
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Security"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Security");
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 100);
|
||||
setProperty(CODECLIMATE_BLOCK_HIGHLIGHTING, false);
|
||||
}
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
package net.sourceforge.pmd.lang.apex.rule.security;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
@ -27,7 +26,7 @@ public class ApexSharingViolationsRule extends AbstractApexRule {
|
||||
private WeakHashMap<ApexNode<?>, Object> localCacheOfReportedNodes = new WeakHashMap<>();
|
||||
|
||||
public ApexSharingViolationsRule() {
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Security"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Security");
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 100);
|
||||
setProperty(CODECLIMATE_BLOCK_HIGHLIGHTING, false);
|
||||
}
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
package net.sourceforge.pmd.lang.apex.rule.security;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@ -35,7 +34,7 @@ public class ApexSuggestUsingNamedCredRule extends AbstractApexRule {
|
||||
|
||||
public ApexSuggestUsingNamedCredRule() {
|
||||
super.addRuleChainVisit(ASTUserClass.class);
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Security"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Security");
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 100);
|
||||
setProperty(CODECLIMATE_BLOCK_HIGHLIGHTING, false);
|
||||
}
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
package net.sourceforge.pmd.lang.apex.rule.security;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTLiteralExpression;
|
||||
@ -23,7 +22,7 @@ public class ApexXSSFromEscapeFalseRule extends AbstractApexRule {
|
||||
private static final String ADD_ERROR = "addError";
|
||||
|
||||
public ApexXSSFromEscapeFalseRule() {
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Security"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Security");
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 100);
|
||||
setProperty(CODECLIMATE_BLOCK_HIGHLIGHTING, false);
|
||||
}
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
package net.sourceforge.pmd.lang.apex.rule.security;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@ -51,7 +50,7 @@ public class ApexXSSFromURLParamRule extends AbstractApexRule {
|
||||
private final Set<String> urlParameterStrings = new HashSet<>();
|
||||
|
||||
public ApexXSSFromURLParamRule() {
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Security"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Security");
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 50);
|
||||
setProperty(CODECLIMATE_BLOCK_HIGHLIGHTING, false);
|
||||
}
|
||||
|
@ -6,8 +6,6 @@ package net.sourceforge.pmd.lang.apex.rule.style;
|
||||
|
||||
import static apex.jorje.semantic.symbol.type.ModifierTypeInfos.GLOBAL;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTModifierNode;
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTUserClass;
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTUserInterface;
|
||||
@ -17,7 +15,7 @@ import net.sourceforge.pmd.lang.apex.rule.AbstractApexRule;
|
||||
public class AvoidGlobalModifierRule extends AbstractApexRule {
|
||||
|
||||
public AvoidGlobalModifierRule() {
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Style"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Style");
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 100);
|
||||
setProperty(CODECLIMATE_BLOCK_HIGHLIGHTING, false);
|
||||
}
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
package net.sourceforge.pmd.lang.apex.rule.style;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTBlockStatement;
|
||||
@ -14,7 +13,7 @@ import net.sourceforge.pmd.lang.apex.rule.AbstractApexRule;
|
||||
public class AvoidLogicInTriggerRule extends AbstractApexRule {
|
||||
|
||||
public AvoidLogicInTriggerRule() {
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Style"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Style");
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 200);
|
||||
setProperty(CODECLIMATE_BLOCK_HIGHLIGHTING, false);
|
||||
}
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
package net.sourceforge.pmd.lang.apex.rule.style;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTUserClass;
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTUserInterface;
|
||||
import net.sourceforge.pmd.lang.apex.rule.AbstractApexRule;
|
||||
@ -13,7 +11,7 @@ import net.sourceforge.pmd.lang.apex.rule.AbstractApexRule;
|
||||
public class ClassNamingConventionsRule extends AbstractApexRule {
|
||||
|
||||
public ClassNamingConventionsRule() {
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Style"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Style");
|
||||
// Note: x10 as Apex has not automatic refactoring
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 5);
|
||||
setProperty(CODECLIMATE_BLOCK_HIGHLIGHTING, false);
|
||||
|
@ -6,8 +6,6 @@ package net.sourceforge.pmd.lang.apex.rule.style;
|
||||
|
||||
import static apex.jorje.semantic.symbol.type.ModifierTypeInfos.OVERRIDE;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTMethod;
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTProperty;
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTUserClass;
|
||||
@ -16,7 +14,7 @@ import net.sourceforge.pmd.lang.apex.rule.AbstractApexRule;
|
||||
public class MethodNamingConventionsRule extends AbstractApexRule {
|
||||
|
||||
public MethodNamingConventionsRule() {
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Style"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Style");
|
||||
// Note: x10 as Apex has not automatic refactoring
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 1);
|
||||
setProperty(CODECLIMATE_BLOCK_HIGHLIGHTING, false);
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
package net.sourceforge.pmd.lang.apex.rule.style;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.pmd.lang.apex.ast.ASTMethod;
|
||||
@ -14,7 +13,7 @@ import net.sourceforge.pmd.lang.apex.rule.AbstractApexRule;
|
||||
public class MethodWithSameNameAsEnclosingClassRule extends AbstractApexRule {
|
||||
|
||||
public MethodWithSameNameAsEnclosingClassRule() {
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Style"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Style");
|
||||
// Note: x10 as Apex has not automatic refactoring
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 50);
|
||||
setProperty(CODECLIMATE_BLOCK_HIGHLIGHTING, false);
|
||||
|
@ -7,7 +7,6 @@ package net.sourceforge.pmd.lang.apex.rule.style;
|
||||
import static apex.jorje.semantic.symbol.type.ModifierTypeInfos.FINAL;
|
||||
import static apex.jorje.semantic.symbol.type.ModifierTypeInfos.STATIC;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.pmd.PropertyDescriptor;
|
||||
@ -81,7 +80,7 @@ public class VariableNamingConventionsRule extends AbstractApexRule {
|
||||
definePropertyDescriptor(PARAMETER_PREFIXES_DESCRIPTOR);
|
||||
definePropertyDescriptor(PARAMETER_SUFFIXES_DESCRIPTOR);
|
||||
|
||||
setProperty(CODECLIMATE_CATEGORIES, Arrays.asList("Style"));
|
||||
setProperty(CODECLIMATE_CATEGORIES, "Style");
|
||||
// Note: x10 as Apex has not automatic refactoring
|
||||
setProperty(CODECLIMATE_REMEDIATION_MULTIPLIER, 5);
|
||||
setProperty(CODECLIMATE_BLOCK_HIGHLIGHTING, false);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user