forked from phoedos/pmd
Merge branch 'master' into issue4396-cpd-case-sensitive
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>net.sourceforge.pmd</groupId>
|
||||
<artifactId>pmd</artifactId>
|
||||
<version>7.1.0-SNAPSHOT</version>
|
||||
<version>7.2.0-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@@ -210,8 +210,8 @@ public class CyclomaticComplexityRule extends AbstractPLSQLRule {
|
||||
classEntry.getComplexityAverage(), classEntry.highestDecisionPoints);
|
||||
if (showClassesComplexity) {
|
||||
if (classEntry.getComplexityAverage() >= reportLevel || classEntry.highestDecisionPoints >= reportLevel) {
|
||||
asCtx(data).addViolation(node, new String[] { "class", node.getImage(),
|
||||
classEntry.getComplexityAverage() + " (Highest = " + classEntry.highestDecisionPoints + ')', });
|
||||
asCtx(data).addViolation(node, "class", node.getImage(),
|
||||
classEntry.getComplexityAverage() + " (Highest = " + classEntry.highestDecisionPoints + ')');
|
||||
}
|
||||
}
|
||||
return data;
|
||||
@@ -227,8 +227,8 @@ public class CyclomaticComplexityRule extends AbstractPLSQLRule {
|
||||
classEntry.highestDecisionPoints);
|
||||
if (showClassesComplexity) {
|
||||
if (classEntry.getComplexityAverage() >= reportLevel || classEntry.highestDecisionPoints >= reportLevel) {
|
||||
asCtx(data).addViolation(node, new String[] { "class", node.getImage(),
|
||||
classEntry.getComplexityAverage() + " (Highest = " + classEntry.highestDecisionPoints + ')', });
|
||||
asCtx(data).addViolation(node, "class", node.getImage(),
|
||||
classEntry.getComplexityAverage() + " (Highest = " + classEntry.highestDecisionPoints + ')');
|
||||
}
|
||||
}
|
||||
return data;
|
||||
@@ -276,8 +276,8 @@ public class CyclomaticComplexityRule extends AbstractPLSQLRule {
|
||||
ASTMethodDeclarator methodDeclarator = node.firstChild(ASTMethodDeclarator.class);
|
||||
if (methodEntry.decisionPoints >= reportLevel) {
|
||||
asCtx(data).addViolation(node,
|
||||
new String[] { "method", methodDeclarator == null ? "" : methodDeclarator.getImage(),
|
||||
String.valueOf(methodEntry.decisionPoints), });
|
||||
"method", methodDeclarator == null ? "" : methodDeclarator.getImage(),
|
||||
String.valueOf(methodEntry.decisionPoints));
|
||||
}
|
||||
}
|
||||
return data;
|
||||
@@ -306,8 +306,8 @@ public class CyclomaticComplexityRule extends AbstractPLSQLRule {
|
||||
ASTMethodDeclarator methodDeclarator = node.firstChild(ASTMethodDeclarator.class);
|
||||
if (methodEntry.decisionPoints >= reportLevel) {
|
||||
asCtx(data).addViolation(node,
|
||||
new String[] { "method", methodDeclarator == null ? "" : methodDeclarator.getImage(),
|
||||
String.valueOf(methodEntry.decisionPoints), });
|
||||
"method", methodDeclarator == null ? "" : methodDeclarator.getImage(),
|
||||
String.valueOf(methodEntry.decisionPoints));
|
||||
}
|
||||
}
|
||||
return data;
|
||||
@@ -334,8 +334,8 @@ public class CyclomaticComplexityRule extends AbstractPLSQLRule {
|
||||
ASTMethodDeclarator methodDeclarator = node.firstChild(ASTMethodDeclarator.class);
|
||||
if (methodEntry.decisionPoints >= reportLevel) {
|
||||
asCtx(data).addViolation(node,
|
||||
new String[] { "method", methodDeclarator == null ? "" : methodDeclarator.getImage(),
|
||||
String.valueOf(methodEntry.decisionPoints), });
|
||||
"method", methodDeclarator == null ? "" : methodDeclarator.getImage(),
|
||||
String.valueOf(methodEntry.decisionPoints));
|
||||
}
|
||||
}
|
||||
return data;
|
||||
|
Reference in New Issue
Block a user