Skip to content
Closed
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
63 changes: 31 additions & 32 deletions gradle/error-prone.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,48 @@ apply plugin: 'net.ltgt.errorprone'

dependencies {
errorprone('com.google.errorprone:error_prone_core:2.42.0')
errorprone('tech.picnic.error-prone-support:error-prone-contrib:0.26.0')
// errorprone('tech.picnic.error-prone-support:error-prone-contrib:0.26.0') // bug: https://github.com/google/error-prone/issues/5365
}

tasks.withType(JavaCompile).configureEach {
options.errorprone {
disableAllWarnings = true // https://github.com/diffplug/spotless/issues/2745
disable( // consider fix, or reasoning.
'FunctionalInterfaceMethodChanged',
'JavaxInjectOnAbstractMethod',
'OverridesJavaxInjectableMethod',
)
error(
'AmbiguousJsonCreator',
'AssertJNullnessAssertion',
'AutowiredConstructor',
'CanonicalAnnotationSyntax',
'CollectorMutability',
'ConstantNaming',
'DirectReturn',
'EmptyMethod',
'ExplicitArgumentEnumeration',
'ExplicitEnumOrdering',
'IdentityConversion',
'ImmutablesSortedSetComparator',
'IsInstanceLambdaUsage',
'MockitoMockClassReference',
'MockitoStubbing',
'NestedOptionals',
'PrimitiveComparison',
'RedundantStringConversion',
'RedundantStringEscape',
'ReturnValueIgnored',
'SelfAssignment',
'StringJoin',
'StringJoining',
'UnnecessarilyFullyQualified',
'UnnecessaryLambda',
)
// error(
// 'AmbiguousJsonCreator',
// 'AssertJNullnessAssertion',
// 'AutowiredConstructor',
// 'CanonicalAnnotationSyntax',
// 'CollectorMutability',
// 'ConstantNaming',
// 'DirectReturn',
// 'EmptyMethod',
// 'ExplicitArgumentEnumeration',
// 'ExplicitEnumOrdering',
// 'IdentityConversion',
// 'ImmutablesSortedSetComparator',
// 'IsInstanceLambdaUsage',
// 'MockitoMockClassReference',
// 'MockitoStubbing',
// 'NestedOptionals',
// 'PrimitiveComparison',
// 'RedundantStringConversion',
// 'RedundantStringEscape',
// 'ReturnValueIgnored',
// 'SelfAssignment',
// 'StringJoin',
// 'StringJoining',
// 'UnnecessarilyFullyQualified',
// 'UnnecessaryLambda',
// )
// bug: this only happens when the file is dirty.
// might be an up2date (caching) issue, as file is currently in corrupt state.
// ForbidGradleInternal(import org.gradle.api.internal.project.ProjectInternal;)
errorproneArgs.add('-XepExcludedPaths:' +
'.*/SelfTest.java|' +
'.*/GradleIntegrationHarness.java'
)
// excludedPaths.add('.*/SelfTest.java');
// excludedPaths.add('.*/GradleIntegrationHarness.java');
}
}
Loading