Fixed problem where constructors were not testing the reporting level.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@1409 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -243,6 +243,8 @@ public class CyclomaticComplexityRule extends AbstractRule
|
||||
classEntry.m_highestDecisionPoints = constructorDecisionPointCount;
|
||||
}
|
||||
|
||||
if (constructorEntry.m_decisionPoints >= getIntProperty("reportLevel"))
|
||||
{
|
||||
// The {0} "{1}" has a cyclomatic complexity of {2}.
|
||||
RuleContext ruleContext = (RuleContext) data;
|
||||
String template = getMessage();
|
||||
@ -253,6 +255,7 @@ public class CyclomaticComplexityRule extends AbstractRule
|
||||
int lineNumber = node.getBeginLine();
|
||||
RuleViolation ruleViolation = createRuleViolation(ruleContext, lineNumber, message);
|
||||
ruleContext.getReport().addRuleViolation(ruleViolation);
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
Reference in New Issue
Block a user