summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-11-12 16:18:26 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-11-12 16:18:26 +0000
commitf18c94b40f765cdf147bdd3e5c0f5012240093b8 (patch)
tree0e05a04584ae8b419061b902ab12a2429d9de96b
parentecf76dddd1180beed4cf95bb5d8a21f53066040a (diff)
parent40be6479da9cfe31e09403090720421f6f5d48c8 (diff)
Merge "droidstubs: clarify how to address API lints" into main
-rw-r--r--java/droidstubs.go15
1 files changed, 8 insertions, 7 deletions
diff --git a/java/droidstubs.go b/java/droidstubs.go
index 6bcdf85a2..cf3e21925 100644
--- a/java/droidstubs.go
+++ b/java/droidstubs.go
@@ -997,12 +997,13 @@ func (d *Droidstubs) everythingOptionalCmd(ctx android.ModuleContext, cmd *andro
msg := `$'` + // Enclose with $' ... '
`************************************************************\n` +
`Your API changes are triggering API Lint warnings or errors.\n` +
- `To make these errors go away, fix the code according to the\n` +
- `error and/or warning messages above.\n` +
`\n` +
- `If it is not possible to do so, there are workarounds:\n` +
+ `To make the failures go away:\n` +
`\n` +
- `1. You can suppress the errors with @SuppressLint("<id>")\n` +
+ `1. REQUIRED: Read the messages carefully and address them by` +
+ ` fixing the API if appropriate.\n` +
+ `2. If the failure is a false positive, you can suppress it with:\n` +
+ ` @SuppressLint("<id>")\n` +
` where the <id> is given in brackets in the error message above.\n`
if baselineFile.Valid() {
@@ -1010,8 +1011,8 @@ func (d *Droidstubs) everythingOptionalCmd(ctx android.ModuleContext, cmd *andro
cmd.FlagWithOutput("--update-baseline:api-lint ", updatedBaselineOutput)
msg += fmt.Sprintf(``+
- `2. You can update the baseline by executing the following\n`+
- ` command:\n`+
+ `3. FOR LSC ONLY: You can update the baseline by executing\n` +
+ ` the following command:\n`+
` (cd $ANDROID_BUILD_TOP && cp \\\n`+
` "%s" \\\n`+
` "%s")\n`+
@@ -1019,7 +1020,7 @@ func (d *Droidstubs) everythingOptionalCmd(ctx android.ModuleContext, cmd *andro
` repository, you will need approval.\n`, updatedBaselineOutput, baselineFile.Path())
} else {
msg += fmt.Sprintf(``+
- `2. You can add a baseline file of existing lint failures\n`+
+ `3. FOR LSC ONLY: You can add a baseline file of existing lint failures\n`+
` to the build rule of %s.\n`, d.Name())
}
// Note the message ends with a ' (single quote), to close the $' ... ' .