[Fb-contrib-commit] SF.net SVN: fb-contrib:[1309] trunk/fb-contrib/etc/messages.xml
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2009-09-24 06:10:50
|
Revision: 1309
http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1309&view=rev
Author: dbrosius
Date: 2009-09-24 06:10:34 +0000 (Thu, 24 Sep 2009)
Log Message:
-----------
add OC detector
Modified Paths:
--------------
trunk/fb-contrib/etc/messages.xml
Modified: trunk/fb-contrib/etc/messages.xml
===================================================================
--- trunk/fb-contrib/etc/messages.xml 2009-09-24 06:10:13 UTC (rev 1308)
+++ trunk/fb-contrib/etc/messages.xml 2009-09-24 06:10:34 UTC (rev 1309)
@@ -1013,6 +1013,17 @@
]]>
</Details>
</Detector>
+
+ <Detector class="com.mebigfatguy.fbcontrib.detect.OverzealousCasting">
+ <Details>
+ <![CDATA[
+ <p>looks for manual casts of objects that are more specific then needed as the value is assigned
+ to a class or interface higher up in the inheritance chain. You only need to cast to that class
+ or interface.</p>
+ <p>It is a fast detector</p>
+ ]]>
+ </Details>
+ </Detector>
<!-- BugPattern -->
@@ -2634,6 +2645,18 @@
</Details>
</BugPattern>
+ <BugPattern type="OC_OVERZEALOUS_CASTING">
+ <ShortDescription>method manually casts the right hand side of an assignment more specifically than needed</ShortDescription>
+ <LongDescription>method {1} manually casts the right hand side of an assignment more specifically than needed</LongDescription>
+ <Details>
+ <![CDATA[
+ <p>This method casts the right hand side of an expression to a class that is more specific than the
+ variable on the left hand side of the assignment. The cast only has to be as specific as what the variable
+ that is on the left. Using a more specific type on the right hand side just increases cohesion.
+ ]]>
+ </Details>
+ </BugPattern>
+
<!-- BugCode -->
<BugCode abbrev="ISB">Inefficient String Buffering</BugCode>
@@ -2719,4 +2742,5 @@
<BugCode abbrev="SUA">SuspiciousUninitializedArray</BugCode>
<BugCode abbrev="ITU">Inappropriate ToString Use</BugCode>
<BugCode abbrev="IKNC">Inconsistent Key Name Casing</BugCode>
+ <BugCode abbrev="OC">Overzealous Casting</BugCode>
</MessageCollection>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|