Class StdCyclomaticComplexityRule
-
- All Implemented Interfaces:
-
net.sourceforge.pmd.lang.apex.ast.ApexVisitor
,net.sourceforge.pmd.lang.ast.AstVisitor
,net.sourceforge.pmd.lang.rule.Rule
,net.sourceforge.pmd.properties.PropertySource
public class StdCyclomaticComplexityRule extends AbstractApexRule
Implements the standard cyclomatic complexity rule
Standard rules: +1 for each decision point, but not including boolean operators unlike CyclomaticComplexityRule.
- Since:
June 18, 2014
ported on Java version of Alan Hohn, based on work by Donald A. Leckie
-
-
Field Summary
Fields Modifier and Type Field Description public final static PropertyDescriptor<Integer>
REPORT_LEVEL_DESCRIPTOR
public final static PropertyDescriptor<Boolean>
SHOW_CLASSES_COMPLEXITY_DESCRIPTOR
public final static PropertyDescriptor<Boolean>
SHOW_METHODS_COMPLEXITY_DESCRIPTOR
public Language
language
public LanguageVersion
minimumLanguageVersion
public LanguageVersion
maximumLanguageVersion
public String
name
public String
since
public String
ruleClass
public String
ruleSetName
public String
message
public String
description
public List<String>
examples
public String
externalInfoUrl
public RulePriority
priority
public final List<PropertyDescriptor<out Object>>
propertyDescriptors
public final static PropertyDescriptor<Optional<Pattern>>
VIOLATION_SUPPRESS_REGEX_DESCRIPTOR
public final static PropertyDescriptor<Optional<String>>
VIOLATION_SUPPRESS_XPATH_DESCRIPTOR
-
Constructor Summary
Constructors Constructor Description StdCyclomaticComplexityRule()
-
Method Summary
Modifier and Type Method Description void
start(RuleContext ctx)
Object
visit(ASTUserClass node, Object data)
Object
visit(ASTUserTrigger node, Object data)
Object
visit(ASTUserInterface node, Object data)
Object
visit(ASTUserEnum node, Object data)
Object
visit(ASTMethod node, Object data)
Object
visit(ASTIfBlockStatement node, Object data)
Object
visit(ASTTryCatchFinallyBlockStatement node, Object data)
Object
visit(ASTForLoopStatement node, Object data)
Object
visit(ASTForEachStatement node, Object data)
Object
visit(ASTWhileLoopStatement node, Object data)
Object
visit(ASTDoLoopStatement node, Object data)
Object
visit(ASTTernaryExpression node, Object data)
Object
visit(ASTBooleanExpression node, Object data)
-
Methods inherited from class net.sourceforge.pmd.lang.rule.AbstractRule
addExample, deepCopy, end, equals, getDescription, getExamples, getExternalInfoUrl, getLanguage, getMaximumLanguageVersion, getMessage, getMinimumLanguageVersion, getName, getPriority, getRuleClass, getRuleSetName, getSince, getTargetSelector, hashCode, isDeprecated, setDeprecated, setDescription, setExternalInfoUrl, setLanguage, setMaximumLanguageVersion, setMessage, setMinimumLanguageVersion, setName, setPriority, setRuleClass, setRuleSetName, setSince
-
Methods inherited from class net.sourceforge.pmd.properties.AbstractPropertySource
definePropertyDescriptor, getOverriddenPropertiesByPropertyDescriptor, getOverriddenPropertyDescriptors, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, isPropertyOverridden, setProperty
-
Methods inherited from class net.sourceforge.pmd.lang.apex.rule.AbstractApexRule
apply, visitNode
-
Methods inherited from class net.sourceforge.pmd.lang.apex.ast.ApexVisitor
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitApexNode
-
Methods inherited from class net.sourceforge.pmd.lang.rule.Rule
apply, initialize
-
Methods inherited from class net.sourceforge.pmd.properties.PropertySource
dysfunctionReason
-
Methods inherited from class net.sourceforge.pmd.lang.ast.AstVisitor
cannotVisit, visitNode
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
start
void start(RuleContext ctx)
-
visit
Object visit(ASTUserClass node, Object data)
-
visit
Object visit(ASTUserTrigger node, Object data)
-
visit
Object visit(ASTUserInterface node, Object data)
-
visit
Object visit(ASTUserEnum node, Object data)
-
visit
Object visit(ASTIfBlockStatement node, Object data)
-
visit
Object visit(ASTTryCatchFinallyBlockStatement node, Object data)
-
visit
Object visit(ASTForLoopStatement node, Object data)
-
visit
Object visit(ASTForEachStatement node, Object data)
-
visit
Object visit(ASTWhileLoopStatement node, Object data)
-
visit
Object visit(ASTDoLoopStatement node, Object data)
-
visit
Object visit(ASTTernaryExpression node, Object data)
-
visit
Object visit(ASTBooleanExpression node, Object data)
-
-
-
-