You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@velocity.apache.org by nb...@apache.org on 2008/11/18 02:04:57 UTC

svn commit: r718456 - in /velocity/engine/trunk: build/build.xml build/findbugs-exclude.xml pom.xml

Author: nbubna
Date: Mon Nov 17 17:04:56 2008
New Revision: 718456

URL: http://svn.apache.org/viewvc?rev=718456&view=rev
Log:
add exclude filter for findbugs output to bring some sanity to that report

Added:
    velocity/engine/trunk/build/findbugs-exclude.xml   (with props)
Modified:
    velocity/engine/trunk/build/build.xml
    velocity/engine/trunk/pom.xml

Modified: velocity/engine/trunk/build/build.xml
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/build/build.xml?rev=718456&r1=718455&r2=718456&view=diff
==============================================================================
--- velocity/engine/trunk/build/build.xml (original)
+++ velocity/engine/trunk/build/build.xml Mon Nov 17 17:04:56 2008
@@ -1171,6 +1171,9 @@
               output="html"
               jvmargs="-Xmx400m"
               outputFile="${build.test.reports}\findbugs-report.html"
+              reportLevel="low"
+              effort="max"
+              excludeFilter="${velocity.build.dir}/findbugs-exclude.xml"
               failOnError="true">
       <auxClasspath>
         <fileset dir="${build.lib}">

Added: velocity/engine/trunk/build/findbugs-exclude.xml
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/build/findbugs-exclude.xml?rev=718456&view=auto
==============================================================================
--- velocity/engine/trunk/build/findbugs-exclude.xml (added)
+++ velocity/engine/trunk/build/findbugs-exclude.xml Mon Nov 17 17:04:56 2008
@@ -0,0 +1,106 @@
+<!-- TODO: We should be putting findBugs exclusions -->
+<!-- as annotations in the source code. But that takes JDK 1.5+. -->
+
+<FindBugsFilter>
+
+    <!-- don't worry about deprecated things -->
+    <Match>
+        <Or>
+            <Package name="De"/>
+            <Package name="org.apache.velocity.app.tools"/>
+            <Package name="org.apache.velocity.anakia"/>
+            <Package name="org.apache.velocity.convert"/>
+            <Package name="org.apache.velocity.servlet"/>
+            <Package name="org.apache.velocity.texen"/>
+        </Or>
+    </Match>
+
+    <!-- ignore the JavaCC generated "bugs" -->
+    <Match>
+        <Package name="org.apache.velocity.runtime.parser"/>
+        <Or>
+            <Bug pattern="NM_METHOD_NAMING_CONVENTION"/>
+            <Bug pattern="EI_EXPOSE_REP2"/>
+            <Bug pattern="MS_PKGPROTECT"/>
+            <Bug pattern="MS_OOI_PKGPROTECT"/>
+            <Bug pattern="URF_UNREAD_FIELD"/>
+            <Bug pattern="MS_MUTABLE_ARRAY"/>
+            <Bug pattern="URF_UNREAD_FIELD"/>
+            <Bug pattern="BC_UNCONFIRMED_CAST"/>
+            <Bug pattern="DB_DUPLICATE_SWITCH_CLAUSES"/>
+            <Bug pattern="DLS_DEAD_LOCAL_STORE"/>
+        </Or>
+    </Match>
+
+    <!-- these just aren't worth changing right now -->
+    <Match>
+        <Class name="org.apache.velocity.app.event.ReferenceInsertionEventHandler$referenceInsertExecutor"/>
+        <Bug pattern="NM_CLASS_NAMING_CONVENTION"/>
+    </Match>
+    <Match>
+        <Or>
+            <Class name="org.apache.velocity.runtime.directive.VelocimacroProxy"/>
+            <Class name="org.apache.velocity.runtime.parser.ParseException"/>
+            <Class name="org.apache.velocity.runtime.parser.Parser"/>
+            <Class name="org.apache.velocity.util.introspection.SecureIntrospectorImpl"/>
+        </Or>
+        <Bug pattern="EI_EXPOSE_REP2"/>
+    </Match>
+    <Match>
+        <Class name="org.apache.velocity.runtime.parser.ParseException"/>
+        <Or>
+            <Bug pattern="SBSC_USE_STRINGBUFFER_CONCATENATION"/>
+            <Bug pattern="SE_BAD_FIELD"/>
+        </Or>
+    </Match>
+    <Match>
+        <Class name="org.apache.velocity.runtime.RuntimeInstance"/>
+        <Bug pattern="UI_INHERITANCE_UNSAFE_GETRESOURCE"/>
+    </Match>
+    <Match>
+        <Class name="org.apache.velocity.util.StringUtils"/>
+        <Bug pattern="DM_CONVERT_CASE"/>
+    </Match>
+
+    <!-- there's actually good reason for these -->
+    <Match>
+        <Class name="org.apache.velocity.runtime.parser.node.ASTReference"/>
+        <Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/>
+    </Match>
+    <Match>
+        <Class name="org.apache.velocity.util.introspection.ClassMap$MethodCache"/>
+        <Bug pattern="URF_UNREAD_FIELD"/>
+    </Match>
+    <Match>
+        <Class name="org.apache.velocity.runtime.resource.loader.DataSourceResourceLoader"/>
+        <Bug pattern="SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING"/>
+    </Match>
+    <Match>
+        <Class name="org.apache.velocity.runtime.directive.Define$Block"/>
+        <Bug pattern="NP_TOSTRING_COULD_RETURN_NULL"/>
+    </Match>
+    <Match>
+        <Class name="org.apache.velocity.runtime.resource.loader.FileResourceLoader"/>
+        <Bug pattern="NP_LOAD_OF_KNOWN_NULL_VALUE"/>
+    </Match>
+    <Match>
+        <Class name="org.apache.velocity.runtime.log.Log4JLogChute"/>
+        <Bug pattern="DLS_DEAD_LOCAL_STORE"/>
+    </Match>
+    <Match>
+        <Class name="org.apache.velocity.util.MapFactory"/>
+        <Or>
+            <Bug pattern="DE_MIGHT_IGNORE"/>
+            <Bug pattern="REC_CATCH_EXCEPTION"/>
+        </Or>
+    </Match>
+    <Match>
+        <Class name="org.apache.velocity.util.introspection.SecureUberspector"/>
+        <Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"/>
+    </Match>
+    <Match>
+        <Class name="org.apache.velocity.runtime.VelocimacroFactory"/>
+        <Bug pattern="IS2_INCONSISTENT_SYNC"/>
+    </Match>
+
+</FindBugsFilter>

Propchange: velocity/engine/trunk/build/findbugs-exclude.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: velocity/engine/trunk/build/findbugs-exclude.xml
------------------------------------------------------------------------------
    svn:executable = *

Propchange: velocity/engine/trunk/build/findbugs-exclude.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: velocity/engine/trunk/pom.xml
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/pom.xml?rev=718456&r1=718455&r2=718456&view=diff
==============================================================================
--- velocity/engine/trunk/pom.xml (original)
+++ velocity/engine/trunk/pom.xml Mon Nov 17 17:04:56 2008
@@ -311,7 +311,8 @@
         <configuration>
           <xmlOutput>true</xmlOutput>
           <threshold>Low</threshold>
-          <effort>Max</effort> 
+          <effort>Max</effort>
+          <excludeFilterFile>build/findbugs-exclude.xml</excludeFilterFile>
           <findbugsXmlOutputDirectory>xdocs</findbugsXmlOutputDirectory> 
         </configuration>
       </plugin>