[Fb-contrib-commit] fb-contrib/etc findbugs.xml,1.10,1.11 messages.xml,1.9,1.10
Brought to you by:
dbrosius
From: Dave B. <dbr...@us...> - 2005-09-17 04:42:43
|
Update of /cvsroot/fb-contrib/fb-contrib/etc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8800/etc Modified Files: findbugs.xml messages.xml Log Message: Initial Checkin: Class Envy Detector Index: messages.xml =================================================================== RCS file: /cvsroot/fb-contrib/fb-contrib/etc/messages.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- messages.xml 15 Sep 2005 04:03:12 -0000 1.9 +++ messages.xml 17 Sep 2005 04:42:35 -0000 1.10 @@ -100,7 +100,18 @@ </Details> </Detector> - <!-- BugPattern --> + <Detector class="com.mebigfatguy.fbcontrib.detect.ClassEnvy"> + <Details> + <![CDATA[ + <p> Looks for methods that use a high percentage of methods from another class over it's own + methods. When this is the case, it is often to implement this method in that other class. + The reporting percentage can be set with system property 'fb-contrib.ce.percent'.</p> + <p>It is a fast detector</p> + ]]> + </Details> + </Detector> + + <!-- BugPattern --> <BugPattern type="ISB_INEFFICIENT_STRING_BUFFERING"> <ShortDescription>method passes simple concatenating string in StringBuffer or StringBuilder append</ShortDescription> @@ -188,6 +199,19 @@ </Details> </BugPattern> + <BugPattern type="CE_CLASS_ENVY"> + <ShortDescription>method excessively uses methods of another class</ShortDescription> + <LongDescription>method {1} excessively uses methods of another class</LongDescription> + <Details> + <![CDATA[ + <p>This method makes extensive use of methods from another class over methods of it's own + class. Typically this means that the functionality that is accomplished by this method + most likely belongs with the class that is being used so liberally. Consider moving this + method to that class.</p> + ]]> + </Details> + </BugPattern> + <!-- BugCode --> <BugCode abbrev="ISB">Inefficient String Buffering</BugCode> @@ -197,5 +221,6 @@ <BugCode abbrev="LII">List Indexed Iterating</BugCode> <BugCode abbrev="UCC">Unrelated Collection Contents</BugCode> <BugCode abbrev="DRE">Declared Runtime Exception</BugCode> + <BugCode abbrev="CE">Class Envy</BugCode> </MessageCollection> \ No newline at end of file Index: findbugs.xml =================================================================== RCS file: /cvsroot/fb-contrib/fb-contrib/etc/findbugs.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- findbugs.xml 15 Sep 2005 04:03:12 -0000 1.10 +++ findbugs.xml 17 Sep 2005 04:42:35 -0000 1.11 @@ -40,15 +40,20 @@ <Detector class="com.mebigfatguy.fbcontrib.detect.DeclaredRuntimeException" speed="fast" reports="DRE_DECLARED_RUNTIME_EXCEPTION" /> + + <Detector class="com.mebigfatguy.fbcontrib.detect.ClassEnvy" + speed="fast" + reports="CE_CLASS_ENVY" /> <!-- BugPattern --> <BugPattern abbrev="ISB" type="ISB_INEFFICIENT_STRING_BUFFERING" category="PERFORMANCE" /> <BugPattern abbrev="SCI" type="SCI_SYNCHRONIZED_COLLECTION_ITERATORS" category="CORRECTNESS" /> <BugPattern abbrev="CC" type="CC_CYCLOMATIC_COMPLEXITY" category="STYLE" /> - <BugPattern abbrev="OCP" type="OCP_OVERLY_CONCRETE_PARAMETER" category="STYLE" experimental="true" /> - <BugPattern abbrev="LII" type="LII_LIST_INDEXED_ITERATING" category="PERFORMANCE" experimental="true" /> - <BugPattern abbrev="UCC" type="UCC_UNRELATED_COLLECTION_CONTENTS" category="STYLE" experimental="true" /> - <BugPattern abbrev="DRE" type="DRE_DECLARED_RUNTIME_EXCEPTION" category="STYLE" experimental="true" /> + <BugPattern abbrev="OCP" type="OCP_OVERLY_CONCRETE_PARAMETER" category="STYLE" /> + <BugPattern abbrev="LII" type="LII_LIST_INDEXED_ITERATING" category="PERFORMANCE" /> + <BugPattern abbrev="UCC" type="UCC_UNRELATED_COLLECTION_CONTENTS" category="STYLE" /> + <BugPattern abbrev="DRE" type="DRE_DECLARED_RUNTIME_EXCEPTION" category="STYLE" /> + <BugPattern abbrev="CE" type="CE_CLASS_ENVY" category="STYLE" experimental="true" /> </FindbugsPlugin> \ No newline at end of file |