Merge "Hide some noisy Metalava issues" into main am: ccad8ff606
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3121892 Change-Id: I6c714fe3a408c37ea3fe5a3231caa511217979ab Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
79cb62133f
1 changed files with 18 additions and 3 deletions
|
@ -1054,8 +1054,7 @@ func (d *Droidstubs) everythingOptionalCmd(ctx android.ModuleContext, cmd *andro
|
|||
}
|
||||
|
||||
if !treatDocumentationIssuesAsErrors {
|
||||
// Treat documentation issues as warnings, but error when new.
|
||||
cmd.Flag("--error-when-new-category").Flag("Documentation")
|
||||
treatDocumentationIssuesAsWarningErrorWhenNew(cmd)
|
||||
}
|
||||
|
||||
// Add "check released" options. (Detect incompatible API changes from the last public release)
|
||||
|
@ -1083,6 +1082,22 @@ func (d *Droidstubs) everythingOptionalCmd(ctx android.ModuleContext, cmd *andro
|
|||
}
|
||||
}
|
||||
|
||||
// HIDDEN_DOCUMENTATION_ISSUES is the set of documentation related issues that should always be
|
||||
// hidden as they are very noisy and provide little value.
|
||||
var HIDDEN_DOCUMENTATION_ISSUES = []string{
|
||||
"Deprecated",
|
||||
"IntDef",
|
||||
"Nullable",
|
||||
}
|
||||
|
||||
func treatDocumentationIssuesAsWarningErrorWhenNew(cmd *android.RuleBuilderCommand) {
|
||||
// Treat documentation issues as warnings, but error when new.
|
||||
cmd.Flag("--error-when-new-category").Flag("Documentation")
|
||||
|
||||
// Hide some documentation issues that generated a lot of noise for little benefit.
|
||||
cmd.FlagForEachArg("--hide ", HIDDEN_DOCUMENTATION_ISSUES)
|
||||
}
|
||||
|
||||
// Sandbox rule for generating exportable stubs and other artifacts
|
||||
func (d *Droidstubs) exportableStubCmd(ctx android.ModuleContext, params stubsCommandConfigParams) {
|
||||
optionalCmdParams := stubsCommandParams{
|
||||
|
@ -1154,7 +1169,7 @@ func (d *Droidstubs) optionalStubCmd(ctx android.ModuleContext, params stubsComm
|
|||
}
|
||||
|
||||
// Treat documentation issues as warnings, but error when new.
|
||||
cmd.Flag("--error-when-new-category").Flag("Documentation")
|
||||
treatDocumentationIssuesAsWarningErrorWhenNew(cmd)
|
||||
|
||||
if params.stubConfig.generateStubs {
|
||||
rule.Command().
|
||||
|
|
Loading…
Reference in a new issue