aboutsummaryrefslogtreecommitdiffstats
path: root/gradle
diff options
context:
space:
mode:
authorKristen Kozak <sebright@google.com>2017-11-13 19:05:17 -0800
committerKristen Kozak <sebright@google.com>2017-11-13 19:54:33 -0800
commite086f07b5708ad1ffddbc186cf7965a21e852ba7 (patch)
tree285741c24e308460fa61d8dc778c8c6419b9edf6 /gradle
parentd80e6de38c6959aac5736634ca3950101b3392bd (diff)
downloadplatform_external_opencensus-java-e086f07b5708ad1ffddbc186cf7965a21e852ba7.tar.gz
platform_external_opencensus-java-e086f07b5708ad1ffddbc186cf7965a21e852ba7.tar.bz2
platform_external_opencensus-java-e086f07b5708ad1ffddbc186cf7965a21e852ba7.zip
Update lists of enabled Error Prone warnings with the latest bug patterns.
I used the latest list of bug patterns from http://errorprone.info/bugpatterns. I had to turn off FieldMissingNullable because of an Error Prone bug and suppress two instances of other warnings in the code. I removed NonRuntimeAnnotation and ProtocolBufferOrdinal from the list because they were promoted to errors. I also enabled two previously disabled warnings because they seemed to no longer cause any problems in this project.
Diffstat (limited to 'gradle')
-rw-r--r--gradle/errorprone/experimental_errors6
-rw-r--r--gradle/errorprone/experimental_suggestions9
-rw-r--r--gradle/errorprone/experimental_warnings6
-rw-r--r--gradle/errorprone/warnings31
4 files changed, 46 insertions, 6 deletions
diff --git a/gradle/errorprone/experimental_errors b/gradle/errorprone/experimental_errors
index eabbb37c..5ce6e181 100644
--- a/gradle/errorprone/experimental_errors
+++ b/gradle/errorprone/experimental_errors
@@ -6,20 +6,22 @@ errorProneExperimentalErrors = \
-Xep:DepAnn:ERROR,\
-Xep:DivZero:ERROR,\
-Xep:EmptyIf:ERROR,\
+-Xep:FuzzyEqualsShouldNotBeUsedInEqualsMethod:ERROR,\
-Xep:InjectInvalidTargetingOnScopingAnnotation:ERROR,\
-Xep:InjectMoreThanOneQualifier:ERROR,\
-Xep:InjectScopeAnnotationOnInterfaceOrAbstractClass:ERROR,\
-Xep:InjectScopeOrQualifierAnnotationRetention:ERROR,\
-Xep:InjectedConstructorAnnotations:ERROR,\
-Xep:InsecureCryptoUsage:ERROR,\
+-Xep:IterablePathParameter:ERROR,\
-Xep:JMockTestWithoutRunWithOrRuleAnnotation:ERROR,\
-Xep:JavaxInjectOnFinalField:ERROR,\
-Xep:LockMethodChecker:ERROR,\
-Xep:LongLiteralLowerCaseSuffix:ERROR,\
-Xep:NoAllocation:ERROR,\
--Xep:NonRuntimeAnnotation:ERROR,\
-Xep:NumericEquality:ERROR,\
--Xep:ParameterPackage:OFF,\
+-Xep:ParameterPackage:ERROR,\
-Xep:ProtoStringFieldReferenceEquality:ERROR,\
+-Xep:QualifierOrScopeOnInjectMethod:ERROR,\
-Xep:StaticOrDefaultInterfaceMethod:ERROR,\
-Xep:UnlockMethod:ERROR
diff --git a/gradle/errorprone/experimental_suggestions b/gradle/errorprone/experimental_suggestions
index d5e916e2..1330b843 100644
--- a/gradle/errorprone/experimental_suggestions
+++ b/gradle/errorprone/experimental_suggestions
@@ -1,16 +1,25 @@
+# FieldMissingNullable is turned off due to
+# https://github.com/google/error-prone/issues/823.
+
errorProneExperimentalSuggestions = \
-Xep:ConstantField:ERROR,\
-Xep:EmptySetMultibindingContributions:ERROR,\
+-Xep:FieldMissingNullable:OFF,\
-Xep:MethodCanBeStatic:ERROR,\
-Xep:MixedArrayDimensions:ERROR,\
-Xep:MultiVariableDeclaration:ERROR,\
-Xep:MultipleTopLevelClasses:ERROR,\
+-Xep:MultipleUnaryOperatorsInMethodCall:ERROR,\
-Xep:PackageLocation:ERROR,\
+-Xep:ParameterComment:ERROR,\
+-Xep:ParameterNotNullable:ERROR,\
-Xep:PrivateConstructorForNoninstantiableModuleTest:ERROR,\
-Xep:PrivateConstructorForUtilityClass:ERROR,\
-Xep:RemoveUnusedImports:ERROR,\
-Xep:ReturnMissingNullable:ERROR,\
-Xep:ThrowsUncheckedException:ERROR,\
+-Xep:UngroupedOverloads:ERROR,\
+-Xep:UnnecessarySetDefault:ERROR,\
-Xep:UnnecessaryStaticImport:ERROR,\
-Xep:UseBinds:ERROR,\
-Xep:WildcardImport:ERROR
diff --git a/gradle/errorprone/experimental_warnings b/gradle/errorprone/experimental_warnings
index a5a45f4b..b5a7df2b 100644
--- a/gradle/errorprone/experimental_warnings
+++ b/gradle/errorprone/experimental_warnings
@@ -3,13 +3,17 @@ errorProneExperimentalWarnings = \
-Xep:AssistedInjectAndInjectOnConstructors:ERROR,\
-Xep:BigDecimalLiteralDouble:ERROR,\
-Xep:BindingToUnqualifiedCommonType:ERROR,\
+-Xep:ConstructorInvokesOverridable:ERROR,\
+-Xep:ConstructorLeaksThis:ERROR,\
-Xep:EmptyTopLevelDeclaration:ERROR,\
-Xep:ExpectedExceptionChecker:ERROR,\
-Xep:HardCodedSdCardPath:ERROR,\
-Xep:InconsistentOverloads:ERROR,\
--Xep:MissingDefault:OFF,\
+-Xep:MissingDefault:ERROR,\
+-Xep:MutableMethodReturnType:ERROR,\
-Xep:NonCanonicalStaticMemberImport:ERROR,\
-Xep:PrimitiveArrayPassedToVarargsMethod:ERROR,\
+-Xep:ProvidesFix:ERROR,\
-Xep:QualifierWithTypeUse:ERROR,\
-Xep:RedundantThrows:ERROR,\
-Xep:StaticQualifiedUsingExpression:ERROR,\
diff --git a/gradle/errorprone/warnings b/gradle/errorprone/warnings
index fe8182ef..da7302dd 100644
--- a/gradle/errorprone/warnings
+++ b/gradle/errorprone/warnings
@@ -1,16 +1,24 @@
errorProneWarnings = \
-Xep:AmbiguousMethodReference:ERROR,\
+-Xep:ArgumentSelectionDefectChecker:ERROR,\
+-Xep:AssertEqualsArgumentOrderChecker:ERROR,\
+-Xep:AssertionFailureIgnored:ERROR,\
-Xep:BadAnnotationImplementation:ERROR,\
-Xep:BadComparable:ERROR,\
-Xep:BoxedPrimitiveConstructor:ERROR,\
-Xep:CannotMockFinalClass:ERROR,\
+-Xep:CanonicalDuration:ERROR,\
-Xep:ClassCanBeStatic:ERROR,\
-Xep:ClassNewInstance:ERROR,\
+-Xep:CollectionToArraySafeParameter:ERROR,\
+-Xep:CollectorShouldNotUseState:ERROR,\
+-Xep:ComparableAndComparator:ERROR,\
-Xep:DefaultCharset:ERROR,\
-Xep:DoubleCheckedLocking:ERROR,\
-Xep:EqualsHashCode:ERROR,\
-Xep:EqualsIncompatibleType:ERROR,\
--Xep:Finally:ERROR,-Xep:FloatingPointLiteralPrecision:ERROR,\
+-Xep:Finally:ERROR,\
+-Xep:FloatingPointLiteralPrecision:ERROR,\
-Xep:FragmentInjection:ERROR,\
-Xep:FragmentNotInstantiable:ERROR,\
-Xep:FunctionalInterfaceClash:ERROR,\
@@ -19,33 +27,50 @@ errorProneWarnings = \
-Xep:ImmutableAnnotationChecker:ERROR,\
-Xep:ImmutableEnumChecker:ERROR,\
-Xep:IncompatibleModifiers:ERROR,\
+-Xep:IncrementInForLoopAndHeader:ERROR,\
-Xep:InjectOnConstructorOfAbstractClass:ERROR,\
-Xep:InputStreamSlowMultibyteRead:ERROR,\
+-Xep:InstanceOfAndCastMatchWrongType:ERROR,\
+-Xep:IntLongMath:ERROR,\
-Xep:IterableAndIterator:ERROR,\
-Xep:JUnit3FloatingPointComparisonWithoutDelta:ERROR,\
+-Xep:JUnit4ClassUsedInJUnit3:ERROR,\
-Xep:JUnitAmbiguousTestClass:ERROR,\
+-Xep:JavaLangClash:ERROR,\
+-Xep:JdkObsolete:ERROR,\
+-Xep:LogicalAssignment:ERROR,\
-Xep:MissingFail:ERROR,\
-Xep:MissingOverride:ERROR,\
+-Xep:MultipleParallelOrSequentialCalls:ERROR,\
-Xep:MutableConstantField:ERROR,\
+-Xep:NamedParameters:ERROR,\
+-Xep:NarrowingCompoundAssignment:WARN,\
+-Xep:NestedInstanceOfConditions:ERROR,\
-Xep:NonAtomicVolatileUpdate:ERROR,\
-Xep:NonOverridingEquals:ERROR,\
-Xep:NullableConstructor:ERROR,\
-Xep:NullablePrimitive:ERROR,\
-Xep:NullableVoid:ERROR,\
-Xep:OperatorPrecedence:ERROR,\
+-Xep:OptionalNotPresent:ERROR,\
+-Xep:OverrideThrowableToString:ERROR,\
+-Xep:Overrides:ERROR,\
-Xep:OverridesGuiceInjectableMethod:ERROR,\
+-Xep:ParameterName:ERROR,\
-Xep:PreconditionsInvalidPlaceholder:ERROR,\
-Xep:ProtoFieldPreconditionsCheckNotNull:ERROR,\
--Xep:ProtocolBufferOrdinal:ERROR,\
-Xep:ReferenceEquality:ERROR,\
-Xep:RequiredModifiers:ERROR,\
-Xep:ShortCircuitBoolean:ERROR,\
-Xep:SimpleDateFormatConstant:ERROR,\
-Xep:StaticGuardedByInstance:ERROR,\
-Xep:SynchronizeOnNonFinalField:ERROR,\
+-Xep:ThreadJoinLoop:ERROR,\
-Xep:TruthConstantAsserts:ERROR,\
-Xep:TypeParameterShadowing:ERROR,\
-Xep:TypeParameterUnusedInFormals:ERROR,\
-Xep:URLEqualsHashCode:ERROR,\
-Xep:UnsynchronizedOverridesSynchronized:ERROR,\
--Xep:WaitNotInLoop:ERROR
+-Xep:UseCorrectAssertInTests:ERROR,\
+-Xep:WaitNotInLoop:ERROR,\
+-Xep:WakelockReleasedDangerously:ERROR