summaryrefslogtreecommitdiff
path: root/java/lint.go
diff options
context:
space:
mode:
Diffstat (limited to 'java/lint.go')
-rw-r--r--java/lint.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/java/lint.go b/java/lint.go
index bd6c1bae6..c79f6e7bb 100644
--- a/java/lint.go
+++ b/java/lint.go
@@ -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