mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-24 14:58:59 +03:00
Lint now check all the modules, but is does not check all the variants. Let's keep it like that for now
https://developer.android.com/studio/releases/gradle-plugin#running_lint_on_default_variant_only
This commit is contained in:
parent
b985092613
commit
ec6bae6b1e
4 changed files with 4 additions and 68 deletions
33
.github/workflows/quality.yml
vendored
33
.github/workflows/quality.yml
vendored
|
@ -37,38 +37,11 @@ jobs:
|
||||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-gradle-
|
${{ runner.os }}-gradle-
|
||||||
- name: Lint analysis of the SDK
|
- name: Lint analysis
|
||||||
run: ./gradlew clean :matrix-sdk-android:lintRelease --stacktrace
|
run: ./gradlew clean :vector:lint --stacktrace
|
||||||
- name: Upload reports
|
- name: Upload reports
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: linting-report-android-sdk
|
name: lint-report
|
||||||
path: matrix-sdk-android/build/reports/*.*
|
|
||||||
|
|
||||||
apk-lint:
|
|
||||||
name: Lint APK (${{ matrix.target }})
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.ref != 'refs/heads/main'
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
target: [ Gplay, Fdroid ]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.gradle/caches
|
|
||||||
~/.gradle/wrapper
|
|
||||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-gradle-
|
|
||||||
- name: Lint ${{ matrix.target }} release
|
|
||||||
run: ./gradlew clean lint${{ matrix.target }}Release --stacktrace
|
|
||||||
- name: Upload ${{ matrix.target }} linting report
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
if: always()
|
|
||||||
with:
|
|
||||||
name: release-debug-linting-report-${{ matrix.target }}
|
|
||||||
path: |
|
path: |
|
||||||
vector/build/reports/*.*
|
vector/build/reports/*.*
|
||||||
|
|
|
@ -67,10 +67,6 @@ android {
|
||||||
installOptions "-g"
|
installOptions "-g"
|
||||||
}
|
}
|
||||||
|
|
||||||
lintOptions {
|
|
||||||
lintConfig file("lint.xml")
|
|
||||||
}
|
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_11
|
sourceCompatibility JavaVersion.VERSION_11
|
||||||
targetCompatibility JavaVersion.VERSION_11
|
targetCompatibility JavaVersion.VERSION_11
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<lint>
|
|
||||||
<!-- Modify some severity -->
|
|
||||||
|
|
||||||
<!-- Resource -->
|
|
||||||
<issue id="MissingTranslation" severity="warning" />
|
|
||||||
<issue id="TypographyEllipsis" severity="error" />
|
|
||||||
<issue id="ImpliedQuantity" severity="warning" />
|
|
||||||
|
|
||||||
<!-- UX -->
|
|
||||||
<issue id="ButtonOrder" severity="error" />
|
|
||||||
|
|
||||||
<!-- Layout -->
|
|
||||||
<issue id="UnknownIdInLayout" severity="error" />
|
|
||||||
<issue id="StringFormatCount" severity="error" />
|
|
||||||
<issue id="HardcodedText" severity="error" />
|
|
||||||
<issue id="SpUsage" severity="error" />
|
|
||||||
<issue id="ObsoleteLayoutParam" severity="error" />
|
|
||||||
<issue id="InefficientWeight" severity="error" />
|
|
||||||
<issue id="DisableBaselineAlignment" severity="error" />
|
|
||||||
<issue id="ScrollViewSize" severity="error" />
|
|
||||||
|
|
||||||
<!-- RTL -->
|
|
||||||
<issue id="RtlEnabled" severity="error" />
|
|
||||||
<issue id="RtlHardcoded" severity="error" />
|
|
||||||
<issue id="RtlSymmetry" severity="error" />
|
|
||||||
|
|
||||||
<!-- Code -->
|
|
||||||
<issue id="SetTextI18n" severity="error" />
|
|
||||||
<issue id="ViewConstructor" severity="error" />
|
|
||||||
<issue id="UseValueOf" severity="error" />
|
|
||||||
<issue id="ObsoleteSdkInt" severity="error" />
|
|
||||||
|
|
||||||
</lint>
|
|
|
@ -284,6 +284,7 @@ android {
|
||||||
lintOptions {
|
lintOptions {
|
||||||
lintConfig file("lint.xml")
|
lintConfig file("lint.xml")
|
||||||
|
|
||||||
|
checkDependencies true
|
||||||
abortOnError true
|
abortOnError true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue