forked from ankidroid/Anki-Android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lint-release.xml
362 lines (353 loc) · 18.8 KB
/
lint-release.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
<?xml version="1.0" encoding="UTF-8"?>
<!-- INFORMATION ABOUT USAGE
We use this file bacause we want to enable for the release build various checks from the
Android SDK(initially just NewApi and InlinedApi) plus our own custom Anki time usage related
checks. Using the check() method on lintOptions in the lint.gradle file would be nice but it
doesn't work as it will NOT recognize any custom Lint checks(from a local module(like lint-rules)
or from a library added as a dependency) .
To allow more checks for the release build you will need to modify this file to change the
severity of that check to fatal. For example, to enable for release the WrongViewCast check
change:
<issue id="WrongViewCast" severity="fatal" />
Also, note that any NEW issue will appear when linting as this is not an exclusive list of
issues to use in linting, it's a file used to declare how the issues are applied to the project.
If a NEW issue is created by the Android framework or added by other libraries which should be
disabled for release then add it to this file like this:
<issue id="NewIssueId" severity="ignore"/>
-->
<lint>
<issue id="NewApi" severity="fatal" />
<issue id="HardcodedText" severity="fatal" />
<issue id="InlinedApi" severity="fatal" />
<issue id="StringFormatCount" severity="fatal" />
<issue id="StringFormatMatches" severity="fatal" />
<issue id="StringFormatInvalid" severity="fatal" />
<issue id="UnusedResources" severity="fatal">
<!-- Ignore as they'll be used for #7526 -->
<ignore regexp="content_picture\.png|device_access_mic\.png" />
<!-- Remove once #6772 is complete -->
<ignore regexp="edit_text_color_enabled_selector\.xml" />
<ignore regexp="multiline_spinner_item\.xml" />
<!-- end: Remove once #6772 is complete -->
<ignore path="res/values/12-dont-translate.xml" />
<!-- Ignore all translations except values - CrowdIn will handle deletions -->
<!-- We only need to handle -af and all others are implicitly ignored -->
<!-- tested and this does not block a string in /values/ from triggering lint -->
<ignore path="res/values-af/" />
</issue>
<issue id="ViewConstructor" severity="fatal" />
<issue id="ViewHolder" severity="fatal" />
<issue id="ViewTag" severity="fatal" />
<issue id="WrongConstant" severity="fatal" />
<issue id="WrongViewCast" severity="fatal" />
<issue id="UnknownId" severity="fatal" />
<!-- RTL Rules -->
<issue id="RtlCompat" severity="fatal" />
<issue id="RtlEnabled" severity="fatal" />
<issue id="RtlHardcoded" severity="fatal" />
<!-- RtlSymmetry is disabled because we already have RtlHardcoded rule enabled -->
<issue id="RtlSymmetry" severity="ignore" />
<!-- Allows Timber issues defined for AnkiDroid without an api dependency on Timber -->
<issue id="UnknownIssueId" severity="ignore" />
<issue id="UseCompatTextViewDrawableXml" severity="ignore" />
<issue id="AcceptsUserCertificates" severity="ignore" />
<issue id="RedundantNamespace" severity="ignore" />
<issue id="Autofill" severity="ignore" />
<issue id="ContentDescription" severity="ignore" />
<issue id="AddJavascriptInterface" severity="ignore" />
<issue id="ShortAlarm" severity="ignore" />
<issue id="AllCaps" severity="ignore" />
<issue id="AllowAllHostnameVerifier" severity="ignore" />
<issue id="AlwaysShowAction" severity="ignore" />
<issue id="InvalidUsesTagAttribute" severity="ignore" />
<issue id="MissingIntentFilterForMediaSearch" severity="ignore" />
<issue id="MissingMediaBrowserServiceIntentFilter" severity="ignore" />
<issue id="MissingOnPlayFromSearch" severity="ignore" />
<issue id="ImpliedTouchscreenHardware" severity="ignore" />
<issue id="MissingTvBanner" severity="ignore" />
<issue id="MissingLeanbackLauncher" severity="ignore" />
<issue id="MissingLeanbackSupport" severity="ignore" />
<issue id="PermissionImpliesUnsupportedHardware" severity="ignore" />
<issue id="UnsupportedTvHardware" severity="ignore" />
<issue id="SupportAnnotationUsage" severity="ignore" />
<issue id="ShiftFlags" severity="ignore" />
<issue id="LocalSuppress" severity="ignore" />
<issue id="SwitchIntDef" severity="ignore" />
<issue id="UniqueConstants" severity="ignore" />
<issue id="Override" severity="ignore" />
<issue id="ObsoleteSdkInt" severity="ignore" />
<issue id="UnusedAttribute" severity="ignore" />
<issue id="AppCompatMethod" severity="ignore" />
<issue id="AppCompatCustomView" severity="ignore" />
<issue id="AppCompatResource" severity="ignore" />
<issue id="GoogleAppIndexingApiWarning" severity="ignore" />
<issue id="GoogleAppIndexingWarning" severity="ignore" />
<issue id="AppLinksAutoVerifyError" severity="ignore" />
<issue id="AppLinksAutoVerifyWarning" severity="ignore" />
<issue id="AppLinkUrlError" severity="ignore" />
<issue id="TestAppLink" severity="ignore" />
<issue id="InconsistentArrays" severity="ignore" />
<issue id="Assert" severity="ignore" />
<issue id="BadHostnameVerifier" severity="ignore" />
<issue id="BatteryLife" severity="ignore" />
<issue id="BackButton" severity="ignore" />
<issue id="ButtonCase" severity="ignore" />
<issue id="ButtonOrder" severity="ignore" />
<issue id="ButtonStyle" severity="ignore" />
<issue id="ByteOrderMark" severity="ignore" />
<issue id="MissingSuperCall" severity="ignore" />
<issue id="AdapterViewChildren" severity="ignore" />
<issue id="ScrollViewCount" severity="ignore" />
<issue id="PermissionImpliesUnsupportedChromeOsHardware" severity="ignore" />
<issue id="UnsupportedChromeOsHardware" severity="ignore" />
<issue id="GetInstance" severity="ignore" />
<issue id="CommitTransaction" severity="ignore" />
<issue id="Recycle" severity="ignore" />
<issue id="CommitPrefEdits" severity="ignore" />
<issue id="ApplySharedPref" severity="ignore" />
<issue id="ClickableViewAccessibility" severity="ignore" />
<issue id="EasterEgg" severity="ignore" />
<issue id="StopShip" severity="ignore" />
<issue id="MissingConstraints" severity="ignore" />
<issue id="VulnerableCordovaVersion" severity="ignore" />
<issue id="CustomViewStyleable" severity="ignore" />
<issue id="CutPasteId" severity="ignore" />
<issue id="SimpleDateFormat" severity="ignore" />
<issue id="SetTextI18n" severity="ignore" />
<issue id="Deprecated" severity="ignore" />
<issue id="MissingPrefix" severity="ignore" />
<issue id="MangledCRLF" severity="ignore" />
<issue id="DuplicateIncludedIds" severity="ignore" />
<issue id="DuplicateIds" severity="ignore" />
<issue id="DuplicateDefinition" severity="ignore" />
<issue id="ReferenceType" severity="ignore" />
<issue id="StringEscaping" severity="ignore" />
<issue id="UnpackedNativeCode" severity="ignore" />
<issue id="UnsafeDynamicallyLoadedCode" severity="ignore" />
<issue id="UnsafeNativeCodeLocation" severity="ignore" />
<issue id="EllipsizeMaxLines" severity="ignore" />
<issue id="ExifInterface" severity="ignore" />
<issue id="ExtraText" severity="ignore" />
<issue id="FieldGetter" severity="ignore" />
<issue id="InvalidAnalyticsName" severity="ignore" />
<issue id="MissingFirebaseInstanceTokenRefresh" severity="ignore" />
<issue id="FontValidationError" severity="ignore" />
<issue id="FontValidationWarning" severity="ignore" />
<issue id="FullBackupContent" severity="ignore" />
<issue id="ValidFragment" severity="ignore" />
<issue id="GetContentDescriptionOverride" severity="ignore" />
<issue id="PackageManagerGetSignatures" severity="ignore" />
<issue id="AccidentalOctal" severity="ignore" />
<issue id="UseOfBundledGooglePlayServices" severity="ignore" />
<issue id="GradleCompatible" severity="ignore" />
<issue id="GradleDependency" severity="ignore" />
<issue id="GradleDeprecated" severity="ignore" />
<issue id="DevModeObsolete" severity="ignore" />
<issue id="DuplicatePlatformClasses" severity="ignore" />
<issue id="GradleGetter" severity="ignore" />
<issue id="GradlePluginVersion" severity="ignore" />
<issue id="HighAppVersionCode" severity="ignore" />
<issue id="GradleIdeError" severity="ignore" />
<issue id="GradlePath" severity="ignore" />
<issue id="GradleDynamicVersion" severity="ignore" />
<issue id="NotInterpolated" severity="ignore" />
<issue id="StringShouldBeInt" severity="ignore" />
<issue id="NewerVersionAvailable" severity="ignore" />
<issue id="MinSdkTooLow" severity="ignore" />
<issue id="GridLayout" severity="ignore" />
<issue id="HandlerLeak" severity="ignore" />
<issue id="HardcodedDebugMode" severity="ignore" />
<issue id="HardwareIds" severity="ignore" />
<issue id="IconDuplicatesConfig" severity="ignore" />
<issue id="IconDuplicates" severity="ignore" />
<issue id="GifUsage" severity="ignore" />
<issue id="IconColors" severity="ignore" />
<issue id="IconDensities" severity="ignore" />
<issue id="IconDipSize" severity="ignore" />
<issue id="IconExpectedSize" severity="ignore" />
<issue id="IconExtension" severity="ignore" />
<issue id="IconLauncherShape" severity="ignore" />
<issue id="IconLocation" severity="ignore" />
<issue id="IconMissingDensityFolder" severity="ignore" />
<issue id="IconMixedNinePatch" severity="ignore" />
<issue id="IconNoDpi" severity="ignore" />
<issue id="IconXmlAndPng" severity="ignore" />
<issue id="ConvertToWebp" severity="ignore" />
<issue id="WebpUnsupported" severity="ignore" />
<issue id="IncludeLayoutParam" severity="ignore" />
<issue id="DisableBaselineAlignment" severity="ignore" />
<issue id="InefficientWeight" severity="ignore" />
<issue id="NestedWeights" severity="ignore" />
<issue id="Orientation" severity="ignore" />
<issue id="Suspicious0dp" severity="ignore" />
<issue id="InstantApps" severity="ignore" />
<issue id="DuplicateDivider" severity="ignore" />
<issue id="TrustAllX509TrustManager" severity="ignore" />
<issue id="InvalidImeActionId" severity="ignore" />
<issue id="InvalidPackage" severity="ignore" />
<issue id="DrawAllocation" severity="ignore" />
<issue id="UseSparseArrays" severity="ignore" />
<issue id="UseValueOf" severity="ignore" />
<issue id="JavascriptInterface" severity="ignore" />
<issue id="JobSchedulerService" severity="ignore" />
<issue id="KeyboardInaccessibleWidget" severity="ignore" />
<issue id="LabelFor" severity="ignore" />
<issue id="InconsistentLayout" severity="ignore" />
<issue id="InflateParams" severity="ignore" />
<issue id="StaticFieldLeak" severity="ignore" />
<issue id="DefaultLocale" severity="ignore" />
<issue id="LocaleFolder" severity="ignore" />
<issue id="GetLocales" severity="ignore" />
<issue id="InvalidResourceFolder" severity="ignore" />
<issue id="WrongRegion" severity="ignore" />
<issue id="UseAlpha2" severity="ignore" />
<issue id="LogConditional" severity="ignore" />
<issue id="LongLogTag" severity="ignore" />
<issue id="LogTagMismatch" severity="ignore" />
<issue id="AllowBackup" severity="ignore" />
<issue id="MissingApplicationIcon" severity="ignore" />
<issue id="DeviceAdmin" severity="ignore" />
<issue id="DuplicateActivity" severity="ignore" />
<issue id="DuplicateUsesFeature" severity="ignore" />
<issue id="GradleOverrides" severity="ignore" />
<issue id="IllegalResourceRef" severity="ignore" />
<issue id="MipmapIcons" severity="ignore" />
<issue id="MockLocation" severity="ignore" />
<issue id="MultipleUsesSdk" severity="ignore" />
<issue id="ManifestOrder" severity="ignore" />
<issue id="MissingVersion" severity="ignore" />
<issue id="OldTargetApi" severity="ignore" />
<issue id="UniquePermission" severity="ignore" />
<issue id="UsesMinSdkAttributes" severity="ignore" />
<issue id="WearableBindListener" severity="ignore" />
<issue id="WrongManifestParent" severity="ignore" />
<issue id="InvalidPermission" severity="ignore" />
<issue id="ManifestResource" severity="ignore" />
<issue id="ManifestTypo" severity="ignore" />
<issue id="MergeMarker" severity="ignore" />
<issue id="MergeRootFrame" severity="ignore" />
<issue id="IncompatibleMediaBrowserServiceCompatVersion" severity="ignore" />
<issue id="InnerclassSeparator" severity="ignore" />
<issue id="Instantiatable" severity="ignore" />
<issue id="MissingId" severity="ignore" />
<issue id="LibraryCustomView" severity="ignore" />
<issue id="ResAuto" severity="ignore" />
<issue id="NamespaceTypo" severity="ignore" />
<issue id="UnusedNamespace" severity="ignore" />
<issue id="NegativeMargin" severity="ignore" />
<issue id="NestedScrolling" severity="ignore" />
<issue id="NetworkSecurityConfig" severity="ignore" />
<issue id="MissingBackupPin" severity="ignore" />
<issue id="PinSetExpiry" severity="ignore" />
<issue id="NfcTechWhitespace" severity="ignore" />
<issue id="UnlocalizedSms" severity="ignore" />
<issue id="ObjectAnimatorBinding" severity="ignore" />
<issue id="AnimatorKeep" severity="ignore" />
<issue id="ObsoleteLayoutParam" severity="ignore" />
<issue id="OnClick" severity="ignore" />
<issue id="Overdraw" severity="ignore" />
<issue id="DalvikOverride" severity="ignore" />
<issue id="OverrideAbstract" severity="ignore" />
<issue id="ParcelCreator" severity="ignore" />
<issue id="UnusedQuantity" severity="ignore" />
<issue id="MissingQuantity" severity="ignore" />
<issue id="ImpliedQuantity" severity="ignore" />
<issue id="ExportedPreferenceActivity" severity="ignore" />
<issue id="PrivateApi" severity="ignore" />
<issue id="PackagedPrivateKey" severity="ignore" />
<issue id="PrivateResource" severity="ignore" />
<issue id="ProguardSplit" severity="ignore" />
<issue id="Proguard" severity="ignore" />
<issue id="PropertyEscape" severity="ignore" />
<issue id="UsingHttp" severity="ignore" />
<issue id="SpUsage" severity="ignore" />
<issue id="InOrMmUsage" severity="ignore" />
<issue id="PxUsage" severity="ignore" />
<issue id="SmallSp" severity="ignore" />
<issue id="ParcelClassLoader" severity="ignore" />
<issue id="PendingBindings" severity="ignore" />
<issue id="RecyclerView" severity="ignore" />
<issue id="Registered" severity="ignore" />
<issue id="RelativeOverlap" severity="ignore" />
<issue id="RequiredSize" severity="ignore" />
<issue id="AaptCrash" severity="ignore" />
<issue id="ResourceCycle" severity="ignore" />
<issue id="ResourceName" severity="ignore" />
<issue id="ValidRestrictions" severity="ignore" />
<issue id="ScrollViewSize" severity="ignore" />
<issue id="SdCardPath" severity="ignore" />
<issue id="SecureRandom" severity="ignore" />
<issue id="TrulyRandom" severity="ignore" />
<issue id="ExportedContentProvider" severity="ignore" />
<issue id="ExportedReceiver" severity="ignore" />
<issue id="ExportedService" severity="ignore" />
<issue id="SetWorldReadable" severity="ignore" />
<issue id="SetWorldWritable" severity="ignore" />
<issue id="GrantAllUris" severity="ignore" />
<issue id="WorldReadableFiles" severity="ignore" />
<issue id="WorldWriteableFiles" severity="ignore" />
<issue id="ServiceCast" severity="ignore" />
<issue id="WifiManagerLeak" severity="ignore" />
<issue id="WifiManagerPotentialLeak" severity="ignore" />
<issue id="SetJavaScriptEnabled" severity="ignore" />
<issue id="SignatureOrSystemPermissions" severity="ignore" />
<issue id="SQLiteString" severity="ignore" />
<issue id="SSLCertificateSocketFactoryCreateSocket" severity="ignore" />
<issue id="SSLCertificateSocketFactoryGetInsecure" severity="ignore" />
<issue id="StateListReachable" severity="ignore" />
<issue id="AuthLeak" severity="ignore" />
<issue id="PluralsCandidate" severity="ignore" />
<issue id="UseCheckPermission" severity="ignore" />
<issue id="CheckResult" severity="ignore" />
<issue id="ResourceAsColor" severity="ignore" />
<issue id="MissingPermission" severity="ignore" />
<issue id="Range" severity="ignore" />
<issue id="ResourceType" severity="ignore" />
<issue id="RestrictedApi" severity="ignore" />
<issue id="WrongThread" severity="ignore" />
<issue id="VisibleForTests" severity="ignore" />
<issue id="ProtectedPermissions" severity="ignore" />
<issue id="TextFields" severity="ignore" />
<issue id="TextViewEdits" severity="ignore" />
<issue id="SelectableText" severity="ignore" />
<issue id="MenuTitle" severity="ignore" />
<issue id="ShowToast" severity="ignore" />
<issue id="TooDeepLayout" severity="ignore" />
<issue id="TooManyViews" severity="ignore" />
<issue id="ExtraTranslation" severity="ignore" />
<issue id="MissingTranslation" severity="ignore" />
<issue id="Typos" severity="ignore" />
<issue id="TypographyDashes" severity="ignore" />
<issue id="TypographyEllipsis" severity="ignore" />
<issue id="TypographyFractions" severity="ignore" />
<issue id="TypographyOther" severity="ignore" />
<issue id="TypographyQuotes" severity="ignore" />
<issue id="UnsafeProtectedBroadcastReceiver" severity="ignore" />
<issue id="UnprotectedSMSBroadcastReceiver" severity="ignore" />
<issue id="UnusedIds" severity="ignore" />
<issue id="UseCompoundDrawables" severity="ignore" />
<issue id="UselessLeaf" severity="ignore" />
<issue id="UselessParent" severity="ignore" />
<issue id="EnforceUTF8" severity="ignore" />
<issue id="VectorRaster" severity="ignore" />
<issue id="VectorDrawableCompat" severity="ignore" />
<issue id="VectorPath" severity="ignore" />
<issue id="InvalidVectorPath" severity="ignore" />
<issue id="FindViewByIdCast" severity="ignore" />
<issue id="Wakelock" severity="ignore" />
<issue id="WakelockTimeout" severity="ignore" />
<issue id="InvalidWearFeatureAttribute" severity="ignore" />
<issue id="WearStandaloneAppFlag" severity="ignore" />
<issue id="WebViewLayout" severity="ignore" />
<issue id="WrongCall" severity="ignore" />
<issue id="WrongCase" severity="ignore" />
<issue id="InvalidId" severity="ignore" />
<issue id="NotSibling" severity="ignore" />
<issue id="UnknownIdInLayout" severity="ignore" />
<issue id="SuspiciousImport" severity="ignore" />
<issue id="WrongFolder" severity="ignore" />
<issue id="WrongThreadInterprocedural" severity="ignore" />
<issue id="CustomX509TrustManager" severity="ignore" />
<!-- PERF: Could improve by not using notifyDataSetChanged() -->
<issue id="NotifyDataSetChanged" severity="ignore" />
</lint>