[Fb-contrib-commit] fb-contrib/etc findbugs.xml,1.46,1.47 messages.xml,1.40,1.41
Brought to you by:
dbrosius
|
From: Dave B. <dbr...@us...> - 2005-12-30 06:33:54
|
Update of /cvsroot/fb-contrib/fb-contrib/etc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25229/etc Modified Files: findbugs.xml messages.xml Log Message: initial checkin - new CBX detector Index: messages.xml =================================================================== RCS file: /cvsroot/fb-contrib/fb-contrib/etc/messages.xml,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- messages.xml 28 Dec 2005 03:40:18 -0000 1.40 +++ messages.xml 30 Dec 2005 06:33:43 -0000 1.41 @@ -358,6 +358,17 @@ </Details> </Detector> + <Detector class="com.mebigfatguy.fbcontrib.detect.CustomBuiltXML"> + <Details> + <![CDATA[ + <p>Looks for methods that build xml based strings by concatenation strings + and custom values together. Doing so makes brittle code, that is difficult to + modify, validate and understand. It is cleaner to create external xml files that are + transformed at runtime, using parameters set through Transformer.setParameter. + ]]> + </Details> + </Detector> + <!-- BugPattern --> <BugPattern type="ISB_INEFFICIENT_STRING_BUFFERING"> @@ -696,6 +707,20 @@ </Details> </BugPattern> + <BugPattern type="CBX_CUSTOM_BUILT_XML"> + <ShortDescription>method builds xml strings through adhoc concatenation</ShortDescription> + <LongDescription>method {1} builds xml strings through adhoc concatenation</LongDescription> + <Details> + <![CDATA[ + <p>This method generates an xml based string by concatenating together various + xml fragments, and variable values. Doing so makes the code difficult to read, modify + and validate. It is much more clean to built xml structures in external files that are + read in and transformed into the final product, thru modification by Transformer.setParameter. + </p> + ]]> + </Details> + </BugPattern> + <!-- BugCode --> <BugCode abbrev="ISB">Inefficient String Buffering</BugCode> @@ -725,4 +750,5 @@ <BugCode abbrev="ABC">Array Based Collection</BugCode> <BugCode abbrev="ODN">Orphaned DOM Node</BugCode> <BugCode abbrev="AOM">Abstract Overridden Method</BugCode> + <BugCode abbrev="CBX">Custom Built XML</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.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- findbugs.xml 28 Dec 2005 03:40:18 -0000 1.46 +++ findbugs.xml 30 Dec 2005 06:33:43 -0000 1.47 @@ -121,6 +121,10 @@ <Detector class="com.mebigfatguy.fbcontrib.detect.AbstractOverriddenMethod" speed="fast" reports="AOM_ABSTRACT_OVERRIDDEN_METHOD" /> + + <Detector class="com.mebigfatguy.fbcontrib.detect.CustomBuiltXML" + speed="fast" + reports="CBX_CUSTOM_BUILT_XML" /> <!-- BugPattern --> @@ -151,4 +155,5 @@ <BugPattern abbrev="ABC" type="ABC_ARRAY_BASED_COLLECTIONS" category="CORRECTNESS" experimental="true" /> <BugPattern abbrev="ODN" type="ODN_ORPHANED_DOM_NODE" category="CORRECTNESS" experimental="true" /> <BugPattern abbrev="AOM" type="AOM_ABSTRACT_OVERRIDDEN_METHOD" category="CORRECTNESS" experimental="true" /> + <BugPattern abbrev="CBX" type="CBX_CUSTOM_BUILT_XML" category="STYLE" experimental="true" /> </FindbugsPlugin> \ No newline at end of file |