From 6cc7a93129d54e8f77ff6b4dca417401e6a9d02e Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Tue, 28 Jun 2022 16:26:36 -0700 Subject: Downgrade SuspiciousIndentation lint to a warning Bug: 236431222 Test: Presubmits Change-Id: Ib2113535563920d4d4eaa10992668236c6f1e286 --- Android.bp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Android.bp b/Android.bp index 5f8f505..031a040 100644 --- a/Android.bp +++ b/Android.bp @@ -74,6 +74,9 @@ java_library { errorprone: { javacflags: ["-Xep:MissingOverride:OFF"], }, + lint: { + warning_checks: ["SuspiciousIndentation"], + }, sdk_version: "none", system_modules: "core-all-system-modules", -- cgit v1.2.3 From 28319b4d20d0af409e5c4b7f1412ae083b18e1cd Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Sat, 15 Oct 2022 21:33:29 -0700 Subject: Fix errorprone warnings that should be errors This commit is part of a large scale change to fix errorprone errors that have been downgraded to warnings in the android source tree, so that they can be promoted to errors again. The full list of changes include the following, but not all will be present in any one individual commit: BadAnnotationImplementation BadShiftAmount BanJNDI BoxedPrimitiveEquality ComparableType ComplexBooleanConstant CollectionToArraySafeParameter ConditionalExpressionNumericPromotion DangerousLiteralNull DoubleBraceInitialization DurationFrom DurationTemporalUnit EmptyTopLevelDeclaration EqualsNull EqualsReference FormatString FromTemporalAccessor GetClassOnAnnotation GetClassOnClass HashtableContains IdentityBinaryExpression IdentityHashMapBoxing InstantTemporalUnit InvalidTimeZoneID InvalidZoneId IsInstanceIncompatibleType JUnitParameterMethodNotFound LockOnBoxedPrimitive MathRoundIntLong MislabeledAndroidString MisusedDayOfYear MissingSuperCall MisusedWeekYear ModifyingCollectionWithItself NoCanIgnoreReturnValueOnClasses NonRuntimeAnnotation NullableOnContainingClass NullTernary OverridesJavaxInjectableMethod ParcelableCreator PeriodFrom PreconditionsInvalidPlaceholder ProtoBuilderReturnValueIgnored ProtoFieldNullComparison RandomModInteger RectIntersectReturnValueIgnored ReturnValueIgnored SelfAssignment SelfComparison SelfEquals SizeGreaterThanOrEqualsZero StringBuilderInitWithChar TreeToString TryFailThrowable UnnecessaryCheckNotNull UnusedCollectionModifiedInPlace XorPower See https://errorprone.info/bugpatterns for more information on the checks. Bug: 253827323 Test: m RUN_ERROR_PRONE=true javac-check Change-Id: I3800cc9e72229f3934d35da5ed8b95283e269b71 --- Android.bp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Android.bp b/Android.bp index 031a040..762b32d 100644 --- a/Android.bp +++ b/Android.bp @@ -72,7 +72,10 @@ java_library { installable: true, hostdex: true, errorprone: { - javacflags: ["-Xep:MissingOverride:OFF"], + javacflags: [ + "-Xep:MissingOverride:OFF", + "-Xep:LockOnBoxedPrimitive:WARN", + ], }, lint: { warning_checks: ["SuspiciousIndentation"], -- cgit v1.2.3