Bug 1366644 - Part 3b: Ignore new lint warnings. r=maliu
authorNick Alexander <nalexander@mozilla.com>
Tue, 17 Oct 2017 14:09:50 -0700
changeset 386855 15f9515982b753b20cf9f4baaff636730a22ec48
parent 386854 1c49a7a7cb5ecab97b2bd3a3384631e6718b748f
child 386856 4e79dee55e2509aadfcf379fd51e97f42309763f
push id96311
push userarchaeopteryx@coole-files.de
push dateWed, 18 Oct 2017 09:52:02 +0000
treeherdermozilla-inbound@a8a1e8cc1980 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmaliu
bugs1366644
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1366644 - Part 3b: Ignore new lint warnings. r=maliu MozReview-Commit-ID: 4bPUQkELdd
mobile/android/app/lint.xml
mobile/android/app/src/main/res/values-v21/integers.xml
mobile/android/base/java/org/mozilla/gecko/menu/GeckoMenuInflater.java
--- a/mobile/android/app/lint.xml
+++ b/mobile/android/app/lint.xml
@@ -35,16 +35,19 @@
     <issue id="MissingPermission" severity="warning" />
     <issue id="OnClick" severity="warning" />
     <issue id="ReferenceType" severity="warning" />
     <issue id="ResourceAsColor" severity="warning" />
     <issue id="ResourceType" severity="warning" />
     <issue id="ValidFragment" severity="warning" />
     <issue id="WrongConstant" severity="warning" />
 
+    <!-- New Android-Gradle lint integration regressed this check. -->
+    <issue id="MissingRegistered" severity="warning" />
+
     <!-- Fixes are in progress but we would like to block future candidates.
          The ** in the path are wildcards. We need these wildcards to not change our code structure.
          See: http://stackoverflow.com/questions/43994420/what-path-is-the-issue-ignore-path-element-in-lint-xml-relative-to -->
     <issue id="NewApi" severity="error">
         <ignore path="**/mobile/android/base/java/org/mozilla/gecko/activitystream/ActivityStreamPreference.java"/>
         <ignore path="**/mobile/android/base/java/org/mozilla/gecko/dlc/DownloadContentTelemetry.java"/>
         <ignore path="**/mobile/android/base/java/org/mozilla/gecko/preferences/LocaleListPreference.java"/>
         <ignore path="**/mobile/android/base/java/org/mozilla/gecko/media/MediaControlService.java"/>
@@ -62,16 +65,40 @@
         <ignore path="src/photon/res/values/styles.xml"/>
     </issue>
 
     <!-- We fixed all "Registered" lint errors. However the current gradle plugin has a bug where
          it ignores @SuppressLint annotations for this check. See CrashReporter class and
          https://code.google.com/p/android/issues/detail?id=204846 -->
     <issue id="Registered" severity="warning" />
 
+    <issue id="ObjectAnimatorBinding" severity="error">
+        <!-- Two animated properties are provided by the underlying
+             View implementation. -->
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/firstrun/FirstrunPager.java"/>
+    </issue>
+
+    <!-- Tracked by Bug 1409550. -->
+    <issue id="AppCompatCustomView" severity="error">
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/firstrun/FirstrunPager.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/home/PanelHeaderView.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/menu/MenuItemDefault.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/tabs/TabPanelBackButton.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/widget/AllCapsTextView.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/widget/ClickableWhenDisabledEditText.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/widget/EllipsisTextView.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/widget/SquaredImageView.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/widget/themed/ThemedEditText.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/widget/themed/ThemedImageButton.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/widget/themed/ThemedImageView.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/widget/themed/ThemedTextView.java"/>
+        <ignore path="**/mobile/android/search/java/org/mozilla/search/ui/BackCaptureEditText.java"/>
+        <ignore path="**/mobile/android/search/java/org/mozilla/search/ui/FacetBar.java"/>
+    </issue>
+
     <!-- WHEN YOU FIX A LINT WARNING, ADD IT TO THIS LIST.
 
          We want all lint warnings to be fatal errors.
          This is the list of checks that we've explicitly
          set as errors. Ideally, once we have no more warnings,
          we switch to the `warningsAsErrors` lint option
          (bug 1253737) rather than listing everything explicitly. -->
     <issue id="AaptCrash" severity="error" />
@@ -146,17 +173,16 @@
     <issue id="ManifestTypo" severity="error" />
     <issue id="MenuTitle" severity="error" />
     <issue id="MergeRootFrame" severity="error" />
     <issue id="MipmapIcons" severity="error" />
     <issue id="MissingApplicationIcon" severity="error" />
     <issue id="MissingId" severity="error" />
     <issue id="MissingPrefix" severity="error" />
     <issue id="MissingQuantity" severity="error" />
-    <issue id="MissingRegistered" severity="error" />
     <issue id="MissingSuperCall" severity="error" />
     <issue id="MissingTranslation" severity="error" />
     <issue id="MissingVersion" severity="error" />
     <issue id="MockLocation" severity="error" />
     <issue id="MultipleUsesSdk" severity="error" />
     <issue id="NamespaceTypo" severity="error" />
     <issue id="NestedScrolling" severity="error" />
     <issue id="NfcTechWhitespace" severity="error" />
--- a/mobile/android/app/src/main/res/values-v21/integers.xml
+++ b/mobile/android/app/src/main/res/values-v21/integers.xml
@@ -1,10 +1,10 @@
 <?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/. -->
 
-<resources>
+<resources xmlns:tools="http://schemas.android.com/tools">
 
-    <integer name="search_assist_launch_res">@drawable/search_launcher</integer>
+    <integer name="search_assist_launch_res" tools:ignore="ReferenceType">@drawable/search_launcher</integer>
 
 </resources>
--- a/mobile/android/base/java/org/mozilla/gecko/menu/GeckoMenuInflater.java
+++ b/mobile/android/base/java/org/mozilla/gecko/menu/GeckoMenuInflater.java
@@ -1,24 +1,24 @@
 /* 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/. */
 
 package org.mozilla.gecko.menu;
 
 import java.io.IOException;
 
-import org.mozilla.gecko.AppConstants.Versions;
 import org.mozilla.gecko.R;
 import org.xmlpull.v1.XmlPullParser;
 import org.xmlpull.v1.XmlPullParserException;
 
 import android.content.Context;
 import android.content.res.TypedArray;
 import android.content.res.XmlResourceParser;
+import android.support.annotation.XmlRes;
 import android.util.AttributeSet;
 import android.util.Xml;
 import android.view.InflateException;
 import android.view.Menu;
 import android.view.MenuInflater;
 import android.view.MenuItem;
 import android.view.SubMenu;
 
@@ -45,17 +45,17 @@ public class GeckoMenuInflater extends M
     }
 
     public GeckoMenuInflater(Context context) {
         super(context);
         mContext = context;
     }
 
     @Override
-    public void inflate(int menuRes, Menu menu) {
+    public void inflate(@XmlRes int menuRes, Menu menu) {
 
         // This does not check for a well-formed XML.
 
         XmlResourceParser parser = null;
         try {
             parser = mContext.getResources().getXml(menuRes);
             AttributeSet attrs = Xml.asAttributeSet(parser);