Bug 1320176 - Findbugs: Add exclude configuration for unfixed classes of bugs. r=ahunt,maliu
authorSebastian Kaspari <s.kaspari@gmail.com>
Fri, 25 Nov 2016 12:13:32 +0100
changeset 324607 42d401cd93035173e061777bffecb56e7a495433
parent 324606 c19d198344856c479c55b4933201f9cedefbdecd
child 324608 e14bd02536e9615f0284b81d3a90a7388eb7ebd1
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersahunt, maliu
bugs1320176
milestone53.0a1
Bug 1320176 - Findbugs: Add exclude configuration for unfixed classes of bugs. r=ahunt,maliu MozReview-Commit-ID: FXZzcht1c7A
mobile/android/app/build.gradle
mobile/android/app/findbugs-exclude.xml
--- a/mobile/android/app/build.gradle
+++ b/mobile/android/app/build.gradle
@@ -431,16 +431,18 @@ android.applicationVariants.all { varian
         effort = "max"         // Using more memory and time to find issues is acceptable in automation
         reportLevel = "high"   // For now we only care about high priority bugs. After we have fixed
                                // the issues with medium/low priority we can lower the report level here.
 
         classes = files("$project.buildDir/intermediates/classes")
         source = variant.javaCompile.source
         classpath = variant.javaCompile.classpath
 
+        excludeFilter = file("findbugs-exclude.xml")
+
         reports {
             html.enabled = true // We only care about HTML reports for humans
             xml.enabled = false
 
             html.destination = "$project.buildDir/outputs/findbugs/findbugs-${variant.name}-output.html"
         }
 
         dependsOn "assemble${variant.name.capitalize()}"
new file mode 100644
--- /dev/null
+++ b/mobile/android/app/findbugs-exclude.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+   - License, v. 2.0. If a copy of the MPL was not distributed with this
+   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+<FindBugsFilter>
+
+  <!-- Bug 1315982 -->
+  <Match>
+    <Bug pattern="DE_MIGHT_IGNORE" />
+  </Match>
+
+  <!-- Bug 1316006 -->
+  <Match>
+    <Bug pattern="DMI_INVOKING_TOSTRING_ON_ARRAY" />
+  </Match>
+
+  <!-- Bug 1316005 -->
+  <Match>
+    <Bug pattern="UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS" />
+  </Match>
+
+  <!-- Bug 1316008 -->
+  <Match>
+    <Bug pattern="DM_DEFAULT_ENCODING" />
+  </Match>
+
+  <!-- Bug 1320298 -->
+  <Match>
+    <Bug pattern="MS_MUTABLE_ARRAY" />
+  </Match>
+
+  <!-- Bug 1316009 -->
+  <Match>
+    <Bug pattern="MS_SHOULD_BE_FINAL" />
+  </Match>
+
+  <!-- Bug 1316010 -->
+  <Match>
+    <Bug pattern="UL_UNRELEASED_LOCK" />
+  </Match>
+
+  <!-- Bug 1316011 -->
+  <Match>
+    <Bug pattern="VO_VOLATILE_INCREMENT" />
+  </Match>
+
+  <!-- Bug 1316012 -->
+  <Match>
+    <Bug pattern="DM_BOXED_PRIMITIVE_FOR_PARSING" />
+  </Match>
+
+  <!-- Bug 1316021 -->
+  <Match>
+    <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
+  </Match>
+
+  <!-- Bug 1316023 -->
+  <Match>
+    <Bug pattern="UC_USELESS_CONDITION" />
+  </Match>
+
+  <!-- Bug 1320316 -->
+  <Match>
+    <Bug pattern="DM_BOXED_PRIMITIVE_TOSTRING" />
+  </Match>
+    <Match>
+    <Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT" />
+  </Match>
+    <Match>
+    <Bug pattern="NP_NULL_ON_SOME_PATH" />
+  </Match>
+    <Match>
+    <Bug pattern="NP_NULL_PARAM_DEREF_NONVIRTUAL" />
+  </Match>
+
+</FindBugsFilter>