Going through the suppressions that do still hide a finding, most of them are hiding something the check has no way of knowing: widget layouts cannot use AppCompat attributes, a browser has to permit cleartext, a custom tabs service has to be exported unprotected, and a root view that something looks up by id cannot become a merge tag. Those are worth keeping. The rest are ordinary gaps, so drop their suppressions and let the baseline record them as work: images with no description, an inconsistent gravity, a prompt field with no autofill setting, two layouts nested for no reason, and two manifests that configure backup for Android 12 but not for the versions below it. Also move one suppression off a root element, where it was quietly covering everything beneath it, onto the single view that needs it. One is worth fixing outright rather than recording. A Focus preference key is written across three lines, and the leading whitespace is the whole of what the check objects to; writing it inline like its seventy neighbours removes the finding and the ignore that hid it, which sharing the configuration had extended to Fenix as well. Differential Revision: https://phabricator.services.mozilla.com/D317706
108 lines
5.2 KiB
XML
108 lines
5.2 KiB
XML
<?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/. -->
|
|
|
|
<!-- Shared Android lint rules for the Fenix and Focus applications. Referenced explicitly through
|
|
`lintConfig` in each app's build.gradle rather than being named lint.xml, so that it is never
|
|
picked up implicitly by another project through lint's directory hierarchy. -->
|
|
<lint>
|
|
<!-- The android-lint mozlint task reports every issue in the lint report as a failure, including
|
|
the informational note lint emits about findings filtered by the baseline. Silence just that
|
|
note; the baseline itself still grandfathers the underlying findings. -->
|
|
<issue id="LintBaseline" severity="ignore" />
|
|
|
|
<!-- Lints that don't apply to our translation process -->
|
|
<issue id="MissingTranslation" severity="ignore" />
|
|
<issue id="MissingQuantity" severity="ignore" />
|
|
<issue id="ImpliedQuantity" severity="ignore" />
|
|
<issue id="PluralsCandidate" severity="ignore" />
|
|
<issue id="StringFormatCount" severity="ignore" />
|
|
<issue id="TypographyEllipsis" severity="ignore" />
|
|
<issue id="ExtraTranslation" severity="ignore" />
|
|
<issue id="Untranslatable" severity="ignore" />
|
|
<issue id="MissingDefaultResource" severity="ignore" />
|
|
<!-- Which plural forms a language needs and whether to use a fraction character are the translators'
|
|
call, and the localized files come from the l10n import, so only check the default strings. -->
|
|
<issue id="UnusedQuantity">
|
|
<ignore path="**/values-*/strings.xml" />
|
|
</issue>
|
|
<issue id="TypographyFractions">
|
|
<ignore path="**/values-*/strings.xml" />
|
|
</issue>
|
|
<issue id="BrandUsage" severity="error">
|
|
<ignore path="**/values-*/strings.xml" />
|
|
<ignore path="**/values/*_strings.xml" />
|
|
<ignore path="**/values/app.xml" />
|
|
</issue>
|
|
<issue id="IncorrectStraightQuote" severity="error">
|
|
<ignore path="**/values-*/strings.xml" />
|
|
</issue>
|
|
<issue id="IncorrectStraightDoubleQuote" severity="error">
|
|
<ignore path="**/values-*/strings.xml" />
|
|
<ignore path="**/values/*_strings.xml" />
|
|
</issue>
|
|
<issue id="IncorrectEllipsisCharacter" severity="error">
|
|
<ignore path="**/values-*/strings.xml" />
|
|
</issue>
|
|
<issue id="BlankString" severity="error">
|
|
<ignore path="**/values/*_strings.xml" />
|
|
</issue>
|
|
<issue id="PlaceholderComment" severity="error">
|
|
<ignore path="**/values-*/strings.xml" />
|
|
<ignore path="**/values/*_strings.xml" />
|
|
</issue>
|
|
<issue id="Typos" severity="error">
|
|
<ignore path="**/values-*/strings.xml" />
|
|
</issue>
|
|
|
|
<!-- Lints that are disabled by default -->
|
|
<issue id="ConvertToWebp" severity="warning" />
|
|
|
|
<!-- Performance: big wins from a theoretical perspective so we escalate to error. -->
|
|
<issue id="DrawAllocation" severity="error" />
|
|
<issue id="Wakelock" severity="error" />
|
|
<issue id="WakelockTimeout" severity="error" />
|
|
<issue id="Recycle" severity="error" />
|
|
<issue id="StaticFieldLeak" severity="error" />
|
|
<issue id="ViewTag" severity="error" />
|
|
<issue id="ViewHolder" severity="error" />
|
|
<issue id="HandlerLeak" severity="error" />
|
|
<issue id="NestedWeights" severity="error" />
|
|
|
|
<!-- Performance: quick-to-fix violations so we escalate to error.
|
|
We haven't validated that they have a significant impact though. -->
|
|
<issue id="ObsoleteLayoutParam" severity="error" />
|
|
<issue id="ObsoleteSdkInt" severity="error" />
|
|
<issue id="AnimatorKeep" severity="error" />
|
|
<issue id="DuplicateDivider" severity="error" />
|
|
<issue id="MergeRootFrame" severity="error" />
|
|
<issue id="UseOfBundledGooglePlayServices" severity="error" />
|
|
<issue id="UseValueOf" severity="error" />
|
|
<issue id="InefficientWeight" severity="error" />
|
|
<issue id="DisableBaselineAlignment" severity="error" />
|
|
<issue id="UselessLeaf" severity="error" />
|
|
<issue id="UselessParent" severity="error" />
|
|
<issue id="UnusedNamespace" severity="error" />
|
|
<issue id="UnusedResources" severity="error">
|
|
<!-- Localized strings are removed by the l10n import a while after the string is removed from
|
|
the default strings.xml, so the localized files temporarily hold unreferenced strings. -->
|
|
<ignore path="**/values-*/strings.xml" />
|
|
</issue>
|
|
<issue id="UseCompoundDrawables" severity="error" />
|
|
<issue id="Overdraw" severity="error" />
|
|
|
|
<!-- Performance: checks that we're unsure of the value of that we might want to investigate. -->
|
|
<issue id="UnpackedNativeCode" severity="informational" />
|
|
<issue id="LogConditional" severity="informational" />
|
|
<issue id="UseSparseArrays" severity="informational" /> <!-- hurts developer convenience of kotlin Map... -->
|
|
|
|
<!-- Ignore due to baseline bloat and lack of actionability -->
|
|
<issue id="VectorPath" severity="ignore" />
|
|
|
|
<!-- Correctness: checks with increased severity -->
|
|
<issue id="ModifierParameter" severity="error" />
|
|
<issue id="PrivateResource" severity="error" />
|
|
|
|
</lint>
|