Apache Solr open-source search software
Invert error-prone configuration to be allow-list vs deny-list (#1200)
Kevin Risden25cd87c8e668
diff --git a/gradle/validation/error-prone.gradle b/gradle/validation/error-prone.gradleindex b160b36909c..6dba70b5009 100644--- a/gradle/validation/error-prone.gradle+++ b/gradle/validation/error-prone.gradle@@ -62,53 +62,421 @@ allprojects { prj ->options.errorprone.disableWarningsInGeneratedCode = trueoptions.errorprone.errorproneArgs = [- // bug patterns related to our tests- '-Xep:ExtendingJUnitAssert:OFF', // we inherit from LuceneTestCase which extends Assert- '-Xep:UseCorrectAssertInTests:OFF', // and this is a consequence of the above- '-Xep:CatchFail:OFF', // our code is generally descriptive enough, fix case by case if tests fail- '-Xep:JUnit4TestNotRun:OFF', // RandomizedRunner finds unannotated test methods no problem- '-Xep:StaticAssignmentInConstructor:OFF', // we assign SolrTestCaseJ4.configString in many tests, difficult to untangle- '-Xep:ComparableType:OFF', // SolrTestCaseJ4.Doc and Fld are messy+ '-XepDisableAllChecks', // only enable specific checks+ '-XepAllErrorsAsWarnings', // warnings still fail build by default, but allows usage of -Pjavac.failOnWarnings=false- '-Xep:AlreadyChecked:OFF',- '-Xep:AmbiguousMethodReference:OFF',- '-Xep:ArgumentSelectionDefectChecker:OFF',- '-Xep:BadImport:OFF', // style preference that we don't want to enforce- '-Xep:CanIgnoreReturnValueSuggester:OFF',- '-Xep:ComplexBooleanConstant:OFF', // non trivial to fix in some cases- '-Xep:DoubleCheckedLocking:OFF',- '-Xep:EmptyCatch:OFF',- '-Xep:Finally:OFF',- '-Xep:FutureReturnValueIgnored:OFF',- '-Xep:InlineFormatString:OFF', // this introduces redundancy in format strings- '-Xep:InlineMeSuggester:OFF', // We don't use this annotation- '-Xep:InputStreamSlowMultibyteRead:OFF',- '-Xep:InvalidBlockTag:OFF', // this is needed for tags like lucene.internal- '-Xep:JavaUtilDate:OFF',- '-Xep:MissingSummary:OFF', // style preference that we don't want to enforce- '-Xep:MixedMutabilityReturnType:OFF',- '-Xep:MutablePublicArray:OFF', // this should be possible...- '-Xep:NegativeCharLiteral:OFF',- '-Xep:NonAtomicVolatileUpdate:OFF',- '-Xep:NonCanonicalType:OFF',- '-Xep:ObjectToString:OFF',- '-Xep:ReturnValueIgnored:OFF',- '-Xep:SameNameButDifferent:OFF',- '-Xep:ShortCircuitBoolean:OFF',- '-Xep:StaticGuardedByInstance:OFF',- '-Xep:StreamResourceLeak:OFF',- '-Xep:StringSplitter:OFF',- '-Xep:SynchronizeOnNonFinalField:OFF',- '-Xep:ThreadJoinLoop:OFF',- '-Xep:ThreadLocalUsage:OFF',- '-Xep:ThreadPriorityCheck:OFF',- '-Xep:TypeParameterShadowing:OFF',- '-Xep:TypeParameterUnusedInFormals:OFF',- '-Xep:UnicodeEscape:OFF', // can't enable since Lucene/Solr tests use unicode a bunch- '-Xep:UnnecessaryParentheses:OFF', // style preference that we don't want to enforce- '-Xep:UnusedMethod:OFF',- '-Xep:UnusedVariable:OFF',- '-Xep:WaitNotInLoop:OFF',+ // List of enabled/disabled checks+ // Please keep this synced with https://errorprone.info/bugpatterns when upgrading!++ // On by Default : ERROR++ '-Xep:AlwaysThrows:ERROR',+ '-Xep:AndroidInjectionBeforeSuper:ERROR',+ '-Xep:ArrayEquals:ERROR',+ '-Xep:ArrayFillIncompatibleType:ERROR',+ '-Xep:ArrayHashCode:ERROR',+ '-Xep:ArrayToString:ERROR',+ '-Xep:ArraysAsListPrimitiveArray:ERROR',+ '-Xep:AsyncCallableReturnsNull:ERROR',+ '-Xep:AsyncFunctionReturnsNull:ERROR',+ '-Xep:AutoValueBuilderDefaultsInConstructor:ERROR',+ '-Xep:AutoValueConstructorOrderChecker:ERROR',+ '-Xep:BadAnnotationImplementation:ERROR',+ '-Xep:BadShiftAmount:ERROR',+ '-Xep:BanJNDI:ERROR',+ '-Xep:BoxedPrimitiveEquality:ERROR',+ '-Xep:BundleDeserializationCast:ERROR',+ '-Xep:ChainingConstructorIgnoresParameter:ERROR',+ '-Xep:CheckNotNullMultipleTimes:ERROR',+ '-Xep:CheckReturnValue:ERROR',+ '-Xep:CollectionToArraySafeParameter:ERROR',+ // '-Xep:ComparableType:OFF', // SolrTestCaseJ4.Doc and Fld are messy+ '-Xep:ComparingThisWithNull:ERROR',+ '-Xep:ComparisonOutOfRange:ERROR',+ '-Xep:CompatibleWithAnnotationMisuse:ERROR',+ '-Xep:CompileTimeConstant:ERROR',+ '-Xep:ComputeIfAbsentAmbiguousReference:ERROR',+ '-Xep:ConditionalExpressionNumericPromotion:ERROR',+ '-Xep:ConstantOverflow:ERROR',+ '-Xep:DaggerProvidesNull:ERROR',+ '-Xep:DangerousLiteralNull:ERROR',+ '-Xep:DeadException:ERROR',+ '-Xep:DeadThread:ERROR',+ '-Xep:DiscardedPostfixExpression:ERROR',+ '-Xep:DoNotCall:ERROR',+ '-Xep:DoNotMock:ERROR',+ '-Xep:DoubleBraceInitialization:ERROR',+ '-Xep:DuplicateMapKeys:ERROR',+ '-Xep:DurationFrom:ERROR',+ '-Xep:DurationGetTemporalUnit:ERROR',+ '-Xep:DurationTemporalUnit:ERROR',+ '-Xep:DurationToLongTimeUnit:ERROR',+ '-Xep:EmptyTopLevelDeclaration:ERROR',+ '-Xep:EqualsHashCode:ERROR',+ '-Xep:EqualsNaN:ERROR',+ '-Xep:EqualsNull:ERROR',+ '-Xep:EqualsReference:ERROR',+ '-Xep:EqualsWrongThing:ERROR',+ '-Xep:FloggerFormatString:ERROR',+ '-Xep:FloggerLogVarargs:ERROR',+ '-Xep:FloggerSplitLogStatement:ERROR',+ '-Xep:ForOverride:ERROR',+ '-Xep:FormatString:ERROR',+ '-Xep:FormatStringAnnotation:ERROR',+ '-Xep:FromTemporalAccessor:ERROR',+ '-Xep:FunctionalInterfaceMethodChanged:ERROR',+ '-Xep:FuturesGetCheckedIllegalExceptionType:ERROR',+ '-Xep:FuzzyEqualsShouldNotBeUsedInEqualsMethod:ERROR',+ '-Xep:GetClassOnAnnotation:ERROR',+ '-Xep:GetClassOnClass:ERROR',+ '-Xep:GuardedBy:ERROR',+ '-Xep:GuiceAssistedInjectScoping:ERROR',+ '-Xep:GuiceAssistedParameters:ERROR',+ '-Xep:GuiceInjectOnFinalField:ERROR',+ '-Xep:HashtableContains:ERROR',+ '-Xep:IdentityBinaryExpression:ERROR',+ '-Xep:IdentityHashMapBoxing:ERROR',+ '-Xep:IgnoredPureGetter:ERROR',+ '-Xep:Immutable:ERROR',+ '-Xep:Incomparable:ERROR',+ '-Xep:IncompatibleArgumentType:ERROR',+ '-Xep:IncompatibleModifiers:ERROR',+ '-Xep:IndexOfChar:ERROR',+ '-Xep:InexactVarargsConditional:ERROR',+ '-Xep:InfiniteRecursion:ERROR',+ '-Xep:InjectMoreThanOneScopeAnnotationOnClass:ERROR',+ '-Xep:InjectOnMemberAndConstructor:ERROR',+ '-Xep:InlineMeValidator:ERROR',+ '-Xep:InstantTemporalUnit:ERROR',+ '-Xep:InvalidJavaTimeConstant:ERROR',+ '-Xep:InvalidPatternSyntax:ERROR',+ '-Xep:InvalidTimeZoneID:ERROR',+ '-Xep:InvalidZoneId:ERROR',+ '-Xep:IsInstanceIncompatibleType:ERROR',+ '-Xep:IsInstanceOfClass:ERROR',+ '-Xep:IsLoggableTagLength:ERROR',+ '-Xep:JUnit3TestNotRun:ERROR',+ '-Xep:JUnit4ClassAnnotationNonStatic:ERROR',+ '-Xep:JUnit4SetUpNotRun:ERROR',+ '-Xep:JUnit4TearDownNotRun:ERROR',+ // '-Xep:JUnit4TestNotRun:OFF', // RandomizedRunner finds unannotated test methods no problem+ '-Xep:JUnit4TestsNotRunWithinEnclosed:ERROR',+ '-Xep:JUnitAssertSameCheck:ERROR',+ '-Xep:JUnitParameterMethodNotFound:ERROR',+ '-Xep:JavaxInjectOnAbstractMethod:ERROR',+ '-Xep:JodaToSelf:ERROR',+ '-Xep:LiteByteStringUtf8:ERROR',+ '-Xep:LocalDateTemporalAmount:ERROR',+ '-Xep:LockOnBoxedPrimitive:ERROR',+ '-Xep:LoopConditionChecker:ERROR',+ '-Xep:LossyPrimitiveCompare:ERROR',+ '-Xep:MathRoundIntLong:ERROR',+ '-Xep:MislabeledAndroidString:ERROR',+ '-Xep:MisplacedScopeAnnotations:ERROR',+ '-Xep:MissingSuperCall:ERROR',+ '-Xep:MissingTestCall:ERROR',+ '-Xep:MisusedDayOfYear:ERROR',+ '-Xep:MisusedWeekYear:ERROR',+ '-Xep:MixedDescriptors:ERROR',+ '-Xep:MockitoUsage:ERROR',+ '-Xep:ModifyingCollectionWithItself:ERROR',+ '-Xep:MoreThanOneInjectableConstructor:ERROR',+ '-Xep:MustBeClosedChecker:ERROR',+ '-Xep:NCopiesOfChar:ERROR',+ '-Xep:NoCanIgnoreReturnValueOnClasses:ERROR',+ '-Xep:NonCanonicalStaticImport:ERROR',+ '-Xep:NonFinalCompileTimeConstant:ERROR',+ '-Xep:NonRuntimeAnnotation:ERROR',+ '-Xep:NullArgumentForNonNullParameter:ERROR',+ '-Xep:NullTernary:ERROR',+ '-Xep:NullableOnContainingClass:ERROR',+ '-Xep:OptionalEquality:ERROR',+ '-Xep:OptionalMapUnusedValue:ERROR',+ '-Xep:OptionalOfRedundantMethod:ERROR',+ '-Xep:OverlappingQualifierAndScopeAnnotation:ERROR',+ '-Xep:OverridesJavaxInjectableMethod:ERROR',+ '-Xep:PackageInfo:ERROR',+ '-Xep:ParametersButNotParameterized:ERROR',+ '-Xep:ParcelableCreator:ERROR',+ '-Xep:PeriodFrom:ERROR',+ '-Xep:PeriodGetTemporalUnit:ERROR',+ '-Xep:PeriodTimeMath:ERROR',+ '-Xep:PreconditionsInvalidPlaceholder:ERROR',+ '-Xep:PrivateSecurityContractProtoAccess:ERROR',+ '-Xep:ProtoBuilderReturnValueIgnored:ERROR',+ '-Xep:ProtoFieldNullComparison:ERROR',+ '-Xep:ProtoStringFieldReferenceEquality:ERROR',+ '-Xep:ProtoTruthMixedDescriptors:ERROR',+ '-Xep:ProtocolBufferOrdinal:ERROR',+ '-Xep:ProvidesMethodOutsideOfModule:ERROR',+ '-Xep:RandomCast:ERROR',+ '-Xep:RandomModInteger:ERROR',+ '-Xep:RectIntersectReturnValueIgnored:ERROR',+ '-Xep:RequiredModifiers:ERROR',+ '-Xep:RestrictedApiChecker:ERROR',+ // '-Xep:ReturnValueIgnored:OFF', // todo check if useful or comment why not+ '-Xep:SelfAssignment:ERROR',+ '-Xep:SelfComparison:ERROR',+ '-Xep:SelfEquals:ERROR',+ '-Xep:ShouldHaveEvenArgs:ERROR',+ '-Xep:SizeGreaterThanOrEqualsZero:ERROR',+ '-Xep:StreamToString:ERROR',+ '-Xep:StringBuilderInitWithChar:ERROR',+ '-Xep:SubstringOfZero:ERROR',+ '-Xep:SuppressWarningsDeprecated:ERROR',+ '-Xep:TemporalAccessorGetChronoField:ERROR',+ '-Xep:TestParametersNotInitialized:ERROR',+ '-Xep:TheoryButNoTheories:ERROR',+ '-Xep:ThrowIfUncheckedKnownChecked:ERROR',+ '-Xep:ThrowNull:ERROR',+ '-Xep:TreeToString:ERROR',+ '-Xep:TruthSelfEquals:ERROR',+ '-Xep:TryFailThrowable:ERROR',+ '-Xep:TypeParameterQualifier:ERROR',+ '-Xep:UnicodeDirectionalityCharacters:ERROR',+ '-Xep:UnicodeInCode:ERROR',+ '-Xep:UnnecessaryCheckNotNull:ERROR',+ '-Xep:UnnecessaryTypeArgument:ERROR',+ '-Xep:UnsafeWildcard:ERROR',+ '-Xep:UnusedAnonymousClass:ERROR',+ '-Xep:UnusedCollectionModifiedInPlace:ERROR',+ '-Xep:VarTypeName:ERROR',+ '-Xep:WrongOneof:ERROR',+ '-Xep:XorPower:ERROR',+ '-Xep:ZoneIdOfZ:ERROR',++ // On by Default : WARNING++ '-Xep:AlmostJavadoc:WARN',+ // '-Xep:AlreadyChecked:OFF', // todo check if useful or comment why not+ // '-Xep:AmbiguousMethodReference:OFF', // todo check if useful or comment why not+ '-Xep:AnnotateFormatMethod:WARN',+ // '-Xep:ArgumentSelectionDefectChecker:OFF', // todo check if useful or comment why not+ '-Xep:ArrayAsKeyOfSetOrMap:WARN',+ '-Xep:AssertEqualsArgumentOrderChecker:WARN',+ '-Xep:AssertThrowsMultipleStatements:WARN',+ '-Xep:AssertionFailureIgnored:WARN',+ '-Xep:AssistedInjectAndInjectOnSameConstructor:WARN',+ '-Xep:AutoValueFinalMethods:WARN',+ '-Xep:AutoValueImmutableFields:WARN',+ '-Xep:AutoValueSubclassLeaked:WARN',+ '-Xep:BadComparable:WARN',+ // '-Xep:BadImport:OFF', // style preference that we don't want to enforce+ '-Xep:BadInstanceof:WARN',+ '-Xep:BareDotMetacharacter:WARN',+ '-Xep:BigDecimalEquals:WARN',+ '-Xep:BigDecimalLiteralDouble:WARN',+ '-Xep:BoxedPrimitiveConstructor:WARN',+ '-Xep:BugPatternNaming:WARN',+ '-Xep:ByteBufferBackingArray:WARN',+ '-Xep:CacheLoaderNull:WARN',+ '-Xep:CanonicalDuration:WARN',+ // '-Xep:CanIgnoreReturnValueSuggester:OFF', // todo check if useful or comment why not+ '-Xep:CatchAndPrintStackTrace:WARN',+ // '-Xep:CatchFail:OFF', // our code is generally descriptive enough, fix case by case if tests fail+ '-Xep:ChainedAssertionLosesContext:WARN',+ '-Xep:CharacterGetNumericValue:WARN',+ '-Xep:ClassCanBeStatic:WARN',+ '-Xep:ClassNewInstance:WARN',+ '-Xep:CloseableProvides:WARN',+ '-Xep:CollectionUndefinedEquality:WARN',+ '-Xep:CollectorShouldNotUseState:WARN',+ '-Xep:ComparableAndComparator:WARN',+ '-Xep:CompareToZero:WARN',+ // '-Xep:ComplexBooleanConstant:OFF', // non trivial to fix in some cases+ '-Xep:DateChecker:WARN',+ '-Xep:DateFormatConstant:WARN',+ '-Xep:DefaultCharset:WARN',+ '-Xep:DefaultPackage:WARN',+ '-Xep:DeprecatedVariable:WARN',+ '-Xep:DirectInvocationOnMock:WARN',+ '-Xep:DistinctVarargsChecker:WARN',+ '-Xep:DoNotCallSuggester:WARN',+ '-Xep:DoNotClaimAnnotations:WARN',+ '-Xep:DoNotMockAutoValue:WARN',+ // '-Xep:DoubleCheckedLocking:OFF', // todo check if useful or comment why not+ '-Xep:EmptyBlockTag:WARN',+ // '-Xep:EmptyCatch:OFF', // todo check if useful or comment why not - might be handled by ECJ?+ '-Xep:EmptySetMultibindingContributions:WARN',+ '-Xep:EqualsGetClass:WARN',+ '-Xep:EqualsIncompatibleType:WARN',+ '-Xep:EqualsUnsafeCast:WARN',+ '-Xep:EqualsUsingHashCode:WARN',+ '-Xep:ErroneousBitwiseExpression:WARN',+ '-Xep:ErroneousThreadPoolConstructorChecker:WARN',+ '-Xep:EscapedEntity:WARN',+ // '-Xep:ExtendingJUnitAssert:OFF', // we inherit from LuceneTestCase which extends Assert+ '-Xep:ExtendsObject:WARN',+ '-Xep:FallThrough:WARN',+ // '-Xep:Finally:OFF', // todo check if useful or comment why not+ '-Xep:FloatCast:WARN',+ '-Xep:FloatingPointAssertionWithinEpsilon:WARN',+ '-Xep:FloatingPointLiteralPrecision:WARN',+ '-Xep:FloggerArgumentToString:WARN',+ '-Xep:FloggerStringConcatenation:WARN',+ '-Xep:FragmentInjection:WARN',+ '-Xep:FragmentNotInstantiable:WARN',+ // '-Xep:FutureReturnValueIgnored:OFF', // todo check if useful or comment why not+ '-Xep:GetClassOnEnum:WARN',+ '-Xep:HidingField:WARN',+ '-Xep:IdentityHashMapUsage:WARN',+ '-Xep:ImmutableAnnotationChecker:WARN',+ '-Xep:ImmutableEnumChecker:WARN',+ '-Xep:InconsistentCapitalization:WARN',+ '-Xep:InconsistentHashCode:WARN',+ '-Xep:IncorrectMainMethod:WARN',+ '-Xep:IncrementInForLoopAndHeader:WARN',+ '-Xep:InheritDoc:WARN',+ '-Xep:InjectInvalidTargetingOnScopingAnnotation:WARN',+ '-Xep:InjectOnConstructorOfAbstractClass:WARN',+ '-Xep:InjectScopeAnnotationOnInterfaceOrAbstractClass:WARN',+ '-Xep:InjectedConstructorAnnotations:WARN',+ // '-Xep:InlineFormatString:OFF', // this introduces redundancy in format strings+ '-Xep:InlineMeInliner:WARN',+ // '-Xep:InlineMeSuggester:OFF', // We don't use this annotation+ // '-Xep:InputStreamSlowMultibyteRead:OFF' // todo check if useful or comment why not,+ '-Xep:InstanceOfAndCastMatchWrongType:WARN',+ '-Xep:IntLongMath:WARN',+ // '-Xep:InvalidBlockTag:OFF', // this is needed for tags like lucene.internal+ '-Xep:InvalidInlineTag:WARN',+ '-Xep:InvalidLink:WARN',+ '-Xep:InvalidParam:WARN',+ '-Xep:InvalidThrows:WARN',+ '-Xep:InvalidThrowsLink:WARN',+ '-Xep:IterableAndIterator:WARN',+ '-Xep:JUnit3FloatingPointComparisonWithoutDelta:WARN',+ '-Xep:JUnit4ClassUsedInJUnit3:WARN',+ '-Xep:JUnitAmbiguousTestClass:WARN',+ '-Xep:JavaDurationGetSecondsGetNano:WARN',+ '-Xep:JavaDurationWithNanos:WARN',+ '-Xep:JavaDurationWithSeconds:WARN',+ '-Xep:JavaInstantGetSecondsGetNano:WARN',+ '-Xep:JavaLangClash:WARN',+ '-Xep:JavaLocalDateTimeGetNano:WARN',+ '-Xep:JavaLocalTimeGetNano:WARN',+ '-Xep:JavaPeriodGetDays:WARN',+ '-Xep:JavaTimeDefaultTimeZone:WARN',+ // '-Xep:JavaUtilDate:OFF', // todo check if useful or comment why not+ '-Xep:JavaxInjectOnFinalField:WARN',+ '-Xep:JdkObsolete:WARN',+ '-Xep:JodaConstructors:WARN',+ '-Xep:JodaDateTimeConstants:WARN',+ '-Xep:JodaDurationWithMillis:WARN',+ '-Xep:JodaInstantWithMillis:WARN',+ '-Xep:JodaNewPeriod:WARN',+ '-Xep:JodaPlusMinusLong:WARN',+ '-Xep:JodaTimeConverterManager:WARN',+ '-Xep:JodaWithDurationAddedLong:WARN',+ '-Xep:LiteEnumValueOf:WARN',+ '-Xep:LiteProtoToString:WARN',+ '-Xep:LockNotBeforeTry:WARN',+ '-Xep:LogicalAssignment:WARN',+ '-Xep:LongDoubleConversion:WARN',+ '-Xep:LongFloatConversion:WARN',+ '-Xep:LoopOverCharArray:WARN',+ '-Xep:MalformedInlineTag:WARN',+ '-Xep:MathAbsoluteRandom:WARN',+ '-Xep:MemoizeConstantVisitorStateLookups:WARN',+ '-Xep:MissingCasesInEnumSwitch:WARN',+ '-Xep:MissingFail:WARN',+ '-Xep:MissingImplementsComparable:WARN',+ '-Xep:MissingOverride:WARN',+ // '-Xep:MissingSummary:OFF', // style preference that we don't want to enforce+ // '-Xep:MixedMutabilityReturnType:OFF', // todo check if useful or comment why not+ '-Xep:MockNotUsedInProduction:WARN',+ '-Xep:ModifiedButNotUsed:WARN',+ '-Xep:ModifyCollectionInEnhancedForLoop:WARN',+ '-Xep:ModifySourceCollectionInStream:WARN',+ '-Xep:MultipleParallelOrSequentialCalls:WARN',+ '-Xep:MultipleUnaryOperatorsInMethodCall:WARN',+ // '-Xep:MutablePublicArray:OFF', // todo check if useful or comment why not - this should be possible...+ '-Xep:NarrowCalculation:WARN',+ '-Xep:NarrowingCompoundAssignment:WARN',+ // '-Xep:NegativeCharLiteral:OFF', // todo check if useful or comment why not+ '-Xep:NestedInstanceOfConditions:WARN',+ // '-Xep:NonAtomicVolatileUpdate:OFF', // todo check if useful or comment why not+ // '-Xep:NonCanonicalType:OFF', // todo check if useful or comment why not+ '-Xep:NonOverridingEquals:WARN',+ '-Xep:NullOptional:WARN',+ '-Xep:NullableConstructor:WARN',+ '-Xep:NullablePrimitive:WARN',+ '-Xep:NullablePrimitiveArray:WARN',+ '-Xep:NullableVoid:WARN',+ '-Xep:ObjectEqualsForPrimitives:WARN',+ // '-Xep:ObjectToString:OFF', // todo check if useful or comment why not+ '-Xep:ObjectsHashCodePrimitive:WARN',+ '-Xep:OperatorPrecedence:WARN',+ '-Xep:OptionalMapToOptional:WARN',+ '-Xep:OptionalNotPresent:WARN',+ '-Xep:OrphanedFormatString:WARN',+ '-Xep:OutlineNone:WARN',+ '-Xep:OverrideThrowableToString:WARN',+ '-Xep:Overrides:WARN',+ '-Xep:OverridesGuiceInjectableMethod:WARN',+ '-Xep:ParameterName:WARN',+ '-Xep:PreconditionsCheckNotNullRepeated:WARN',+ '-Xep:PrimitiveAtomicReference:WARN',+ '-Xep:ProtectedMembersInFinalClass:WARN',+ '-Xep:ProtoDurationGetSecondsGetNano:WARN',+ '-Xep:ProtoRedundantSet:WARN',+ '-Xep:ProtoTimestampGetSecondsGetNano:WARN',+ '-Xep:QualifierOrScopeOnInjectMethod:WARN',+ '-Xep:ReachabilityFenceUsage:WARN',+ '-Xep:ReferenceEquality:WARN',+ '-Xep:RethrowReflectiveOperationExceptionAsLinkageError:WARN',+ '-Xep:ReturnFromVoid:WARN',+ '-Xep:RobolectricShadowDirectlyOn:WARN',+ '-Xep:RxReturnValueIgnored:WARN',+ // '-Xep:SameNameButDifferent:OFF', // todo check if useful or comment why not+ '-Xep:SelfAlwaysReturnsThis:WARN',+ // '-Xep:ShortCircuitBoolean:OFF', // todo check if useful or comment why not+ // '-Xep:StaticAssignmentInConstructor:OFF', // we assign SolrTestCaseJ4.configString in many tests, difficult to untangle+ '-Xep:StaticAssignmentOfThrowable:WARN',+ // '-Xep:StaticGuardedByInstance:OFF', // todo check if useful or comment why not+ '-Xep:StaticMockMember:WARN',+ // '-Xep:StreamResourceLeak:OFF', // todo check if useful or comment why not+ '-Xep:StreamToIterable:WARN',+ // '-Xep:StringSplitter:OFF', // todo check if useful or comment why not - might be able to use forbidden-apis for this?+ '-Xep:SwigMemoryLeak:WARN',+ // '-Xep:SynchronizeOnNonFinalField:OFF', // todo check if useful or comment why not+ // '-Xep:ThreadJoinLoop:OFF', // todo check if useful or comment why not+ // '-Xep:ThreadLocalUsage:OFF', // todo check if useful or comment why not+ // '-Xep:ThreadPriorityCheck:OFF', // todo check if useful or comment why not+ '-Xep:ThreeLetterTimeZoneID:WARN',+ '-Xep:TimeUnitConversionChecker:WARN',+ '-Xep:ToStringReturnsNull:WARN',+ '-Xep:TruthAssertExpected:WARN',+ '-Xep:TruthConstantAsserts:WARN',+ '-Xep:TruthGetOrDefault:WARN',+ '-Xep:TruthIncompatibleType:WARN',+ '-Xep:TypeEquals:WARN',+ '-Xep:TypeNameShadowing:WARN',+ // '-Xep:TypeParameterShadowing:OFF', // todo check if useful or comment why not+ // '-Xep:TypeParameterUnusedInFormals:OFF', // todo check if useful or comment why not+ '-Xep:URLEqualsHashCode:WARN',+ '-Xep:UndefinedEquals:WARN',+ '-Xep:UnescapedEntity:WARN',+ // '-Xep:UnicodeEscape:OFF', // can't enable since Lucene/Solr tests use unicode a bunch+ '-Xep:UnnecessaryAssignment:WARN',+ '-Xep:UnnecessaryLambda:WARN',+ '-Xep:UnnecessaryLongToIntConversion:WARN',+ '-Xep:UnnecessaryMethodInvocationMatcher:WARN',+ '-Xep:UnnecessaryMethodReference:WARN',+ // '-Xep:UnnecessaryParentheses:OFF', // style preference that we don't want to enforce+ '-Xep:UnrecognisedJavadocTag:WARN',+ '-Xep:UnsafeFinalization:WARN',+ '-Xep:UnsafeReflectiveConstructionCast:WARN',+ '-Xep:UnsynchronizedOverridesSynchronized:WARN',+ // '-Xep:UnusedMethod:OFF', // todo check if useful or comment why not+ '-Xep:UnusedNestedClass:WARN',+ '-Xep:UnusedTypeParameter:WARN',+ // '-Xep:UnusedVariable:OFF', // todo check if useful or comment why not - might be able to use ecj?+ '-Xep:UseBinds:WARN',+ // '-Xep:UseCorrectAssertInTests:OFF', // we inherit from LuceneTestCase which extends Assert+ '-Xep:VariableNameSameAsType:WARN',+ // '-Xep:WaitNotInLoop:OFF', // todo check if useful or comment why not+ '-Xep:WakelockReleasedDangerously:WARN',+ '-Xep:WithSignatureDiscouraged:WARN',]}}