Merge "Prevent disabling checks via flags property" into main am: 59739666e6
am: 5fd64b9c70
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2933578 Change-Id: I274a32a4cbadb85fadb192f7e60049506791e1e7 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -364,6 +364,12 @@ func (l *linter) lint(ctx android.ModuleContext) {
|
||||
return
|
||||
}
|
||||
|
||||
for _, flag := range l.properties.Lint.Flags {
|
||||
if strings.Contains(flag, "--disable") || strings.Contains(flag, "--enable") || strings.Contains(flag, "--check") {
|
||||
ctx.PropertyErrorf("lint.flags", "Don't use --disable, --enable, or --check in the flags field, instead use the dedicated disabled_checks, warning_checks, error_checks, or fatal_checks fields")
|
||||
}
|
||||
}
|
||||
|
||||
if l.minSdkVersion.CompareTo(l.compileSdkVersion) == -1 {
|
||||
l.extraMainlineLintErrors = append(l.extraMainlineLintErrors, updatabilityChecks...)
|
||||
// Skip lint warning checks for NewApi warnings for libcore where they come from source
|
||||
|
Reference in New Issue
Block a user