Downgrade/disable lint checks

Lint is being updated, and some of the
new checks have many failures or false
positives in the current android tree.

Bug: 215567981
Bug: 238784089
Test: Presubmits
Change-Id: I33a47d3c0404ca37f0334421a02bb80f745ae792
This commit is contained in:
Cole Faust
2022-06-29 14:58:03 -07:00
parent 7631bdf109
commit 3f6462693e
2 changed files with 13 additions and 0 deletions

View File

@@ -338,6 +338,14 @@ func (l *linter) lint(ctx android.ModuleContext) {
ctx.PropertyErrorf("lint.disabled_checks",
"Can't disable %v checks if min_sdk_version is different from sdk_version.", filtered)
}
// TODO(b/238784089): Remove this workaround when the NewApi issues have been addressed in PermissionController
if ctx.ModuleName() == "PermissionController" {
l.extraMainlineLintErrors = android.FilterListPred(l.extraMainlineLintErrors, func(s string) bool {
return s != "NewApi"
})
l.properties.Lint.Warning_checks = append(l.properties.Lint.Warning_checks, "NewApi")
}
}
extraLintCheckModules := ctx.GetDirectDepsWithTag(extraLintCheckTag)