Enforce lint cleanliness when building (#3363)
* Enforce lint cleanliness when building The volume of lintable issues is growing. To stem the tide: 1. Add `app/lint-baseline.xml`, which contains the current set of lint issues. Any issue appearing here will not cause the build to fail. 2. Move lint configuration settings in to `lint.xml`. 3. Update the lint configuration so that any issue (i.e., any issue not in lint-baseline.xml) causes a build failure. 4. Add the lint tasks as depedency when assembling an APK, to ensure the lint checks are run. * lint: Convert launcher images to webp * Move lint.xml location * Don't lint when assembling * Update baseline
|
@ -58,8 +58,12 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
lint {
|
lint {
|
||||||
disable 'MissingTranslation'
|
lintConfig file("lint.xml")
|
||||||
|
// Regenerate by deleting app/lint-baseline.xml, then run:
|
||||||
|
// ./gradlew lintBlueDebug
|
||||||
|
baseline = file("lint-baseline.xml")
|
||||||
}
|
}
|
||||||
|
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
buildConfig true
|
buildConfig true
|
||||||
resValues true
|
resValues true
|
||||||
|
|
8957
app/lint-baseline.xml
Normal file
32
app/lint.xml
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
~ Copyright 2023 Tusky Contributors
|
||||||
|
~
|
||||||
|
~ This file is a part of Tusky.
|
||||||
|
~
|
||||||
|
~ This program is free software; you can redistribute it and/or modify it under the terms of the
|
||||||
|
~ GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
||||||
|
~ License, or (at your option) any later version.
|
||||||
|
~
|
||||||
|
~ Tusky is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||||
|
~ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||||
|
~ Public License for more details.
|
||||||
|
~
|
||||||
|
~ You should have received a copy of the GNU General Public License along with Tusky; if not,
|
||||||
|
~ see <http://www.gnu.org/licenses>.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<lint>
|
||||||
|
<!-- Missing translations are OK -->
|
||||||
|
<issue id="MissingTranslation" severity="ignore" />
|
||||||
|
|
||||||
|
<!-- Duplicate strings are OK. This can happen when e.g., "favourite" appears as both
|
||||||
|
a noun and a verb -->
|
||||||
|
<issue id="DuplicateStrings" severity="ignore" />
|
||||||
|
|
||||||
|
<!-- Ensure we are warned about errors in the baseline -->
|
||||||
|
<issue id="LintBaseline" severity="warning" />
|
||||||
|
|
||||||
|
<!-- Mark all other lint issues as errors -->
|
||||||
|
<issue id="all" severity="error" />
|
||||||
|
</lint>
|
Before Width: | Height: | Size: 4.6 KiB |
BIN
app/src/green/res/mipmap-hdpi/ic_launcher.webp
Normal file
After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 2.9 KiB |
BIN
app/src/green/res/mipmap-mdpi/ic_launcher.webp
Normal file
After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 6.4 KiB |
BIN
app/src/green/res/mipmap-xhdpi/ic_launcher.webp
Normal file
After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 10 KiB |
BIN
app/src/green/res/mipmap-xxhdpi/ic_launcher.webp
Normal file
After Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 14 KiB |
BIN
app/src/green/res/mipmap-xxxhdpi/ic_launcher.webp
Normal file
After Width: | Height: | Size: 11 KiB |