Update of /cvsroot/fb-contrib/fb-contrib/src/com/mebigfatguy/fbcontrib/detect
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19948/src/com/mebigfatguy/fbcontrib/detect
Modified Files:
ClassEnvy.java CyclomaticComplexity.java
OverlyConcreteParameter.java
Log Message:
do better source line annotating, and re-enable ClassEnvy for now, at least it's close to sane.
Index: CyclomaticComplexity.java
===================================================================
RCS file: /cvsroot/fb-contrib/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/CyclomaticComplexity.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- CyclomaticComplexity.java 1 Oct 2005 07:38:02 -0000 1.5
+++ CyclomaticComplexity.java 10 Oct 2005 07:05:01 -0000 1.6
@@ -100,7 +100,8 @@
if (branches > reportLimit) {
bugReporter.reportBug( new BugInstance( this, "CC_CYCLOMATIC_COMPLEXITY", NORMAL_PRIORITY)
.addClass(this)
- .addMethod(this));
+ .addMethod(this)
+ .addSourceLine(classContext, this, 0));
}
} catch (CFGBuilderException cbe) {
bugReporter.logError("Failure examining basic blocks for method " + classContext.getJavaClass().getClassName() + "." + obj.getName() + " in Cyclomatic Complexity detector", cbe);
Index: ClassEnvy.java
===================================================================
RCS file: /cvsroot/fb-contrib/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ClassEnvy.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- ClassEnvy.java 10 Oct 2005 06:36:14 -0000 1.6
+++ ClassEnvy.java 10 Oct 2005 07:05:01 -0000 1.7
@@ -112,7 +112,7 @@
bugReporter.reportBug( new BugInstance( this, "CE_CLASS_ENVY", NORMAL_PRIORITY)
.addClass(this)
.addMethod(this)
- .addSourceLine(this, 0)
+ .addSourceLineRange(this, 0, obj.getCode().length-1)
.addString(bestEnvy));
}
}
Index: OverlyConcreteParameter.java
===================================================================
RCS file: /cvsroot/fb-contrib/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/OverlyConcreteParameter.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- OverlyConcreteParameter.java 5 Oct 2005 06:07:26 -0000 1.19
+++ OverlyConcreteParameter.java 10 Oct 2005 07:05:01 -0000 1.20
@@ -182,6 +182,7 @@
bugReporter.reportBug( new BugInstance( this, "OCP_OVERLY_CONCRETE_PARAMETER", NORMAL_PRIORITY)
.addClass(this)
.addMethod(this)
+ .addSourceLine(this, 0)
.addString("Parameter [" + reg.intValue() + "] " + name + " implements " + infName));
}
}
|