summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Cole Faust <colefaust@google.com> 2024-01-04 09:37:47 -0800
committer Cole Faust <colefaust@google.com> 2024-01-04 09:37:47 -0800
commit596fe0f9c364e968ca488b7b537a699d78746697 (patch)
tree5dbcb4f7a4034fd22aef5ffb36fb8d81bd61587d
parent3b4f5c42cb92a199549cbb4fe2136ea1cf325319 (diff)
List baseline_filename on modules that are implicitly using it
lintable modules currently pick up files named "lint-baseline.xml" to use as the lint baseline implicitly. This is confusing because you could end up using the baseline files in more modules than intended. Lint also has a feature where it requests you remove unnecessary findings from the baseline file, so something could be necessary for one module, but unnecessary for another that accidentally picked up the baseline. We're removing the implicit detection of the baseline file, which requires all modules using it to list the baseline file explicitly. Bug: 272769514 Test: Presubmits Change-Id: I21561606d19d07a7c51d0d50641388938a31b952
-rw-r--r--services/Android.bp6
-rw-r--r--services/accessibility/Android.bp4
-rw-r--r--services/print/Android.bp3
3 files changed, 13 insertions, 0 deletions
diff --git a/services/Android.bp b/services/Android.bp
index 5cb8ec628c38..0b484f473d36 100644
--- a/services/Android.bp
+++ b/services/Android.bp
@@ -148,6 +148,9 @@ filegroup {
java_library {
name: "Slogf",
srcs: ["core/java/com/android/server/utils/Slogf.java"],
+ lint: {
+ baseline_filename: "lint-baseline.xml",
+ },
}
// merge all required services into one jar
@@ -220,6 +223,9 @@ java_library {
required: [
"libukey2_jni_shared",
],
+ lint: {
+ baseline_filename: "lint-baseline.xml",
+ },
// Uncomment to enable output of certain warnings (deprecated, unchecked)
//javacflags: ["-Xlint"],
diff --git a/services/accessibility/Android.bp b/services/accessibility/Android.bp
index e2488a51bba1..a3546716d5ca 100644
--- a/services/accessibility/Android.bp
+++ b/services/accessibility/Android.bp
@@ -21,6 +21,7 @@ java_library_static {
],
lint: {
error_checks: ["MissingPermissionAnnotation"],
+ baseline_filename: "lint-baseline.xml",
},
srcs: [
":services.accessibility-sources",
@@ -49,6 +50,9 @@ java_library_static {
libs: [
"androidx.annotation_annotation",
],
+ lint: {
+ baseline_filename: "lint-baseline.xml",
+ },
}
aconfig_declarations {
diff --git a/services/print/Android.bp b/services/print/Android.bp
index 5b4349a92692..0dfceaa3a9d9 100644
--- a/services/print/Android.bp
+++ b/services/print/Android.bp
@@ -19,4 +19,7 @@ java_library_static {
defaults: ["platform_service_defaults"],
srcs: [":services.print-sources"],
libs: ["services.core"],
+ lint: {
+ baseline_filename: "lint-baseline.xml",
+ },
}