[Fb-contrib-commit] fb-contrib/etc findbugs.xml,1.52,1.53 messages.xml,1.44,1.45
Brought to you by:
dbrosius
From: Dave B. <dbr...@us...> - 2006-01-16 05:05:14
|
Update of /cvsroot/fb-contrib/fb-contrib/etc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30902/etc Modified Files: findbugs.xml messages.xml Log Message: initial checkin - new CLI detector Index: messages.xml =================================================================== RCS file: /cvsroot/fb-contrib/fb-contrib/etc/messages.xml,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- messages.xml 2 Jan 2006 03:41:07 -0000 1.44 +++ messages.xml 16 Jan 2006 05:05:03 -0000 1.45 @@ -382,6 +382,18 @@ </Details> </Detector> + <Detector class="com.mebigfatguy.fbcontrib.detect.ConstantListIndex"> + <Details> + <![CDATA[ + <p>Looks for methods that access arrays or classes that implement java.util.List + using a constant integer for the index. This is often a typo intented to be a loop + variable, but if specific indices mean certain things, perhaps a first class object + would be a better choice for a container.</p> + <p>It is a fast Detector</p> + ]]> + </Details> + </Detector> + <!-- BugPattern --> <BugPattern type="ISB_INEFFICIENT_STRING_BUFFERING"> @@ -746,6 +758,19 @@ to this object.</p> ]]> </Details> + </BugPattern> + + <BugPattern type="CLI_CONSTANT_LIST_INDEX"> + <ShortDescription>method accesses list or array with constant index</ShortDescription> + <LongDescription>method {1} accesses list or array with constant index</LongDescription> + <Details> + <![CDATA[ + <p>This method accesses an array or list using a constant integer index. Often, + this is a typo where a loop variable is intended to be used. If however, specific + list indices mean different specific things, then perhaps replacing the list with + a first-class object with meaningful accessors would make the code less brittle.</p> + ]]> + </Details> </BugPattern> @@ -780,4 +805,5 @@ <BugCode abbrev="AOM">Abstract Overridden Method</BugCode> <BugCode abbrev="CBX">Custom Built XML</BugCode> <BugCode abbrev="BSB">Bloated Synchronized Block</BugCode> + <BugCode abbrev="CLI">Constant List Index</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.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- findbugs.xml 15 Jan 2006 23:45:00 -0000 1.52 +++ findbugs.xml 16 Jan 2006 05:05:03 -0000 1.53 @@ -129,6 +129,10 @@ <Detector class="com.mebigfatguy.fbcontrib.detect.BloatedSynchronizedBlock" speed="fast" reports="BSB_BLOATED_SYNCHRONIZED_BLOCK" /> + + <Detector class="com.mebigfatguy.fbcontrib.detect.ConstantListIndex" + speed="fast" + reports="CLI_CONSTANT_LIST_INDEX" /> <!-- BugPattern --> @@ -161,4 +165,5 @@ <BugPattern abbrev="AOM" type="AOM_ABSTRACT_OVERRIDDEN_METHOD" category="CORRECTNESS" /> <BugPattern abbrev="CBX" type="CBX_CUSTOM_BUILT_XML" category="STYLE" /> <BugPattern abbrev="BSB" type="BSB_BLOATED_SYNCHRONIZED_BLOCK" category="PERFORMANCE" experimental="true" /> + <BugPattern abbrev="CLI" type="CLI_CONSTANT_LIST_INDEX" category="CORRECTNESS" experimental="true" /> </FindbugsPlugin> \ No newline at end of file |