blob: 50c046321079f4a6854fd451734475f2e5d6ecd6 [file] [log] [blame]
David Pursehouseb98f9c82018-09-23 12:58:27 +09001load(
2 "@bazel_tools//tools/jdk:default_java_toolchain.bzl",
David Pursehouseb98f9c82018-09-23 12:58:27 +09003 "default_java_toolchain",
4)
David Pursehouse9d46aab2019-09-09 10:52:21 +09005load("@rules_java//java:defs.bzl", "java_package_configuration")
David Pursehouseb98f9c82018-09-23 12:58:27 +09006
7default_java_toolchain(
David Ostrovsky2afae062022-01-08 09:39:06 +01008 name = "error_prone_warnings_toolchain_java11",
David Pursehouseb98f9c82018-09-23 12:58:27 +09009 package_configuration = [
10 ":error_prone",
11 ],
David Ostrovsky3b357632022-05-11 12:42:59 +020012 source_version = "11",
13 target_version = "11",
14 visibility = ["//visibility:public"],
15)
16
17default_java_toolchain(
18 name = "error_prone_warnings_toolchain_java17",
19 configuration = dict(),
20 java_runtime = "@bazel_tools//tools/jdk:remotejdk_17",
21 package_configuration = [
22 ":error_prone",
23 ],
24 source_version = "17",
25 target_version = "17",
David Pursehouseb98f9c82018-09-23 12:58:27 +090026 visibility = ["//visibility:public"],
27)
28
David Pursehouse956bd7d2019-05-25 17:07:28 +090029# Error Prone errors enabled by default; see ../.bazelrc for how this is
30# enabled. This warnings list is originally based on:
David Pursehouseb98f9c82018-09-23 12:58:27 +090031# https://github.com/bazelbuild/BUILD_file_generator/blob/master/tools/bazel_defs/java.bzl
David Pursehouse956bd7d2019-05-25 17:07:28 +090032# However, feel free to add any additional errors. Thus far they have all been pretty useful.
David Pursehouseb98f9c82018-09-23 12:58:27 +090033java_package_configuration(
34 name = "error_prone",
35 javacopts = [
36 "-XepDisableWarningsInGeneratedCode",
Matthias Sohnd62af252023-10-01 00:13:01 +020037 "-Xep:AlmostJavadoc:ERROR",
38 "-Xep:AlreadyChecked:ERROR",
39 "-Xep:AlwaysThrows:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +090040 "-Xep:AmbiguousMethodReference:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +020041 "-Xep:AnnotateFormatMethod:ERROR",
42 "-Xep:ArgumentSelectionDefectChecker:ERROR",
43 "-Xep:ArrayAsKeyOfSetOrMap:ERROR",
44 "-Xep:ArrayEquals:ERROR",
45 "-Xep:ArrayFillIncompatibleType:ERROR",
46 "-Xep:ArrayHashCode:ERROR",
47 "-Xep:ArraysAsListPrimitiveArray:ERROR",
48 "-Xep:ArrayToString:ERROR",
49 "-Xep:AssertEqualsArgumentOrderChecker:ERROR",
50 "-Xep:AssertionFailureIgnored:ERROR",
51 "-Xep:AsyncCallableReturnsNull:ERROR",
52 "-Xep:AsyncFunctionReturnsNull:ERROR",
53 "-Xep:AutoValueConstructorOrderChecker:ERROR",
54 "-Xep:AutoValueFinalMethods:ERROR",
55 "-Xep:AutoValueImmutableFields:ERROR",
56 "-Xep:AutoValueSubclassLeaked:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +090057 "-Xep:BadAnnotationImplementation:ERROR",
58 "-Xep:BadComparable:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +020059 "-Xep:BadImport:ERROR",
60 "-Xep:BadInstanceof:ERROR",
61 "-Xep:BadShiftAmount:ERROR",
62 "-Xep:BanJNDI:WARN",
63 "-Xep:BanSerializableRead:ERROR",
64 "-Xep:BigDecimalEquals:ERROR",
65 "-Xep:BigDecimalLiteralDouble:ERROR",
David Pursehouseb98f9c82018-09-23 12:58:27 +090066 "-Xep:BoxedPrimitiveConstructor:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +020067 "-Xep:BoxedPrimitiveEquality:ERROR",
68 "-Xep:BundleDeserializationCast:ERROR",
69 "-Xep:ByteBufferBackingArray:ERROR",
70 "-Xep:CacheLoaderNull:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +090071 "-Xep:CannotMockFinalClass:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +020072 "-Xep:CanonicalDuration:ERROR",
73 "-Xep:CatchAndPrintStackTrace:ERROR",
74 "-Xep:CatchFail:ERROR",
75 "-Xep:ChainedAssertionLosesContext:ERROR",
76 "-Xep:ChainingConstructorIgnoresParameter:ERROR",
77 "-Xep:CharacterGetNumericValue:ERROR",
78 "-Xep:CheckNotNullMultipleTimes:ERROR",
79 "-Xep:CheckReturnValue:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +090080 "-Xep:ClassCanBeStatic:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +020081 "-Xep:ClassName:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +090082 "-Xep:ClassNewInstance:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +020083 "-Xep:CollectionIncompatibleType:ERROR",
84 "-Xep:CollectionToArraySafeParameter:ERROR",
85 "-Xep:CollectionUndefinedEquality:ERROR",
86 "-Xep:CollectorShouldNotUseState:ERROR",
87 "-Xep:ComparableAndComparator:ERROR",
88 "-Xep:ComparableType:ERROR",
89 "-Xep:CompareToZero:ERROR",
90 "-Xep:ComparingThisWithNull:ERROR",
91 "-Xep:ComparisonOutOfRange:ERROR",
92 "-Xep:CompatibleWithAnnotationMisuse:ERROR",
93 "-Xep:CompileTimeConstant:ERROR",
94 "-Xep:ComplexBooleanConstant:ERROR",
95 "-Xep:ComputeIfAbsentAmbiguousReference:ERROR",
96 "-Xep:ConditionalExpressionNumericPromotion:ERROR",
97 "-Xep:ConstantOverflow:ERROR",
98 "-Xep:DaggerProvidesNull:ERROR",
99 "-Xep:DangerousLiteralNull:ERROR",
100 "-Xep:DateChecker:ERROR",
David Pursehoused30ae4c2019-06-05 15:30:37 +0900101 "-Xep:DateFormatConstant:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200102 "-Xep:DeadException:ERROR",
103 "-Xep:DeadThread:ERROR",
David Pursehouse00e3a292018-11-08 11:25:00 +0900104 "-Xep:DefaultCharset:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200105 "-Xep:DefaultPackage:WARN",
106 "-Xep:DepAnn:ERROR",
107 "-Xep:DeprecatedVariable:ERROR",
108 "-Xep:DiscardedPostfixExpression:ERROR",
109 "-Xep:DoNotCall:ERROR",
110 "-Xep:DoNotCallSuggester:ERROR",
111 "-Xep:DoNotClaimAnnotations:ERROR",
112 "-Xep:DoNotMock:ERROR",
113 "-Xep:DoNotMockAutoValue:ERROR",
114 "-Xep:DoubleBraceInitialization:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900115 "-Xep:DoubleCheckedLocking:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200116 "-Xep:DuplicateMapKeys:ERROR",
117 "-Xep:DurationFrom:ERROR",
118 "-Xep:DurationGetTemporalUnit:ERROR",
119 "-Xep:DurationTemporalUnit:ERROR",
120 "-Xep:DurationToLongTimeUnit:ERROR",
121 "-Xep:EmptyBlockTag:ERROR",
122 "-Xep:EmptyCatch:ERROR",
123 "-Xep:EmptySetMultibindingContributions:ERROR",
124 "-Xep:EqualsGetClass:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900125 "-Xep:EqualsHashCode:ERROR",
126 "-Xep:EqualsIncompatibleType:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200127 "-Xep:EqualsNaN:ERROR",
128 "-Xep:EqualsNull:ERROR",
129 "-Xep:EqualsReference:ERROR",
130 "-Xep:EqualsUnsafeCast:ERROR",
131 "-Xep:EqualsUsingHashCode:ERROR",
132 "-Xep:EqualsWrongThing:ERROR",
133 "-Xep:ErroneousThreadPoolConstructorChecker:ERROR",
134 "-Xep:EscapedEntity:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900135 "-Xep:ExpectedExceptionChecker:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200136 "-Xep:ExtendingJUnitAssert:ERROR",
137 "-Xep:ExtendsAutoValue:ERROR",
138 "-Xep:FallThrough:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900139 "-Xep:Finally:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200140 "-Xep:FloatCast:ERROR",
141 "-Xep:FloatingPointAssertionWithinEpsilon:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900142 "-Xep:FloatingPointLiteralPrecision:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200143 "-Xep:FloggerArgumentToString:ERROR",
144 "-Xep:FloggerFormatString:ERROR",
145 "-Xep:FloggerLogString:WARN",
146 "-Xep:FloggerLogVarargs:ERROR",
147 "-Xep:FloggerSplitLogStatement:ERROR",
148 "-Xep:FloggerStringConcatenation:ERROR",
149 "-Xep:FormatString:ERROR",
150 "-Xep:FormatStringAnnotation:ERROR",
151 "-Xep:ForOverride:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900152 "-Xep:FragmentInjection:ERROR",
153 "-Xep:FragmentNotInstantiable:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200154 "-Xep:FromTemporalAccessor:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900155 "-Xep:FunctionalInterfaceClash:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200156 "-Xep:FunctionalInterfaceMethodChanged:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900157 "-Xep:FutureReturnValueIgnored:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200158 "-Xep:FuturesGetCheckedIllegalExceptionType:ERROR",
159 "-Xep:GetClassOnAnnotation:ERROR",
160 "-Xep:GetClassOnClass:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900161 "-Xep:GetClassOnEnum:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200162 "-Xep:GuardedBy:ERROR",
163 "-Xep:GuiceAssistedInjectScoping:ERROR",
164 "-Xep:GuiceAssistedParameters:ERROR",
165 "-Xep:HashtableContains:ERROR",
166 "-Xep:HidingField:ERROR",
167 "-Xep:IdentityBinaryExpression:ERROR",
168 "-Xep:IdentityHashMapBoxing:ERROR",
169 "-Xep:IdentityHashMapUsage:ERROR",
170 "-Xep:IgnoredPureGetter:ERROR",
171 "-Xep:Immutable:ERROR",
David Pursehouse5738d522019-06-05 13:40:18 +0900172 "-Xep:ImmutableAnnotationChecker:ERROR",
David Pursehouseb98f9c82018-09-23 12:58:27 +0900173 "-Xep:ImmutableEnumChecker:WARN",
Matthias Sohnd62af252023-10-01 00:13:01 +0200174 "-Xep:ImmutableModification:ERROR",
175 "-Xep:ImpossibleNullComparison:ERROR",
176 "-Xep:Incomparable:ERROR",
177 "-Xep:IncompatibleArgumentType:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900178 "-Xep:IncompatibleModifiers:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200179 "-Xep:InconsistentCapitalization:ERROR",
180 "-Xep:InconsistentHashCode:ERROR",
181 "-Xep:IncrementInForLoopAndHeader:ERROR",
182 "-Xep:IndexOfChar:ERROR",
183 "-Xep:InexactVarargsConditional:ERROR",
184 "-Xep:InfiniteRecursion:ERROR",
185 "-Xep:InheritDoc:ERROR",
186 "-Xep:InjectOnConstructorOfAbstractClass:ERROR",
187 "-Xep:InlineFormatString:ERROR",
188 "-Xep:InlineMeInliner:WARN",
189 "-Xep:InlineMeSuggester:ERROR",
190 "-Xep:InlineMeValidator:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900191 "-Xep:InputStreamSlowMultibyteRead:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200192 "-Xep:InsecureCryptoUsage:ERROR",
193 "-Xep:InstanceOfAndCastMatchWrongType:ERROR",
194 "-Xep:InstantTemporalUnit:ERROR",
195 "-Xep:IntLongMath:ERROR",
196 "-Xep:InvalidBlockTag:ERROR",
197 "-Xep:InvalidInlineTag:ERROR",
198 "-Xep:InvalidJavaTimeConstant:ERROR",
199 "-Xep:InvalidLink:ERROR",
200 "-Xep:InvalidParam:ERROR",
201 "-Xep:InvalidPatternSyntax:ERROR",
202 "-Xep:InvalidThrows:ERROR",
203 "-Xep:InvalidThrowsLink:ERROR",
204 "-Xep:InvalidTimeZoneID:ERROR",
205 "-Xep:InvalidZoneId:ERROR",
206 "-Xep:IsInstanceIncompatibleType:ERROR",
207 "-Xep:IsInstanceOfClass:ERROR",
208 "-Xep:IsLoggableTagLength:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900209 "-Xep:IterableAndIterator:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200210 "-Xep:IterablePathParameter:ERROR",
211 "-Xep:JavaDurationGetSecondsGetNano:ERROR",
212 "-Xep:JavaDurationWithNanos:ERROR",
213 "-Xep:JavaDurationWithSeconds:ERROR",
214 "-Xep:JavaInstantGetSecondsGetNano:ERROR",
215 "-Xep:JavaLangClash:ERROR",
216 "-Xep:JavaLocalDateTimeGetNano:ERROR",
217 "-Xep:JavaLocalTimeGetNano:ERROR",
218 "-Xep:JavaPeriodGetDays:ERROR",
219 "-Xep:JavaTimeDefaultTimeZone:ERROR",
220 "-Xep:JavaUtilDate:ERROR",
221 "-Xep:JdkObsolete:ERROR",
222 "-Xep:JodaConstructors:ERROR",
223 "-Xep:JodaDateTimeConstants:ERROR",
224 "-Xep:JodaDurationWithMillis:ERROR",
225 "-Xep:JodaInstantWithMillis:ERROR",
226 "-Xep:JodaNewPeriod:ERROR",
227 "-Xep:JodaPlusMinusLong:ERROR",
228 "-Xep:JodaTimeConverterManager:ERROR",
229 "-Xep:JodaToSelf:ERROR",
230 "-Xep:JodaWithDurationAddedLong:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900231 "-Xep:JUnit3FloatingPointComparisonWithoutDelta:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200232 "-Xep:JUnit3TestNotRun:ERROR",
233 "-Xep:JUnit4ClassAnnotationNonStatic:ERROR",
234 "-Xep:JUnit4ClassUsedInJUnit3:ERROR",
235 "-Xep:JUnit4SetUpNotRun:ERROR",
236 "-Xep:JUnit4TearDownNotRun:ERROR",
237 "-Xep:JUnit4TestNotRun:ERROR",
238 "-Xep:JUnit4TestsNotRunWithinEnclosed:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900239 "-Xep:JUnitAmbiguousTestClass:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200240 "-Xep:JUnitAssertSameCheck:ERROR",
241 "-Xep:JUnitParameterMethodNotFound:ERROR",
242 "-Xep:LiteByteStringUtf8:ERROR",
243 "-Xep:LiteEnumValueOf:ERROR",
244 "-Xep:LiteProtoToString:ERROR",
245 "-Xep:LocalDateTemporalAmount:ERROR",
246 "-Xep:LockNotBeforeTry:ERROR",
247 "-Xep:LockOnBoxedPrimitive:ERROR",
248 "-Xep:LogicalAssignment:ERROR",
249 "-Xep:LongFloatConversion:ERROR",
250 "-Xep:LongLiteralLowerCaseSuffix:ERROR",
251 "-Xep:LoopConditionChecker:ERROR",
252 "-Xep:LoopOverCharArray:ERROR",
253 "-Xep:LossyPrimitiveCompare:ERROR",
254 "-Xep:MathAbsoluteRandom:ERROR",
255 "-Xep:MathRoundIntLong:ERROR",
256 "-Xep:MemoizeConstantVisitorStateLookups:ERROR",
257 "-Xep:MislabeledAndroidString:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900258 "-Xep:MissingCasesInEnumSwitch:ERROR",
259 "-Xep:MissingFail:ERROR",
260 "-Xep:MissingOverride:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200261 "-Xep:MissingSummary:ERROR",
262 "-Xep:MissingSuperCall:ERROR",
263 "-Xep:MissingTestCall:ERROR",
264 "-Xep:MisusedDayOfYear:ERROR",
265 "-Xep:MisusedWeekYear:ERROR",
266 "-Xep:MixedDescriptors:ERROR",
267 "-Xep:MixedMutabilityReturnType:WARN",
268 "-Xep:MockitoUsage:ERROR",
269 "-Xep:ModifiedButNotUsed:ERROR",
270 "-Xep:ModifyCollectionInEnhancedForLoop:ERROR",
271 "-Xep:ModifyingCollectionWithItself:ERROR",
272 "-Xep:ModifySourceCollectionInStream:ERROR",
273 "-Xep:MultipleParallelOrSequentialCalls:ERROR",
274 "-Xep:MultipleUnaryOperatorsInMethodCall:ERROR",
275 "-Xep:MustBeClosedChecker:ERROR",
276 "-Xep:MutableConstantField:WARN",
Matthias Sohn484ec1a2023-10-01 00:12:44 +0200277 "-Xep:MutableMethodReturnType:WARN",
Matthias Sohnd62af252023-10-01 00:13:01 +0200278 "-Xep:MutablePublicArray:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900279 "-Xep:NarrowingCompoundAssignment:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200280 "-Xep:NCopiesOfChar:ERROR",
281 "-Xep:NestedInstanceOfConditions:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900282 "-Xep:NonAtomicVolatileUpdate:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200283 "-Xep:NonCanonicalStaticImport:ERROR",
284 "-Xep:NonCanonicalType:ERROR",
285 "-Xep:NonFinalCompileTimeConstant:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900286 "-Xep:NonOverridingEquals:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200287 "-Xep:NonRuntimeAnnotation:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900288 "-Xep:NullableConstructor:ERROR",
289 "-Xep:NullablePrimitive:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200290 "-Xep:NullablePrimitiveArray:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900291 "-Xep:NullableVoid:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200292 "-Xep:NullOptional:ERROR",
293 "-Xep:NullTernary:ERROR",
294 "-Xep:ObjectEqualsForPrimitives:ERROR",
295 "-Xep:ObjectsHashCodePrimitive:ERROR",
296 "-Xep:ObjectToString:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900297 "-Xep:OperatorPrecedence:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200298 "-Xep:OptionalEquality:ERROR",
299 "-Xep:OptionalMapToOptional:ERROR",
300 "-Xep:OptionalMapUnusedValue:ERROR",
301 "-Xep:OptionalNotPresent:ERROR",
302 "-Xep:OptionalOfRedundantMethod:ERROR",
303 "-Xep:OrphanedFormatString:ERROR",
304 "-Xep:OutlineNone:ERROR",
305 "-Xep:OverlappingQualifierAndScopeAnnotation:ERROR",
306 "-Xep:Overrides:ERROR",
307 "-Xep:OverridesGuiceInjectableMethod:ERROR",
308 "-Xep:OverridesJavaxInjectableMethod:ERROR",
309 "-Xep:OverrideThrowableToString:ERROR",
310 "-Xep:PackageInfo:ERROR",
311 "-Xep:ParameterName:ERROR",
312 "-Xep:ParametersButNotParameterized:ERROR",
313 "-Xep:ParcelableCreator:ERROR",
314 "-Xep:PeriodFrom:ERROR",
315 "-Xep:PeriodGetTemporalUnit:ERROR",
316 "-Xep:PeriodTimeMath:ERROR",
317 "-Xep:PreconditionsCheckNotNullRepeated:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900318 "-Xep:PreconditionsInvalidPlaceholder:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200319 "-Xep:PrimitiveAtomicReference:ERROR",
320 "-Xep:PrivateSecurityContractProtoAccess:ERROR",
321 "-Xep:ProtectedMembersInFinalClass:ERROR",
322 "-Xep:ProtoBuilderReturnValueIgnored:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900323 "-Xep:ProtocolBufferOrdinal:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200324 "-Xep:ProtoDurationGetSecondsGetNano:ERROR",
325 "-Xep:ProtoFieldNullComparison:ERROR",
326 "-Xep:ProtoRedundantSet:ERROR",
327 "-Xep:ProtoStringFieldReferenceEquality:ERROR",
328 "-Xep:ProtoTimestampGetSecondsGetNano:ERROR",
329 "-Xep:ProtoTruthMixedDescriptors:ERROR",
330 "-Xep:ProvidesMethodOutsideOfModule:WARN",
331 "-Xep:RandomCast:ERROR",
332 "-Xep:RandomModInteger:ERROR",
333 "-Xep:ReachabilityFenceUsage:ERROR",
334 "-Xep:RectIntersectReturnValueIgnored:ERROR",
David Pursehouse9b844ae2019-06-05 13:46:59 +0900335 "-Xep:ReferenceEquality:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200336 "-Xep:RefersToDaggerCodegen:ERROR",
337 "-Xep:RemovedInJDK11:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900338 "-Xep:RequiredModifiers:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200339 "-Xep:RestrictedApiChecker:ERROR",
340 "-Xep:RethrowReflectiveOperationExceptionAsLinkageError:ERROR",
341 "-Xep:ReturnFromVoid:ERROR",
342 "-Xep:ReturnMissingNullable:ERROR",
343 "-Xep:ReturnValueIgnored:ERROR",
344 "-Xep:RxReturnValueIgnored:ERROR",
345 "-Xep:SameNameButDifferent:ERROR",
346 "-Xep:SelfAssignment:ERROR",
347 "-Xep:SelfComparison:ERROR",
348 "-Xep:SelfEquals:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900349 "-Xep:ShortCircuitBoolean:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200350 "-Xep:ShouldHaveEvenArgs:ERROR",
351 "-Xep:SizeGreaterThanOrEqualsZero:ERROR",
352 "-Xep:StaticAssignmentInConstructor:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900353 "-Xep:StaticGuardedByInstance:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200354 "-Xep:StaticMockMember:ERROR",
355 "-Xep:StaticQualifiedUsingExpression:ERROR",
356 "-Xep:StreamToString:ERROR",
357 "-Xep:StringBuilderInitWithChar:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900358 "-Xep:StringEquality:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200359 "-Xep:StringSplitter:ERROR",
360 "-Xep:SubstringOfZero:ERROR",
361 "-Xep:SuppressWarningsDeprecated:ERROR",
362 "-Xep:SwigMemoryLeak:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900363 "-Xep:SynchronizeOnNonFinalField:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200364 "-Xep:TemporalAccessorGetChronoField:ERROR",
365 "-Xep:TestParametersNotInitialized:ERROR",
366 "-Xep:TheoryButNoTheories:ERROR",
367 "-Xep:ThreadJoinLoop:ERROR",
368 "-Xep:ThreadLocalUsage:ERROR",
369 "-Xep:ThreadPriorityCheck:ERROR",
370 "-Xep:ThreeLetterTimeZoneID:ERROR",
371 "-Xep:ThrowIfUncheckedKnownChecked:ERROR",
372 "-Xep:ThrowNull:ERROR",
373 "-Xep:TimeUnitConversionChecker:ERROR",
374 "-Xep:ToStringReturnsNull:ERROR",
375 "-Xep:TreeToString:ERROR",
376 "-Xep:TruthAssertExpected:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900377 "-Xep:TruthConstantAsserts:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200378 "-Xep:TruthGetOrDefault:ERROR",
379 "-Xep:TruthIncompatibleType:ERROR",
380 "-Xep:TruthSelfEquals:ERROR",
381 "-Xep:TryFailThrowable:ERROR",
382 "-Xep:TypeEquals:ERROR",
383 "-Xep:TypeNameShadowing:ERROR",
384 "-Xep:TypeParameterQualifier:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900385 "-Xep:TypeParameterShadowing:ERROR",
386 "-Xep:TypeParameterUnusedInFormals:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200387 "-Xep:UndefinedEquals:ERROR",
388 "-Xep:UnescapedEntity:ERROR",
389 "-Xep:UnnecessaryAssignment:ERROR",
390 "-Xep:UnnecessaryCheckNotNull:ERROR",
391 "-Xep:UnnecessaryLambda:ERROR",
392 "-Xep:UnnecessaryMethodInvocationMatcher:ERROR",
393 "-Xep:UnnecessaryMethodReference:ERROR",
394 "-Xep:UnnecessaryParentheses:ERROR",
395 "-Xep:UnnecessaryTypeArgument:ERROR",
396 "-Xep:UnrecognisedJavadocTag:ERROR",
397 "-Xep:UnsafeFinalization:ERROR",
398 "-Xep:UnsafeReflectiveConstructionCast:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900399 "-Xep:UnsynchronizedOverridesSynchronized:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200400 "-Xep:UnusedAnonymousClass:ERROR",
401 "-Xep:UnusedCollectionModifiedInPlace:ERROR",
David Ostrovsky1ae7c382020-01-24 08:17:24 +0100402 "-Xep:UnusedException:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200403 "-Xep:UnusedMethod:ERROR",
404 "-Xep:UnusedNestedClass:ERROR",
405 "-Xep:UnusedVariable:ERROR",
406 "-Xep:URLEqualsHashCode:ERROR",
407 "-Xep:UseBinds:ERROR",
408 "-Xep:UseCorrectAssertInTests:ERROR",
409 "-Xep:VariableNameSameAsType:ERROR",
410 "-Xep:VarTypeName:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900411 "-Xep:WaitNotInLoop:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200412 "-Xep:WakelockReleasedDangerously:ERROR",
David Pursehousec0dafc92019-05-25 17:19:44 +0900413 "-Xep:WildcardImport:ERROR",
Matthias Sohnd62af252023-10-01 00:13:01 +0200414 "-Xep:WithSignatureDiscouraged:ERROR",
415 "-Xep:WrongOneof:ERROR",
416 "-Xep:XorPower:ERROR",
417 "-Xep:ZoneIdOfZ:ERROR",
David Pursehouseb98f9c82018-09-23 12:58:27 +0900418 ],
419 packages = ["error_prone_packages"],
420)
421
422package_group(
423 name = "error_prone_packages",
424 packages = [
425 "//java/...",
426 "//javatests/...",
427 ],
428)