Metric to calculate the CRAP metric See http://www.artima.com/weblogs/viewpost.jsp?thread=210575
Type | Name and description |
---|---|
MethodMetric |
complexityMetric |
MethodMetric |
coverageMetric |
String |
name |
Type | Name and description |
---|---|
MetricResult |
calculate(org.codehaus.groovy.ast.expr.ClosureExpression closureExpression, SourceCode sourceCode) |
MetricResult |
calculate(org.codehaus.groovy.ast.MethodNode methodNode, SourceCode sourceCode) |
protected BigDecimal |
calculateCrapScore(BigDecimal complexity, BigDecimal coverage) Calculate the CRAP metric score |
Methods inherited from class | Name |
---|---|
class AbstractMethodMetric |
applyToClosure, applyToMethod, calculate, calculate, calculateForClass |
class AbstractMetric |
applyToClass, applyToPackage, calculateForClass, calculateForPackage, createAggregateMetricResult, isNotAnInterface |
Calculate the CRAP metric score
complexity
- - the cyclomatic complexity of a methodcoverage
- - the code coverage (by line) of a method