@@ -5,30 +5,88 @@ apply plugin: 'net.ltgt.errorprone'
55dependencies {
66 errorprone(' com.google.errorprone:error_prone_core:2.42.0' )
77 errorprone(' tech.picnic.error-prone-support:error-prone-contrib:0.25.0' )
8- constraints {
9- errorprone(' com.google.guava:guava' ) {
10- version {
11- require(' 33.4.8-jre' )
12- }
13- because(' Older versions use deprecated methods in sun.misc.Unsafe' )
14- // https://github.com/junit-team/junit-framework/pull/5039#discussion_r2414490581
15- }
16- }
178}
189
1910tasks. withType(JavaCompile ). configureEach {
2011 options. errorprone {
21- disableAllChecks = true // consider removal to avoid error prone error´s, following convention over configuration.
12+ disable( // not patchable
13+ ' FormatStringConcatenation' ,
14+ ' FunctionalInterfaceMethodChanged' ,
15+ ' JavaxInjectOnAbstractMethod' ,
16+ ' OverridesJavaxInjectableMethod' ,
17+ ' ReturnValueIgnored' ,
18+ ' Slf4jLogStatement' ,
19+ ' MissingSummary' ,
20+ // patchable
21+ ' LexicographicalAnnotationAttributeListing' ,
22+ ' LexicographicalAnnotationListing' ,
23+ ' NonStaticImport' ,
24+ ' Slf4jLoggerDeclaration' , // logger -> log
25+ ' StaticImport' ,
26+ // critical, finds lots of bugs... unused configs and stuff.
27+ ' Unused' ,
28+ ' UnusedMethod' ,
29+ ' UnusedParameters' ,
30+ ' UnusedVariable' ,
31+ )
2232 error(
33+ ' AmbiguousJsonCreator' ,
34+ ' AssertJNullnessAssertion' ,
35+ ' AutowiredConstructor' ,
36+ ' CanonicalAnnotationSyntax' ,
37+ ' CollectorMutability' ,
2338 ' ConstantNaming' ,
39+ ' DirectReturn' ,
40+ ' EmptyMethod' ,
41+ ' ExplicitArgumentEnumeration' ,
42+ ' ExplicitEnumOrdering' ,
43+ ' IdentityConversion' ,
44+ ' ImmutablesSortedSetComparator' ,
45+ ' IsInstanceLambdaUsage' ,
46+ ' MockitoMockClassReference' ,
47+ ' MockitoStubbing' ,
48+ ' NestedOptionals' ,
49+ ' PrimitiveComparison' ,
2450 ' RedundantStringConversion' ,
51+ ' RedundantStringEscape' ,
52+ ' SelfAssignment' ,
53+ ' StringJoin' ,
54+ ' StringJoining' ,
2555 )
56+ // fixme bug: this only happens when the file is dirty!
57+ // up2date checking (caching) must consider file changes, as file is currently corrupt!
58+ // fix SelfTest.java:L22 ForbidGradleInternal(import org.gradle.api.internal.project.ProjectInternal;)
59+ errorproneArgs. add(' -XepExcludedPaths:.*/SelfTest.java' )
2660 if (! getenv(). containsKey(' CI' ) && getenv(' IN_PLACE' )?. toBoolean()) {
2761 errorproneArgs. addAll(
2862 ' -XepPatchLocation:IN_PLACE' ,
2963 ' -XepPatchChecks:' +
64+ ' AmbiguousJsonCreator,' +
65+ ' ArrayEquals,' +
66+ ' AssertJNullnessAssertion,' +
67+ ' AutowiredConstructor,' +
68+ ' CanonicalAnnotationSyntax,' +
69+ ' CollectorMutability,' +
3070 ' ConstantNaming,' +
31- ' RedundantStringConversion,'
71+ ' DirectReturn,' +
72+ ' EmptyMethod,' +
73+ ' ExplicitArgumentEnumeration,' +
74+ ' ExplicitEnumOrdering,' +
75+ ' FormatStringConcatenation,' +
76+ ' IdentityConversion,' +
77+ ' ImmutablesSortedSetComparator,' +
78+ ' IsInstanceLambdaUsage,' +
79+ ' MockitoMockClassReference,' +
80+ ' MockitoStubbing,' +
81+ ' NestedOptionals,' +
82+ ' PrimitiveComparison,' +
83+ ' RedundantStringConversion,' +
84+ ' RedundantStringEscape,' +
85+ ' SelfAssignment,' +
86+ ' Slf4jLogStatement,' +
87+ ' StringJoin,' +
88+ ' StringJoining,' +
89+ ' TimeZoneUsage,'
3290 )
3391 }
3492 }
0 commit comments