From e752160ba6eabf59cb65d5df691cd13bfddd84cf Mon Sep 17 00:00:00 2001 From: Albin Date: Thu, 12 Dec 2024 17:54:00 +0100 Subject: [PATCH 1/4] Enable lint option checkAllWarnings --- android/app/build.gradle.kts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 8e252e1fc6a5..cb5737e3ffbb 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -47,7 +47,9 @@ android { lint { lintConfig = file("${rootProject.projectDir}/config/lint.xml") + baseline = file("${rootProject.projectDir}/config/lint-baseline.xml") abortOnError = true + checkAllWarnings = true warningsAsErrors = true checkDependencies = true } From 246e8f4d815af485bab2e05bcafebab4cf320e1f Mon Sep 17 00:00:00 2001 From: Albin Date: Thu, 12 Dec 2024 17:59:46 +0100 Subject: [PATCH 2/4] Set lint issue NewerVersionAvailable to ignore --- android/config/lint.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/android/config/lint.xml b/android/config/lint.xml index 981075ff91c3..37ce4b5c8280 100644 --- a/android/config/lint.xml +++ b/android/config/lint.xml @@ -14,4 +14,5 @@ + From edfe445abb973eff944236c012525fd160bf42dc Mon Sep 17 00:00:00 2001 From: Albin Date: Thu, 12 Dec 2024 18:14:13 +0100 Subject: [PATCH 3/4] Generate lint baseline --- android/config/lint-baseline.xml | 403 +++++++++++++++++++++++++++++++ 1 file changed, 403 insertions(+) create mode 100644 android/config/lint-baseline.xml diff --git a/android/config/lint-baseline.xml b/android/config/lint-baseline.xml new file mode 100644 index 000000000000..f43a56a8604e --- /dev/null +++ b/android/config/lint-baseline.xml @@ -0,0 +1,403 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 81e63f07bc61b7ac5943339266d7078ad4c1ff14 Mon Sep 17 00:00:00 2001 From: Albin Date: Thu, 12 Dec 2024 14:36:33 +0100 Subject: [PATCH 4/4] Change CI lint task to only run on app module Limit linting to the app module in CI since it has the `checkDependencies` option set. --- .github/workflows/android-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/android-app.yml b/.github/workflows/android-app.yml index 5e784b5d6904..28114f961519 100644 --- a/.github/workflows/android-app.yml +++ b/.github/workflows/android-app.yml @@ -240,7 +240,7 @@ jobs: :lib:shared:testDebugUnitTest - gradle-task: :test:arch:test --rerun-tasks - gradle-task: detekt - - gradle-task: lint + - gradle-task: :app:lint steps: # Fix for HOME path overridden by GH runners when building in containers, see: # https://github.com/actions/runner/issues/863