mirror of https://github.com/apache/lucene.git
502 lines
30 KiB
Groovy
502 lines
30 KiB
Groovy
/*
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
* this work for additional information regarding copyright ownership.
|
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
|
* (the "License"); you may not use this file except in compliance with
|
|
* the License. You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
def skipReason
|
|
|
|
if (rootProject.usesAltJvm) {
|
|
skipReason = "won't work with alternative java toolchain"
|
|
}
|
|
|
|
if (!propertyOrDefault("validation.errorprone", isCIBuild).asBoolean()) {
|
|
skipReason = "skipped on builds not running inside CI environments, pass -Pvalidation.errorprone=true to enable"
|
|
}
|
|
|
|
if (skipReason) {
|
|
configure(rootProject) {
|
|
task errorProneSkipped() {
|
|
doFirst {
|
|
logger.warn("WARNING: errorprone disabled (${skipReason})")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
allprojects { prj ->
|
|
plugins.withType(JavaPlugin) {
|
|
// LUCENE-9650: Errorprone on master/gradle does not work when running as plugin
|
|
// inside a forked Javac process. Javac running inside Gradle works, because we have
|
|
// additional module system opens in place.
|
|
// This is a hack to keep the dependency (so that palantir's version check doesn't complain)
|
|
// but don't include the plugin (which fails on JDK16+).
|
|
if (skipReason) {
|
|
tasks.withType(JavaCompile) { task -> task.dependsOn ":errorProneSkipped" }
|
|
configurations {
|
|
errorprone
|
|
}
|
|
dependencies {
|
|
errorprone("com.google.errorprone:error_prone_core")
|
|
}
|
|
} else {
|
|
prj.apply plugin: 'net.ltgt.errorprone'
|
|
|
|
dependencies {
|
|
errorprone("com.google.errorprone:error_prone_core")
|
|
}
|
|
|
|
tasks.withType(JavaCompile) { task ->
|
|
// Disable errorprone on the MR-JAR tasks
|
|
if (task.name ==~ /compileMain\d+Java/) {
|
|
options.errorprone.enabled = false
|
|
return
|
|
}
|
|
|
|
task.dependsOn ":checkJdkInternalsExportedToGradle"
|
|
|
|
options.errorprone.disableWarningsInGeneratedCode = true
|
|
options.errorprone.errorproneArgs = [
|
|
'-XepDisableAllChecks', // only enable specific checks
|
|
'-XepAllErrorsAsWarnings', // warnings still fail build by default, but allows usage of -Pjavac.failOnWarnings=false
|
|
|
|
// List of enabled/disabled checks
|
|
// Please keep this synced with https://errorprone.info/bugpatterns when upgrading!
|
|
// Do *NOT* enable checks based on their name or description. Read the source code and make sure they are useful!
|
|
// Most error-prone checks are not useful for non-google software.
|
|
|
|
// On by Default : ERROR
|
|
|
|
// '-Xep:AlwaysThrows:OFF', // we don't use google collections
|
|
// '-Xep:AndroidInjectionBeforeSuper:OFF', // we don't use android
|
|
'-Xep:ArrayEquals:ERROR',
|
|
'-Xep:ArrayFillIncompatibleType:ERROR',
|
|
'-Xep:ArrayHashCode:ERROR',
|
|
'-Xep:ArrayToString:ERROR',
|
|
// '-Xep:ArraysAsListPrimitiveArray:OFF', // we don't use guava
|
|
// '-Xep:AsyncCallableReturnsNull:OFF', // we don't use guava
|
|
// '-Xep:AsyncFunctionReturnsNull:OFF', // we don't use guava
|
|
// '-Xep:AutoValueBuilderDefaultsInConstructor:OFF', // we don't use autovalue
|
|
// '-Xep:AutoValueConstructorOrderChecker:OFF', // we don't use autovalue
|
|
'-Xep:BadAnnotationImplementation:ERROR',
|
|
'-Xep:BadShiftAmount:ERROR',
|
|
// '-Xep:BanJNDI:OFF', // implemented with forbidden APIs instead
|
|
'-Xep:BoxedPrimitiveEquality:ERROR',
|
|
// '-Xep:BundleDeserializationCast:OFF', // we don't use android
|
|
'-Xep:ChainingConstructorIgnoresParameter:ERROR',
|
|
// '-Xep:CheckNotNullMultipleTimes:OFF', // we don't use guava
|
|
// '-Xep:CheckReturnValue:OFF', // we don't use these annotations
|
|
'-Xep:CollectionToArraySafeParameter:ERROR',
|
|
// '-Xep:ComparableType:OFF',
|
|
'-Xep:ComparingThisWithNull:ERROR',
|
|
'-Xep:ComparisonOutOfRange:ERROR',
|
|
// '-Xep:CompatibleWithAnnotationMisuse:OFF', // we don't use this annotation
|
|
// '-Xep:CompileTimeConstant:OFF', // we don't use this annotation
|
|
'-Xep:ComputeIfAbsentAmbiguousReference:ERROR',
|
|
'-Xep:ConditionalExpressionNumericPromotion:ERROR',
|
|
'-Xep:ConstantOverflow:ERROR',
|
|
// '-Xep:DaggerProvidesNull:OFF', // we don't use dagger
|
|
'-Xep:DangerousLiteralNull:ERROR',
|
|
'-Xep:DeadException:ERROR',
|
|
'-Xep:DeadThread:ERROR',
|
|
'-Xep:DiscardedPostfixExpression:ERROR',
|
|
// '-Xep:DoNotCall:OFF', // we don't use this annotation
|
|
// '-Xep:DoNotMock:OFF', // we don't use mocking libraries
|
|
// '-Xep:DoubleBraceInitialization:OFF', // we don't use guava
|
|
'-Xep:DuplicateMapKeys:ERROR',
|
|
// '-Xep:DurationFrom:OFF', // we don't use Duration.from()
|
|
// '-Xep:DurationGetTemporalUnit:OFF', // we don't use Duration.get()
|
|
// '-Xep:DurationTemporalUnit:OFF', // we don't use Duration.of() etc
|
|
// '-Xep:DurationToLongTimeUnit:OFF', // we don't use TimeUnit.convert Duration, etc
|
|
// '-Xep:EmptyTopLevelDeclaration:OFF', // noisy
|
|
'-Xep:EqualsHashCode:ERROR',
|
|
'-Xep:EqualsNaN:ERROR',
|
|
'-Xep:EqualsNull:ERROR',
|
|
'-Xep:EqualsReference:ERROR',
|
|
'-Xep:EqualsWrongThing:ERROR',
|
|
// '-Xep:FloggerFormatString:OFF', // we don't use flogger
|
|
// '-Xep:FloggerLogVarargs:OFF', // we don't use flogger
|
|
// '-Xep:FloggerSplitLogStatement:OFF', // we don't use flogger
|
|
// '-Xep:ForOverride:OFF', // we don't use this annotation
|
|
// '-Xep:FormatString:OFF',
|
|
// '-Xep:FormatStringAnnotation:OFF', // we don't use this annotation
|
|
// '-Xep:FromTemporalAccessor:OFF', // we don't use .from(LocalDate) etc
|
|
'-Xep:FunctionalInterfaceMethodChanged:ERROR',
|
|
// '-Xep:FuturesGetCheckedIllegalExceptionType:OFF', // we don't use guava
|
|
// '-Xep:FuzzyEqualsShouldNotBeUsedInEqualsMethod:OFF', // we don't use guava
|
|
'-Xep:GetClassOnAnnotation:ERROR',
|
|
'-Xep:GetClassOnClass:ERROR',
|
|
// '-Xep:GuardedBy:OFF', // we don't use this annotation
|
|
// '-Xep:GuiceAssistedInjectScoping:OFF', // we don't use guice
|
|
// '-Xep:GuiceAssistedParameters:OFF', // we don't use guice
|
|
// '-Xep:GuiceInjectOnFinalField:OFF', // we don't use guice
|
|
'-Xep:HashtableContains:ERROR',
|
|
// '-Xep:IdentityBinaryExpression:OFF',
|
|
'-Xep:IdentityHashMapBoxing:ERROR',
|
|
// '-Xep:IgnoredPureGetter:OFF', // we don't use these annotations
|
|
// '-Xep:Immutable:OFF', // we don't use this annotation
|
|
// '-Xep:ImpossibleNullComparison:OFF', // we don't use protobuf
|
|
'-Xep:Incomparable:ERROR',
|
|
// '-Xep:IncompatibleArgumentType:OFF', // we don't use this annotation
|
|
// '-Xep:IncompatibleModifiers:OFF', // we don't use this annotation
|
|
'-Xep:IndexOfChar:ERROR',
|
|
'-Xep:InexactVarargsConditional:ERROR',
|
|
// '-Xep:InfiniteRecursion:OFF',
|
|
// '-Xep:InjectMoreThanOneScopeAnnotationOnClass:OFF', // we don't use this annotation
|
|
// '-Xep:InjectOnMemberAndConstructor:OFF', // we don't use this annotation
|
|
// '-Xep:InlineMeValidator:OFF', // we don't use this annotation
|
|
// '-Xep:InstantTemporalUnit:OFF', // we don't use Instant apis with strange temporal units
|
|
// '-Xep:InvalidJavaTimeConstant:OFF', // we don't use impacted java.time classes (Month, etc)
|
|
// '-Xep:InvalidPatternSyntax:OFF',
|
|
// '-Xep:InvalidTimeZoneID:OFF', // we don't use getTimeZone with constant IDs except UTC/GMT
|
|
// '-Xep:InvalidZoneId:OFF', // we don't use ZoneId.of
|
|
'-Xep:IsInstanceIncompatibleType:ERROR',
|
|
'-Xep:IsInstanceOfClass:ERROR',
|
|
// '-Xep:IsLoggableTagLength:OFF', // we don't use android
|
|
// '-Xep:JUnit3TestNotRun:OFF', // we don't use junit3
|
|
'-Xep:JUnit4ClassAnnotationNonStatic:ERROR',
|
|
// '-Xep:JUnit4SetUpNotRun:OFF', // LuceneTestCase takes care
|
|
// '-Xep:JUnit4TearDownNotRun:OFF', // LuceneTestCase takes care
|
|
// '-Xep:JUnit4TestNotRun:OFF', // noisy
|
|
'-Xep:JUnit4TestsNotRunWithinEnclosed:ERROR',
|
|
'-Xep:JUnitAssertSameCheck:ERROR',
|
|
'-Xep:JUnitParameterMethodNotFound:ERROR',
|
|
// '-Xep:JavaxInjectOnAbstractMethod:OFF', // we don't this annotation
|
|
// '-Xep:JodaToSelf:OFF', // we don't use joda-time
|
|
// '-Xep:LenientFormatStringValidation:OFF' // we don't use these google libraries
|
|
// '-Xep:LiteByteStringUtf8:OFF', // we don't use protobuf
|
|
// '-Xep:LocalDateTemporalAmount:OFF', // we don't use LocalDate math
|
|
'-Xep:LockOnBoxedPrimitive:ERROR',
|
|
'-Xep:LoopConditionChecker:ERROR',
|
|
'-Xep:LossyPrimitiveCompare:ERROR',
|
|
'-Xep:MathRoundIntLong:ERROR',
|
|
// '-Xep:MislabeledAndroidString:OFF', // we don't use android
|
|
// '-Xep:MisplacedScopeAnnotations:OFF', // we don't use this annotation
|
|
// '-Xep:MissingSuperCall:OFF', // we don't use this annotation
|
|
// '-Xep:MissingTestCall:OFF', // we don't use guava
|
|
// '-Xep:MisusedDayOfYear:OFF', // we don't use date patterns
|
|
// '-Xep:MisusedWeekYear:OFF', // we don't use date patterns
|
|
// '-Xep:MixedDescriptors:OFF', // we don't use protobuf
|
|
// '-Xep:MockitoUsage:OFF', // we don't use mockito
|
|
'-Xep:ModifyingCollectionWithItself:ERROR',
|
|
// '-Xep:MoreThanOneInjectableConstructor:OFF', // we don't use this annotation
|
|
// '-Xep:MustBeClosedChecker:OFF', // we don't use this annotation
|
|
'-Xep:NCopiesOfChar:ERROR',
|
|
// '-Xep:NoCanIgnoreReturnValueOnClasses:OFF', // we don't use this annotation
|
|
'-Xep:NonCanonicalStaticImport:ERROR',
|
|
// '-Xep:NonFinalCompileTimeConstant:OFF', // we don't use this annotation
|
|
'-Xep:NonRuntimeAnnotation:ERROR',
|
|
// '-Xep:NullArgumentForNonNullParameter:OFF', // we don't use this annotation
|
|
'-Xep:NullTernary:ERROR',
|
|
// '-Xep:NullableOnContainingClass:OFF', // we don't use this annotation
|
|
'-Xep:OptionalEquality:ERROR',
|
|
'-Xep:OptionalMapUnusedValue:ERROR',
|
|
'-Xep:OptionalOfRedundantMethod:ERROR',
|
|
// '-Xep:OverlappingQualifierAndScopeAnnotation:OFF', // we don't use this annotation
|
|
// '-Xep:OverridesJavaxInjectableMethod:OFF', // we don't use this annotation
|
|
'-Xep:PackageInfo:ERROR',
|
|
'-Xep:ParametersButNotParameterized:ERROR',
|
|
// '-Xep:ParcelableCreator:OFF', // we don't use android
|
|
// '-Xep:PeriodFrom:OFF', // we don't use Period
|
|
// '-Xep:PeriodGetTemporalUnit:OFF', // we don't use Period
|
|
// '-Xep:PeriodTimeMath:OFF', // we don't use Period
|
|
// '-Xep:PreconditionsInvalidPlaceholder:OFF', // we don't use guava
|
|
// '-Xep:PrivateSecurityContractProtoAccess:OFF', // we don't use protobuf
|
|
// '-Xep:ProtoBuilderReturnValueIgnored:OFF', // we don't use protobuf
|
|
// '-Xep:ProtoFieldNullComparison:OFF', // we don't use protobuf
|
|
// '-Xep:ProtoStringFieldReferenceEquality:OFF', // we don't use protobuf
|
|
// '-Xep:ProtoTruthMixedDescriptors:OFF', // we don't use protobuf
|
|
// '-Xep:ProtocolBufferOrdinal:OFF', // we don't use protobuf
|
|
// '-Xep:ProvidesMethodOutsideOfModule:OFF', // we don't use guice
|
|
'-Xep:RandomCast:ERROR',
|
|
'-Xep:RandomModInteger:ERROR',
|
|
// '-Xep:RectIntersectReturnValueIgnored:OFF', // we don't use android
|
|
// '-Xep:RequiredModifiers:OFF', // we don't use this annotation
|
|
// '-Xep:RestrictedApiChecker:OFF', // we don't use this annotation
|
|
// '-Xep:ReturnValueIgnored:OFF', // noisy
|
|
'-Xep:SelfAssignment:ERROR',
|
|
'-Xep:SelfComparison:ERROR',
|
|
'-Xep:SelfEquals:ERROR',
|
|
// '-Xep:ShouldHaveEvenArgs:OFF', // we don't use truth
|
|
'-Xep:SizeGreaterThanOrEqualsZero:ERROR',
|
|
'-Xep:StreamToString:ERROR',
|
|
'-Xep:StringBuilderInitWithChar:ERROR',
|
|
'-Xep:SubstringOfZero:ERROR',
|
|
'-Xep:SuppressWarningsDeprecated:ERROR',
|
|
// '-Xep:TemporalAccessorGetChronoField:OFF', // we don't use TemporalAccessor.get
|
|
// '-Xep:TestParametersNotInitialized:OFF', // we don't use this annotation
|
|
// '-Xep:TheoryButNoTheories:OFF', // we don't use junit theory apis/runner
|
|
// '-Xep:ThrowIfUncheckedKnownChecked:OFF', // we don't use this annotation
|
|
// '-Xep:ThrowNull:OFF', // noisy (LuceneTestCase)
|
|
// '-Xep:TreeToString:OFF', // we don't use javac API
|
|
// '-Xep:TruthSelfEquals:OFF', // we don't use truth
|
|
// '-Xep:TryFailThrowable:OFF',
|
|
'-Xep:TypeParameterQualifier:ERROR',
|
|
'-Xep:UnicodeDirectionalityCharacters:ERROR',
|
|
// '-Xep:UnicodeInCode:OFF', // noisy (spatial3d)
|
|
'-Xep:UnnecessaryCheckNotNull:ERROR',
|
|
'-Xep:UnnecessaryTypeArgument:ERROR',
|
|
'-Xep:UnsafeWildcard:ERROR',
|
|
'-Xep:UnusedAnonymousClass:ERROR',
|
|
'-Xep:UnusedCollectionModifiedInPlace:ERROR',
|
|
'-Xep:VarTypeName:ERROR',
|
|
// '-Xep:WrongOneof:OFF', // we don't use protobuf
|
|
'-Xep:XorPower:ERROR',
|
|
// '-Xep:ZoneIdOfZ:OFF', // we don't use ZoneId.of
|
|
|
|
// On by Default : WARNING
|
|
|
|
// '-Xep:ASTHelpersSuggestions:OFF', // we don't use ASTHelpers
|
|
// '-Xep:AlmostJavadoc:OFF', // noisy (e.g. commented-out code misinterpreted as javadocs)
|
|
// '-Xep:AlreadyChecked:OFF', // TODO: there are problems
|
|
// '-Xep:AmbiguousMethodReference:OFF',
|
|
// '-Xep:AnnotateFormatMethod:OFF', // we don't use this annotation
|
|
// '-Xep:ArgumentSelectionDefectChecker:OFF', // noisy
|
|
// '-Xep:ArrayAsKeyOfSetOrMap:OFF', // TODO: there are problems
|
|
'-Xep:AssertEqualsArgumentOrderChecker:WARN',
|
|
'-Xep:AssertThrowsMultipleStatements:WARN',
|
|
// '-Xep:AssertionFailureIgnored:OFF', // TODO: there are problems
|
|
// '-Xep:AssistedInjectAndInjectOnSameConstructor:OFF', // we don't use this annotation
|
|
// '-Xep:AutoValueFinalMethods:OFF', // we don't use autovalue
|
|
// '-Xep:AutoValueImmutableFields:OFF', // we don't use autovalue
|
|
// '-Xep:AutoValueSubclassLeaked:OFF', // we don't use autovalue
|
|
'-Xep:BadComparable:WARN',
|
|
// '-Xep:BadImport:OFF', // TODO: there are problems
|
|
// '-Xep:BadInstanceof:OFF', // TODO: there are problems
|
|
'-Xep:BareDotMetacharacter:WARN',
|
|
// '-Xep:BigDecimalEquals:OFF', // BigDecimal barely used, can use forbidden-apis for this
|
|
// '-Xep:BigDecimalLiteralDouble:OFF', // BigDecimal barely used, can use forbidden-apis for this
|
|
// '-Xep:BoxedPrimitiveConstructor:OFF', // we have forbiddenapis for that
|
|
// '-Xep:BugPatternNaming:OFF', // we don't use this annotation
|
|
// '-Xep:ByteBufferBackingArray:OFF',
|
|
// '-Xep:CacheLoaderNull:OFF', // we don't use guava
|
|
// '-Xep:CanonicalDuration:OFF', // barely use Duration.of (one test), just a style thing
|
|
// '-Xep:CatchAndPrintStackTrace:OFF', // noisy
|
|
// '-Xep:CatchFail:OFF', // TODO: there are problems
|
|
// '-Xep:ChainedAssertionLosesContext:OFF', // we don't use truth
|
|
// '-Xep:CharacterGetNumericValue:OFF', // noisy
|
|
// '-Xep:ClassCanBeStatic:OFF', // noisy
|
|
'-Xep:ClassNewInstance:WARN',
|
|
// '-Xep:CloseableProvides:OFF', // we don't use this annotation
|
|
// '-Xep:CollectionUndefinedEquality:OFF', // TODO: there are problems
|
|
'-Xep:CollectorShouldNotUseState:WARN',
|
|
'-Xep:ComparableAndComparator:WARN',
|
|
'-Xep:CompareToZero:WARN',
|
|
// '-Xep:ComplexBooleanConstant:OFF', // TODO: there are problems
|
|
// '-Xep:DateChecker:OFF', // we don't use these Date setters/ctors
|
|
// '-Xep:DateFormatConstant:OFF', // we don't use Date setters
|
|
// '-Xep:DefaultCharset:OFF', // we have forbiddenapis for that
|
|
// '-Xep:DefaultPackage:OFF',
|
|
'-Xep:DeprecatedVariable:WARN',
|
|
// '-Xep:DirectInvocationOnMock:OFF', // we don't use mocking libraries
|
|
// '-Xep:DistinctVarargsChecker:OFF', // we don't use google collections
|
|
// '-Xep:DoNotCallSuggester:OFF', // we don't use this annotation
|
|
// '-Xep:DoNotClaimAnnotations:OFF', // we don't use annotation processors
|
|
// '-Xep:DoNotMockAutoValue:OFF', // we don't use autovalue
|
|
// '-Xep:DoubleCheckedLocking:OFF', // TODO: there are problems
|
|
'-Xep:EmptyBlockTag:WARN',
|
|
// '-Xep:EmptyCatch:OFF', // ECJ takes care
|
|
// '-Xep:EmptySetMultibindingContributions:OFF', // we don't use this annotation
|
|
// '-Xep:EqualsGetClass:OFF', // noisy
|
|
// '-Xep:EqualsIncompatibleType:OFF',
|
|
// '-Xep:EqualsUnsafeCast:OFF', // noisy
|
|
'-Xep:EqualsUsingHashCode:WARN',
|
|
'-Xep:ErroneousBitwiseExpression:WARN',
|
|
'-Xep:ErroneousThreadPoolConstructorChecker:WARN',
|
|
// '-Xep:EscapedEntity:OFF',
|
|
// '-Xep:ExtendingJUnitAssert:OFF', // noisy
|
|
// '-Xep:ExtendsObject:OFF', // TODO: there are problems
|
|
// '-Xep:FallThrough:OFF', // TODO: there are problems
|
|
'-Xep:Finalize:WARN', // catches actual finalizers that don't call super
|
|
// '-Xep:Finally:OFF', // TODO: there are problems
|
|
'-Xep:FloatCast:WARN',
|
|
'-Xep:FloatingPointAssertionWithinEpsilon:WARN',
|
|
// '-Xep:FloatingPointLiteralPrecision:OFF', // TODO: there are problems
|
|
// '-Xep:FloggerArgumentToString:OFF', // we don't use flogger
|
|
// '-Xep:FloggerStringConcatenation:OFF', // we don't use flogger
|
|
// '-Xep:FragmentInjection:OFF', // we don't use android
|
|
// '-Xep:FragmentNotInstantiable:OFF', // we don't use android
|
|
// '-Xep:FutureReturnValueIgnored:OFF', // TODO: there are problems
|
|
'-Xep:GetClassOnEnum:WARN',
|
|
// '-Xep:HidingField:OFF', // noisy
|
|
// '-Xep:IdentityHashMapUsage:OFF', // noisy
|
|
// '-Xep:ImmutableAnnotationChecker:OFF', // we don't use this annotation
|
|
// '-Xep:ImmutableEnumChecker:OFF', // noisy
|
|
// '-Xep:InconsistentCapitalization:OFF', // TODO: there are problems
|
|
// '-Xep:InconsistentHashCode:OFF', // noisy
|
|
// '-Xep:IgnoredPureGetter:OFF', // we don't use these google libraries
|
|
'-Xep:IncorrectMainMethod:WARN',
|
|
'-Xep:IncrementInForLoopAndHeader:WARN',
|
|
'-Xep:InheritDoc:WARN',
|
|
// '-Xep:InjectOnBugCheckers:OFF', // we don't use this annotation
|
|
// '-Xep:InjectInvalidTargetingOnScopingAnnotation:OFF', // we don't use this annotation
|
|
// '-Xep:InjectOnConstructorOfAbstractClass:OFF', // we don't use this annotation
|
|
// '-Xep:InjectScopeAnnotationOnInterfaceOrAbstractClass:OFF', // we don't use this annotation
|
|
// '-Xep:InjectedConstructorAnnotations:OFF', // we don't use this annotation
|
|
// '-Xep:InlineFormatString:OFF', // noisy
|
|
// '-Xep:InlineMeInliner:OFF', // we don't use this annotation
|
|
// '-Xep:InlineMeSuggester:OFF', // we don't use this annotation
|
|
// '-Xep:InputStreamSlowMultibyteRead:OFF',
|
|
'-Xep:InstanceOfAndCastMatchWrongType:WARN',
|
|
// '-Xep:IntLongMath:OFF', // noisy
|
|
// '-Xep:InvalidBlockTag:OFF', // noisy (e.g. lucene.experimental)
|
|
// '-Xep:InvalidInlineTag:OFF', // TODO: there are problems
|
|
'-Xep:InvalidLink:WARN',
|
|
// '-Xep:InvalidParam:OFF', // TODO: there are problems
|
|
'-Xep:InvalidThrows:WARN',
|
|
'-Xep:InvalidThrowsLink:WARN',
|
|
'-Xep:IterableAndIterator:WARN',
|
|
// '-Xep:JUnit3FloatingPointComparisonWithoutDelta:OFF', // we don't use junit3
|
|
// '-Xep:JUnit4ClassUsedInJUnit3:OFF', // we don't use junit3
|
|
// '-Xep:JUnitAmbiguousTestClass:OFF', // we don't use junit3
|
|
// '-Xep:JavaDurationGetSecondsGetNano:OFF', // we don't use these Duration methods
|
|
// '-Xep:JavaDurationWithNanos:OFF', // we don't use these Duration methods
|
|
// '-Xep:JavaDurationWithSeconds:OFF', // we don't use these Duration methods
|
|
// '-Xep:JavaInstantGetSecondsGetNano:OFF', // we don't use these Instant methods
|
|
// '-Xep:JavaLangClash:OFF', // TODO: there are problems
|
|
// '-Xep:JavaLocalDateTimeGetNano:OFF', // we don't use LocalDateTime
|
|
// '-Xep:JavaLocalTimeGetNano:OFF', // we don't use LocalTime
|
|
// '-Xep:JavaPeriodGetDays:OFF', // we don't use Period
|
|
// '-Xep:JavaTimeDefaultTimeZone:OFF', // forbidden-apis checks this
|
|
// '-Xep:JavaUtilDate:OFF', // noisy
|
|
// '-Xep:JavaxInjectOnFinalField:OFF', // we don't use this annotation
|
|
// '-Xep:JdkObsolete:OFF', // noisy
|
|
// '-Xep:JodaConstructors:OFF', // we don't use joda-time
|
|
// '-Xep:JodaDateTimeConstants:OFF', // we don't use joda-time
|
|
// '-Xep:JodaDurationWithMillis:OFF', // we don't use joda-time
|
|
// '-Xep:JodaInstantWithMillis:OFF', // we don't use joda-time
|
|
// '-Xep:JodaNewPeriod:OFF', // we don't use joda-time
|
|
// '-Xep:JodaPlusMinusLong:OFF', // we don't use joda-time
|
|
// '-Xep:JodaTimeConverterManager:OFF', // we don't use joda-time
|
|
// '-Xep:JodaWithDurationAddedLong:OFF', // we don't use joda-time
|
|
// '-Xep:LabelledBreakTarget:OFF', // stylistic
|
|
// '-Xep:LiteEnumValueOf:OFF', // we don't use protobuf
|
|
// '-Xep:LiteProtoToString:OFF', // we don't use protobuf
|
|
// '-Xep:LockNotBeforeTry:OFF', // TODO: there are problems
|
|
'-Xep:LogicalAssignment:WARN',
|
|
'-Xep:LongDoubleConversion:WARN',
|
|
'-Xep:LongFloatConversion:WARN',
|
|
'-Xep:LoopOverCharArray:WARN',
|
|
'-Xep:MalformedInlineTag:WARN',
|
|
// '-Xep:MathAbsoluteNegative:OFF', // TODO: there are problems
|
|
// '-Xep:MemoizeConstantVisitorStateLookups:OFF', // we don't use this class
|
|
// '-Xep:MissingCasesInEnumSwitch:OFF', // redundant with ECJ incompleteEnumSwitch/missingEnumCaseDespiteDefault
|
|
// '-Xep:MissingFail:OFF', // TODO: there are problems
|
|
'-Xep:MissingImplementsComparable:WARN',
|
|
// '-Xep:MissingOverride:OFF', // ECJ takes care of this
|
|
// '-Xep:MissingSummary:OFF', // TODO: there are problems
|
|
// '-Xep:MixedMutabilityReturnType:OFF', // noisy
|
|
// '-Xep:MockNotUsedInProduction:OFF', // we don't use mocking libraries
|
|
// '-Xep:ModifiedButNotUsed:OFF', // TODO: there are problems
|
|
'-Xep:ModifyCollectionInEnhancedForLoop:WARN',
|
|
'-Xep:ModifySourceCollectionInStream:WARN',
|
|
'-Xep:MultipleParallelOrSequentialCalls:WARN',
|
|
'-Xep:MultipleUnaryOperatorsInMethodCall:WARN',
|
|
// '-Xep:MutablePublicArray:OFF', // TODO: there are problems
|
|
'-Xep:NarrowCalculation:WARN',
|
|
// '-Xep:NarrowingCompoundAssignment:OFF', // noisy
|
|
'-Xep:NegativeCharLiteral:WARN',
|
|
'-Xep:NestedInstanceOfConditions:WARN',
|
|
// '-Xep:NewFileSystem:OFF', // we don't create new filesystems
|
|
// '-Xep:NonAtomicVolatileUpdate:OFF', // TODO: there are problems
|
|
// '-Xep:NonCanonicalType:OFF', // noisy
|
|
'-Xep:NonOverridingEquals:WARN',
|
|
'-Xep:NullOptional:WARN',
|
|
// '-Xep:NullableConstructor:OFF', // we don't use this annotation
|
|
// '-Xep:NullablePrimitive:OFF', // we don't use this annotation
|
|
// '-Xep:NullablePrimitiveArray:OFF', // we don't use this annotation
|
|
// '-Xep:NullableVoid:OFF', // we don't use this annotation
|
|
'-Xep:ObjectEqualsForPrimitives:WARN',
|
|
// '-Xep:ObjectToString:OFF', // TODO: there are problems
|
|
// '-Xep:ObjectsHashCodePrimitive:OFF', // TODO: there are problems
|
|
// '-Xep:OperatorPrecedence:OFF', // noisy
|
|
'-Xep:OptionalMapToOptional:WARN',
|
|
'-Xep:OptionalNotPresent:WARN',
|
|
'-Xep:OrphanedFormatString:WARN',
|
|
// '-Xep:OutlineNone:OFF', // we don't use gwt
|
|
'-Xep:OverrideThrowableToString:WARN',
|
|
'-Xep:Overrides:WARN',
|
|
// '-Xep:OverridesGuiceInjectableMethod:OFF', // we don't use guice
|
|
// '-Xep:ParameterName:OFF', // we don't pass parameters with comments in this way
|
|
// '-Xep:PreconditionsCheckNotNullRepeated:OFF', // we don't use guava
|
|
'-Xep:PrimitiveAtomicReference:WARN',
|
|
// '-Xep:ProtectedMembersInFinalClass:OFF', // we don't use protobuf
|
|
// '-Xep:ProtoDurationGetSecondsGetNano:OFF', // we don't use protobuf
|
|
// '-Xep:ProtoRedundantSet:OFF', // we don't use protobuf
|
|
// '-Xep:ProtoTimestampGetSecondsGetNano:OFF', // we don't use protobuf
|
|
// '-Xep:QualifierOrScopeOnInjectMethod:OFF', // we don't use this annotation
|
|
'-Xep:ReachabilityFenceUsage:WARN',
|
|
// '-Xep:ReferenceEquality:OFF', // noisy
|
|
'-Xep:RethrowReflectiveOperationExceptionAsLinkageError:WARN',
|
|
'-Xep:ReturnFromVoid:WARN',
|
|
// '-Xep:RobolectricShadowDirectlyOn:OFF', // we don't use robolectric
|
|
// '-Xep:RxReturnValueIgnored:OFF', // we don't use rxjava
|
|
// '-Xep:SameNameButDifferent:OFF', // TODO: there are problems
|
|
// '-Xep:SelfAlwaysReturnsThis:OFF', // we don't use self() methods, this isn't python.
|
|
// '-Xep:ShortCircuitBoolean:OFF', // TODO: there are problems
|
|
// '-Xep:StaticAssignmentInConstructor:OFF',
|
|
// '-Xep:StaticAssignmentOfThrowable:OFF', // noisy
|
|
// '-Xep:StaticGuardedByInstance:OFF',
|
|
// '-Xep:StaticMockMember:OFF', // we don't use mock libraries
|
|
// '-Xep:StreamResourceLeak:OFF', // TODO: there are problems
|
|
'-Xep:StreamToIterable:WARN',
|
|
// '-Xep:StringSplitter:OFF', // noisy, can use forbidden-apis for this
|
|
// '-Xep:SwigMemoryLeak:OFF', // we don't use swig
|
|
// '-Xep:SynchronizeOnNonFinalField:OFF', // noisy
|
|
// '-Xep:ThreadJoinLoop:OFF',
|
|
// '-Xep:ThreadLocalUsage:OFF', // noisy
|
|
// '-Xep:ThreadPriorityCheck:OFF', // noisy, forbidden APIs can do this
|
|
'-Xep:ThreeLetterTimeZoneID:WARN',
|
|
'-Xep:TimeUnitConversionChecker:WARN',
|
|
// '-Xep:ToStringReturnsNull:OFF', // TODO: there are problems
|
|
// '-Xep:TruthAssertExpected:OFF', // we don't use truth
|
|
// '-Xep:TruthConstantAsserts:OFF', // we don't use truth
|
|
// '-Xep:TruthGetOrDefault:OFF', // we don't use truth
|
|
// '-Xep:TruthIncompatibleType:OFF', // we don't use truth
|
|
// '-Xep:TypeEquals:OFF', // we don't use this internal javac api
|
|
'-Xep:TypeNameShadowing:WARN',
|
|
// '-Xep:TypeParameterShadowing:OFF',
|
|
// '-Xep:TypeParameterUnusedInFormals:OFF',
|
|
'-Xep:URLEqualsHashCode:WARN',
|
|
// '-Xep:UndefinedEquals:OFF', // TODO: there are problems
|
|
// '-Xep:UnescapedEntity:OFF', // TODO: there are problems
|
|
// '-Xep:UnicodeEscape:OFF', // noisy
|
|
// '-Xep:UnnecessaryAssignment:OFF', // we don't use these annotations
|
|
// '-Xep:UnnecessaryLambda:OFF', // TODO: there are problems
|
|
// '-Xep:UnnecessaryLongToIntConversion:OFF', // TODO: there are problems
|
|
// '-Xep:UnnecessaryMethodInvocationMatcher:OFF', // we don't use spring
|
|
'-Xep:UnnecessaryMethodReference:WARN',
|
|
// '-Xep:UnnecessaryParentheses:OFF', // noisy
|
|
// '-Xep:UnqualifiedYield:OFF', // javac takes care
|
|
'-Xep:UnrecognisedJavadocTag:WARN',
|
|
// '-Xep:UnsafeFinalization:OFF', // we don't use finalizers, deprecated for removal, fails build
|
|
'-Xep:UnsafeReflectiveConstructionCast:WARN',
|
|
// '-Xep:UnsynchronizedOverridesSynchronized:OFF', // TODO: there are problems
|
|
// '-Xep:UnusedLabel:OFF', // TODO: there are problems
|
|
// '-Xep:UnusedMethod:OFF', // TODO: there are problems
|
|
'-Xep:UnusedNestedClass:WARN',
|
|
// '-Xep:UnusedTypeParameter:OFF', // TODO: there are problems
|
|
// '-Xep:UnusedVariable:OFF', // noisy, can use ECJ
|
|
// '-Xep:UseBinds:OFF', // we don't use this annotation
|
|
// '-Xep:UseCorrectAssertInTests:OFF', // noisy
|
|
'-Xep:VariableNameSameAsType:WARN',
|
|
// '-Xep:WaitNotInLoop:OFF', // TODO: there are problems
|
|
// '-Xep:WakelockReleasedDangerously:OFF', // we don't use android
|
|
// '-Xep:WithSignatureDiscouraged:OFF', // we aren't using this error-prone internal api
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|