Bug 1365878 - Change severity of NewApi lint checks from warning to error; r?nalexander draft
authorTeng-pao Yu <osimpleo@gmail.com>
Tue, 16 May 2017 17:10:10 +0800
changeset 583510 64539128d14c093d6f4fc22be00f5b121a8eea33
parent 583335 96e18bec9fc8a5ce623c16167c12756bbe190d73
child 630081 f147062a7822e7f6c70c467333d91349c4a0914e
push id60418
push userbmo:osimpleo@gmail.com
push dateWed, 24 May 2017 05:47:31 +0000
reviewersnalexander
bugs1365878
milestone55.0a1
Bug 1365878 - Change severity of NewApi lint checks from warning to error; r?nalexander Change severity of newapi to error and white list current not fixed newapi problems So future unchecked NewApi issues will be blocked MozReview-Commit-ID: 7dlNwnJ2Fps
mobile/android/app/lint.xml
--- a/mobile/android/app/lint.xml
+++ b/mobile/android/app/lint.xml
@@ -28,24 +28,48 @@
          We did this so we can land lint in automation
          and not fail everything. -->
     <issue id="AppCompatResource" severity="warning" />
     <issue id="GoogleAppIndexingDeepLinkError" severity="warning" />
     <issue id="GoogleAppIndexingUrlError" severity="warning" />
     <issue id="Instantiatable" severity="warning" />
     <issue id="LongLogTag" severity="warning" />
     <issue id="MissingPermission" severity="warning" />
-    <issue id="NewApi" 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" />
 
+    <!-- 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"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/db/PerProfileDatabaseProvider.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/PrintHelper.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/animation/PropertyAnimator.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/RemotePresentationService.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/db/SharedBrowserDatabaseProvider.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/toolbar/TabCounter.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/tabs/TabPanelBackButton.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/toolbar/ToolbarEditText.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/util/ViewUtil.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/webapps/WebAppActivity.java"/>
+        <ignore path="**/mobile/android/base/java/org/mozilla/gecko/IntentHelper.java"/>
+        <ignore path="**/media/webrtc/trunk/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioEffects.java"/>
+        <ignore path="**/media/webrtc/trunk/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java"/>
+        <ignore path="**/mobile/android/base/resources/values/styles.xml"/>
+        <ignore path="**/mobile/android/base/resources/values/themes.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" />
 
     <!-- WHEN YOU FIX A LINT WARNING, ADD IT TO THIS LIST.
 
          We want all lint warnings to be fatal errors.