Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add all error-prone checks in the Bazel build #468

Merged
merged 2 commits into from
Oct 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
373 changes: 371 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,373 @@
# https://errorprone.info/
http://errorprone.info/bugpatterns
# To avoid bugs in the code
# P1 Fix the errors and bump from :WARN to :ERROR
# P2 Fix the warnings and bump from :OFF to :WARN

# On by default : ERROR
build --javacopt "-Xep:ArrayEquals:ERROR"
build --javacopt "-Xep:ArrayFillIncompatibleType:ERROR"
build --javacopt "-Xep:ArrayHashCode:ERROR"
build --javacopt "-Xep:ArrayToString:ERROR"
build --javacopt "-Xep:ArraysAsListPrimitiveArray:ERROR"
build --javacopt "-Xep:AsyncCallableReturnsNull:ERROR"
build --javacopt "-Xep:AsyncFunctionReturnsNull:ERROR"
build --javacopt "-Xep:AutoValueConstructorOrderChecker:ERROR"
build --javacopt "-Xep:BadShiftAmount:ERROR"
build --javacopt "-Xep:BundleDeserializationCast:ERROR"
build --javacopt "-Xep:ChainingConstructorIgnoresParameter:ERROR"
build --javacopt "-Xep:CheckReturnValue:ERROR"
build --javacopt "-Xep:CollectionIncompatibleType:ERROR"
build --javacopt "-Xep:ComparableType:ERROR"
build --javacopt "-Xep:ComparingThisWithNull:ERROR"
build --javacopt "-Xep:ComparisonOutOfRange:ERROR"
build --javacopt "-Xep:CompatibleWithAnnotationMisuse:ERROR"
build --javacopt "-Xep:CompileTimeConstant:ERROR"
build --javacopt "-Xep:ComplexBooleanConstant:ERROR"
build --javacopt "-Xep:ConditionalExpressionNumericPromotion:ERROR"
build --javacopt "-Xep:ConstantOverflow:ERROR"
build --javacopt "-Xep:DaggerProvidesNull:ERROR"
build --javacopt "-Xep:DeadException:ERROR"
build --javacopt "-Xep:DeadThread:ERROR"
build --javacopt "-Xep:DoNotCall:ERROR"
build --javacopt "-Xep:EqualsNaN:ERROR"
build --javacopt "-Xep:EqualsReference:ERROR"
build --javacopt "-Xep:EqualsWrongThing:ERROR"
build --javacopt "-Xep:ForOverride:ERROR"
build --javacopt "-Xep:FormatString:ERROR"
build --javacopt "-Xep:FormatStringAnnotation:ERROR"
build --javacopt "-Xep:FunctionalInterfaceMethodChanged:ERROR"
build --javacopt "-Xep:FuturesGetCheckedIllegalExceptionType:ERROR"
build --javacopt "-Xep:GetClassOnAnnotation:ERROR"
build --javacopt "-Xep:GetClassOnClass:ERROR"
build --javacopt "-Xep:GuardedBy:ERROR"
build --javacopt "-Xep:GuiceAssistedInjectScoping:ERROR"
build --javacopt "-Xep:GuiceAssistedParameters:ERROR"
build --javacopt "-Xep:GuiceInjectOnFinalField:ERROR"
build --javacopt "-Xep:HashtableContains:ERROR"
build --javacopt "-Xep:IdentityBinaryExpression:ERROR"
build --javacopt "-Xep:Immutable:ERROR"
build --javacopt "-Xep:ImmutableModification:ERROR"
build --javacopt "-Xep:IncompatibleArgumentType:ERROR"
build --javacopt "-Xep:IndexOfChar:ERROR"
build --javacopt "-Xep:InexactVarargsConditional:ERROR"
build --javacopt "-Xep:InfiniteRecursion:ERROR"
build --javacopt "-Xep:InjectMoreThanOneScopeAnnotationOnClass:ERROR"
build --javacopt "-Xep:InjectOnMemberAndConstructor:ERROR"
build --javacopt "-Xep:InvalidPatternSyntax:ERROR"
build --javacopt "-Xep:InvalidTimeZoneID:ERROR"
build --javacopt "-Xep:IsInstanceOfClass:ERROR"
build --javacopt "-Xep:IsLoggableTagLength:ERROR"
build --javacopt "-Xep:JUnit3TestNotRun:ERROR"
build --javacopt "-Xep:JUnit4ClassAnnotationNonStatic:ERROR"
build --javacopt "-Xep:JUnit4SetUpNotRun:ERROR"
build --javacopt "-Xep:JUnit4TearDownNotRun:ERROR"
build --javacopt "-Xep:JUnit4TestNotRun:ERROR"
build --javacopt "-Xep:JUnitAssertSameCheck:ERROR"
build --javacopt "-Xep:JavaxInjectOnAbstractMethod:ERROR"
build --javacopt "-Xep:LiteByteStringUtf8:ERROR"
build --javacopt "-Xep:LoopConditionChecker:ERROR"
build --javacopt "-Xep:MathRoundIntLong:ERROR"
#build --javacopt "-Xep:MislabeledAndroidString:ERROR"
build --javacopt "-Xep:MissingSuperCall:ERROR"
build --javacopt "-Xep:MissingTestCall:ERROR"
build --javacopt "-Xep:MisusedWeekYear:ERROR"
build --javacopt "-Xep:MockitoCast:ERROR"
build --javacopt "-Xep:MockitoUsage:ERROR"
build --javacopt "-Xep:ModifyingCollectionWithItself:ERROR"
build --javacopt "-Xep:MoreThanOneInjectableConstructor:ERROR"
build --javacopt "-Xep:MustBeClosedChecker:ERROR"
build --javacopt "-Xep:NCopiesOfChar:ERROR"
build --javacopt "-Xep:NonCanonicalStaticImport:ERROR"
build --javacopt "-Xep:NonFinalCompileTimeConstant:ERROR"
build --javacopt "-Xep:NonRuntimeAnnotation:ERROR"
build --javacopt "-Xep:NullTernary:ERROR"
build --javacopt "-Xep:OptionalEquality:ERROR"
build --javacopt "-Xep:OverlappingQualifierAndScopeAnnotation:ERROR"
build --javacopt "-Xep:OverridesJavaxInjectableMethod:ERROR"
build --javacopt "-Xep:PackageInfo:ERROR"
build --javacopt "-Xep:ParcelableCreator:ERROR"
build --javacopt "-Xep:PreconditionsCheckNotNull:ERROR"
build --javacopt "-Xep:PreconditionsCheckNotNullPrimitive:ERROR"
build --javacopt "-Xep:PredicateIncompatibleType:ERROR"
build --javacopt "-Xep:PrivateSecurityContractProtoAccess:ERROR"
build --javacopt "-Xep:ProtoFieldNullComparison:ERROR"
build --javacopt "-Xep:ProtoStringFieldReferenceEquality:ERROR"
build --javacopt "-Xep:ProtocolBufferOrdinal:ERROR"
build --javacopt "-Xep:ProvidesMethodOutsideOfModule:ERROR"
build --javacopt "-Xep:RandomCast:ERROR"
build --javacopt "-Xep:RandomModInteger:ERROR"
build --javacopt "-Xep:RectIntersectReturnValueIgnored:ERROR"
build --javacopt "-Xep:RestrictedApiChecker:ERROR"
build --javacopt "-Xep:ReturnValueIgnored:ERROR"
build --javacopt "-Xep:SelfAssignment:ERROR"
build --javacopt "-Xep:SelfComparison:ERROR"
build --javacopt "-Xep:SelfEquals:ERROR"
build --javacopt "-Xep:ShouldHaveEvenArgs:ERROR"
build --javacopt "-Xep:SizeGreaterThanOrEqualsZero:ERROR"
build --javacopt "-Xep:StreamToString:ERROR"
build --javacopt "-Xep:StringBuilderInitWithChar:ERROR"
build --javacopt "-Xep:SubstringOfZero:ERROR"
build --javacopt "-Xep:SuppressWarningsDeprecated:ERROR"
build --javacopt "-Xep:ThrowIfUncheckedKnownChecked:ERROR"
build --javacopt "-Xep:ThrowNull:ERROR"
build --javacopt "-Xep:TruthSelfEquals:ERROR"
build --javacopt "-Xep:TryFailThrowable:ERROR"
build --javacopt "-Xep:TypeParameterQualifier:ERROR"
build --javacopt "-Xep:UnnecessaryTypeArgument:ERROR"
build --javacopt "-Xep:UnusedAnonymousClass:ERROR"
build --javacopt "-Xep:UnusedCollectionModifiedInPlace:ERROR"
build --javacopt "-Xep:VarTypeName:ERROR"

# On by default : WARNING
build --javacopt "-Xep:AmbiguousMethodReference:WARN"
build --javacopt "-Xep:ArgumentSelectionDefectChecker:WARN"
build --javacopt "-Xep:ArrayAsKeyOfSetOrMap:WARN"
build --javacopt "-Xep:AssertEqualsArgumentOrderChecker:WARN"
build --javacopt "-Xep:AssertThrowsMultipleStatements:WARN"
# TODO(#469) Fix these warnings
build --javacopt "-Xep:AssertionFailureIgnored:OFF"
build --javacopt "-Xep:AutoValueFinalMethods:WARN"
build --javacopt "-Xep:BadAnnotationImplementation:WARN"
build --javacopt "-Xep:BadComparable:WARN"
build --javacopt "-Xep:BadImport:WARN"
build --javacopt "-Xep:BadInstanceof:WARN"
build --javacopt "-Xep:BigDecimalEquals:WARN"
build --javacopt "-Xep:BigDecimalLiteralDouble:WARN"
# TODO(#469) Fix these warnings
build --javacopt "-Xep:BoxedPrimitiveConstructor:OFF"
build --javacopt "-Xep:ByteBufferBackingArray:WARN"
build --javacopt "-Xep:CannotMockFinalClass:WARN"
build --javacopt "-Xep:CanonicalDuration:WARN"
# TODO(#469) Fix these warnings
build --javacopt "-Xep:CatchAndPrintStackTrace:OFF"
build --javacopt "-Xep:CatchFail:WARN"
# TODO(#469) Fix these warnings
build --javacopt "-Xep:ClassCanBeStatic:WARN"
build --javacopt "-Xep:ClassNewInstance:WARN"
build --javacopt "-Xep:CloseableProvides:WARN"
build --javacopt "-Xep:CollectionToArraySafeParameter:WARN"
build --javacopt "-Xep:CollectorShouldNotUseState:WARN"
build --javacopt "-Xep:ComparableAndComparator:WARN"
build --javacopt "-Xep:DateFormatConstant:WARN"
# TODO(#469/#470) Fix these errors and re-enable violation
build --javacopt "-Xep:DefaultCharset:OFF"
# TODO(#469) Fix these warnings
build --javacopt "-Xep:DeprecatedThreadMethods:OFF"
build --javacopt "-Xep:DoubleBraceInitialization:WARN"
build --javacopt "-Xep:DoubleCheckedLocking:WARN"
build --javacopt "-Xep:EqualsGetClass:WARN"
build --javacopt "-Xep:EqualsHashCode:WARN"
build --javacopt "-Xep:EqualsIncompatibleType:WARN"
build --javacopt "-Xep:EqualsUnsafeCast:WARN"
build --javacopt "-Xep:EqualsUsingHashCode:WARN"
build --javacopt "-Xep:ExtendingJUnitAssert:WARN"
# TODO(#222) Increase to error when we build from jflex-1.7.1 with a lexer annotated with
# @SuppressWarnings
build --javacopt "-Xep:FallThrough:WARN"
build --javacopt "-Xep:FallThrough:OFF"
build --javacopt "-Xep:Finally:WARN"
build --javacopt "-Xep:FloatCast:WARN"
build --javacopt "-Xep:FloatingPointAssertionWithinEpsilon:WARN"
build --javacopt "-Xep:FloatingPointLiteralPrecision:WARN"
build --javacopt "-Xep:FragmentInjection:WARN"
build --javacopt "-Xep:FragmentNotInstantiable:WARN"
build --javacopt "-Xep:FutureReturnValueIgnored:WARN"
build --javacopt "-Xep:GetClassOnEnum:WARN"
build --javacopt "-Xep:HidingField:WARN"
build --javacopt "-Xep:ImmutableAnnotationChecker:WARN"
build --javacopt "-Xep:ImmutableEnumChecker:WARN"
build --javacopt "-Xep:IncompatibleModifiers:WARN"
build --javacopt "-Xep:InconsistentCapitalization:WARN"
build --javacopt "-Xep:InconsistentHashCode:WARN"
# TODO(#469) Fix these warnings
build --javacopt "-Xep:IncrementInForLoopAndHeader:OFF"
build --javacopt "-Xep:InjectOnConstructorOfAbstractClass:WARN"
build --javacopt "-Xep:InputStreamSlowMultibyteRead:WARN"
build --javacopt "-Xep:InstanceOfAndCastMatchWrongType:WARN"
build --javacopt "-Xep:IntLongMath:WARN"
build --javacopt "-Xep:IterableAndIterator:WARN"
build --javacopt "-Xep:JUnit3FloatingPointComparisonWithoutDelta:WARN"
build --javacopt "-Xep:JUnit4ClassUsedInJUnit3:WARN"
build --javacopt "-Xep:JUnitAmbiguousTestClass:WARN"
build --javacopt "-Xep:JavaLangClash:WARN"
# TODO(#469) Fix these warnings
build --javacopt "-Xep:JdkObsolete:OFF"
build --javacopt "-Xep:LockNotBeforeTry:WARN"
build --javacopt "-Xep:LogicalAssignment:WARN"
build --javacopt "-Xep:MathAbsoluteRandom:WARN"
build --javacopt "-Xep:MissingCasesInEnumSwitch:WARN"
build --javacopt "-Xep:MissingFail:WARN"
# TODO(#469) Fix these warnings
build --javacopt "-Xep:MissingOverride:OFF"
build --javacopt "-Xep:ModifiedButNotUsed:WARN"
build --javacopt "-Xep:ModifyCollectionInEnhancedForLoop:WARN"
build --javacopt "-Xep:MultipleParallelOrSequentialCalls:WARN"
build --javacopt "-Xep:MutableConstantField:WARN"
build --javacopt "-Xep:NarrowingCompoundAssignment:WARN"
build --javacopt "-Xep:NestedInstanceOfConditions:WARN"
build --javacopt "-Xep:NonAtomicVolatileUpdate:WARN"
build --javacopt "-Xep:NonOverridingEquals:WARN"
build --javacopt "-Xep:NullableConstructor:WARN"
build --javacopt "-Xep:NullablePrimitive:WARN"
build --javacopt "-Xep:NullableVoid:WARN"
build --javacopt "-Xep:ObjectToString:WARN"
build --javacopt "-Xep:ObjectsHashCodePrimitive:WARN"
build --javacopt "-Xep:OperatorPrecedence:WARN"
build --javacopt "-Xep:OptionalNotPresent:WARN"
build --javacopt "-Xep:OrphanedFormatString:WARN"
build --javacopt "-Xep:OverrideThrowableToString:WARN"
build --javacopt "-Xep:Overrides:WARN"
build --javacopt "-Xep:OverridesGuiceInjectableMethod:WARN"
build --javacopt "-Xep:ParameterName:WARN"
build --javacopt "-Xep:PreconditionsInvalidPlaceholder:WARN"
build --javacopt "-Xep:ProtoRedundantSet:WARN"
build --javacopt "-Xep:QualifierOrScopeOnInjectMethod:WARN"
build --javacopt "-Xep:ReachabilityFenceUsage:WARN"
# TODO(#469) Fix these warnings
build --javacopt "-Xep:ReferenceEquality:OFF"
build --javacopt "-Xep:RequiredModifiers:WARN"
build --javacopt "-Xep:ShortCircuitBoolean:WARN"
build --javacopt "-Xep:StaticGuardedByInstance:WARN"
build --javacopt "-Xep:StreamResourceLeak:WARN"
build --javacopt "-Xep:StringSplitter:WARN"
build --javacopt "-Xep:SwigMemoryLeak:WARN"
build --javacopt "-Xep:SynchronizeOnNonFinalField:WARN"
build --javacopt "-Xep:ThreadJoinLoop:WARN"
build --javacopt "-Xep:ThreadLocalUsage:WARN"
# TODO(#469) Fix these warnings
build --javacopt "-Xep:ThreadPriorityCheck:OFF"
build --javacopt "-Xep:ThreeLetterTimeZoneID:WARN"
build --javacopt "-Xep:ToStringReturnsNull:WARN"
build --javacopt "-Xep:TruthAssertExpected:WARN"
build --javacopt "-Xep:TruthConstantAsserts:WARN"
build --javacopt "-Xep:TruthIncompatibleType:WARN"
build --javacopt "-Xep:TypeNameShadowing:WARN"
build --javacopt "-Xep:TypeParameterShadowing:WARN"
build --javacopt "-Xep:TypeParameterUnusedInFormals:WARN"
build --javacopt "-Xep:URLEqualsHashCode:WARN"
build --javacopt "-Xep:UndefinedEquals:WARN"
# TODO(#469) Fix these warnings
build --javacopt "-Xep:UnnecessaryParentheses:OFF"
build --javacopt "-Xep:UnsafeFinalization:WARN"
build --javacopt "-Xep:UnsafeReflectiveConstructionCast:WARN"
build --javacopt "-Xep:UnsynchronizedOverridesSynchronized:WARN"
build --javacopt "-Xep:UseCorrectAssertInTests:WARN"
build --javacopt "-Xep:VariableNameSameAsType:WARN"
build --javacopt "-Xep:WaitNotInLoop:WARN"
build --javacopt "-Xep:WakelockReleasedDangerously:WARN"

#Experimental : ERROR
#build --javacopt "-Xep:AndroidJdkLibsChecker:ERROR"
build --javacopt "-Xep:AssistedInjectAndInjectOnSameConstructor:ERROR"
build --javacopt "-Xep:AutoFactoryAtInject:ERROR"
build --javacopt "-Xep:ClassName:ERROR"
build --javacopt "-Xep:ComparisonContractViolated:ERROR"
build --javacopt "-Xep:DepAnn:ERROR"
build --javacopt "-Xep:DivZero:ERROR"
build --javacopt "-Xep:EmptyIf:ERROR"
build --javacopt "-Xep:FuzzyEqualsShouldNotBeUsedInEqualsMethod:ERROR"
build --javacopt "-Xep:InjectInvalidTargetingOnScopingAnnotation:ERROR"
build --javacopt "-Xep:InjectMoreThanOneQualifier:ERROR"
build --javacopt "-Xep:InjectScopeAnnotationOnInterfaceOrAbstractClass:ERROR"
build --javacopt "-Xep:InjectScopeOrQualifierAnnotationRetention:ERROR"
build --javacopt "-Xep:InjectedConstructorAnnotations:ERROR"
build --javacopt "-Xep:InsecureCryptoUsage:ERROR"
build --javacopt "-Xep:IterablePathParameter:ERROR"
build --javacopt "-Xep:JMockTestWithoutRunWithOrRuleAnnotation:ERROR"
build --javacopt "-Xep:Java7ApiChecker:ERROR"
build --javacopt "-Xep:JavaxInjectOnFinalField:ERROR"
build --javacopt "-Xep:LockMethodChecker:ERROR"
build --javacopt "-Xep:LongLiteralLowerCaseSuffix:ERROR"
build --javacopt "-Xep:NoAllocation:ERROR"
build --javacopt "-Xep:NumericEquality:ERROR"
build --javacopt "-Xep:ParameterPackage:ERROR"
build --javacopt "-Xep:RestrictTo:ERROR"
build --javacopt "-Xep:StaticOrDefaultInterfaceMethod:ERROR"
build --javacopt "-Xep:UnlockMethod:ERROR"

# Experimental : WARNING
build --javacopt "-Xep:AnnotateFormatMethod:WARN"
build --javacopt "-Xep:AnnotationPosition:WARN"
build --javacopt "-Xep:AssertFalse:WARN"
build --javacopt "-Xep:AssistedInjectAndInjectOnConstructors:WARN"
build --javacopt "-Xep:BinderIdentityRestoredDangerously:WARN"
build --javacopt "-Xep:BindingToUnqualifiedCommonType:WARN"
# TODO(#469) Fix these errors and re-enable violation
build --javacopt "-Xep:ConstructorInvokesOverridable:OFF"
build --javacopt "-Xep:ConstructorLeaksThis:WARN"
build --javacopt "-Xep:EmptyTopLevelDeclaration:WARN"
build --javacopt "-Xep:EqualsBrokenForNull:WARN"
build --javacopt "-Xep:ExpectedExceptionChecker:WARN"
build --javacopt "-Xep:FunctionalInterfaceClash:WARN"
build --javacopt "-Xep:HardCodedSdCardPath:WARN"
# TODO(#469) Fix these errors and re-enable violation
build --javacopt "-Xep:InconsistentOverloads:OFF"
build --javacopt "-Xep:InvalidParam:WARN"
build --javacopt "-Xep:InvalidTag:WARN"
build --javacopt "-Xep:InvalidThrows:WARN"
# TODO(#469) Fix these errors and re-enable violation
build --javacopt "-Xep:MissingDefault:OFF"
build --javacopt "-Xep:MutableMethodReturnType:WARN"
build --javacopt "-Xep:NoFunctionalReturnType:WARN"
build --javacopt "-Xep:NonCanonicalStaticMemberImport:WARN"
build --javacopt "-Xep:NullableDereference:WARN"
build --javacopt "-Xep:PrimitiveArrayPassedToVarargsMethod:WARN"
build --javacopt "-Xep:ProtosAsKeyOfSetOrMap:WARN"
build --javacopt "-Xep:ProvidesFix:WARN"
build --javacopt "-Xep:QualifierWithTypeUse:WARN"
build --javacopt "-Xep:RedundantThrows:WARN"
build --javacopt "-Xep:ReturnFromVoid:WARN"
build --javacopt "-Xep:StaticQualifiedUsingExpression:WARN"
build --javacopt "-Xep:StringEquality:WARN"
build --javacopt "-Xep:SystemExitOutsideMain:WARN"
build --javacopt "-Xep:TestExceptionChecker:WARN"
build --javacopt "-Xep:UnnecessaryDefaultInEnumSwitch:WARN"
# TODO(#469) Fix these warnings
build --javacopt "-Xep:Unused:OFF"
# TODO(#469) Fix these warnings
build --javacopt "-Xep:UnusedException:OFF"
# TODO(#469) Fix these warnings
# bazel-out/darwin-fastbuild/genfiles/jflex/LexParse.java:2260: error: [Var] Non-constant variable missing @Var annotation
# RegExp RESULT =null;
build --javacopt "-Xep:Var:OFF"

# Experimental : SUGGESTION
build --javacopt "-Xep:ClassNamedLikeTypeParameter:WARN"
# TODO(#469) Fix these warnings
build --javacopt "-Xep:ConstantField:OFF"
build --javacopt "-Xep:EmptySetMultibindingContributions:WARN"
build --javacopt "-Xep:ExpectedExceptionRefactoring:WARN"
# TODO(#469) Fix these warnings
build --javacopt "-Xep:FieldCanBeFinal:OFF"
build --javacopt "-Xep:FieldMissingNullable:WARN"
build --javacopt "-Xep:ImmutableRefactoring:WARN"
build --javacopt "-Xep:LambdaFunctionalInterface:WARN"
build --javacopt "-Xep:MethodCanBeStatic:WARN"
# TODO(#469) Fix these warnings
build --javacopt "-Xep:MixedArrayDimensions:OFF"
# TODO(#469) Fix these warnings
build --javacopt "-Xep:MultiVariableDeclaration:OFF"
build --javacopt "-Xep:MultipleTopLevelClasses:WARN"
build --javacopt "-Xep:MultipleUnaryOperatorsInMethodCall:WARN"
build --javacopt "-Xep:PackageLocation:WARN"
build --javacopt "-Xep:ParameterComment:WARN"
build --javacopt "-Xep:ParameterNotNullable:WARN"
build --javacopt "-Xep:PrivateConstructorForNoninstantiableModule:WARN"
build --javacopt "-Xep:PrivateConstructorForUtilityClass:WARN"
# TODO(#469) Fix these warnings
build --javacopt "-Xep:RemoveUnusedImports:OFF"
# TODO(#469) Fix these warnings
build --javacopt "-Xep:ReturnMissingNullable:OFF"
build --javacopt "-Xep:ScopeOnModule:WARN"
build --javacopt "-Xep:SwitchDefault:WARN"
build --javacopt "-Xep:TestExceptionRefactoring:WARN"
build --javacopt "-Xep:ThrowsUncheckedException:WARN"
# TODO(#469) Fix these warnings
build --javacopt "-Xep:TryFailRefactoring:OFF"
build --javacopt "-Xep:TypeParameterNaming:WARN"
# TODO(#469) Fix these warnings
build --javacopt "-Xep:UngroupedOverloads:OFF"
build --javacopt "-Xep:UnnecessarySetDefault:WARN"
build --javacopt "-Xep:UnnecessaryStaticImport:WARN"
build --javacopt "-Xep:UseBinds:WARN"
# TODO(#469) Fix these warnings
build --javacopt "-Xep:WildcardImport:OFF"
5 changes: 4 additions & 1 deletion cup/cup_runtime/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@ licenses(["notice"]) # BSD-like
java_library(
name = "cup_runtime",
srcs = glob(["src/main/java/**/*.java"]),
visibility=["//visibility:public"]
visibility=["//visibility:public"],
javacopts=[
# Not our code, there is nothing we can do
"-XepDisableAllChecks"],
)
4 changes: 4 additions & 0 deletions testsuite/bzltestsuite/java/jflex/testing/javac/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ java_library(
deps = [
"//third_party/com/google/guava",
],
javacopts = [
# Only used for testing
"-Xep:Java7ApiChecker:OFF",
],
)