1- import static java.lang.System.getenv
2-
31apply plugin : ' net.ltgt.errorprone'
42
53dependencies {
@@ -9,25 +7,10 @@ dependencies {
97
108tasks. withType(JavaCompile ). configureEach {
119 options. errorprone {
12- disable( // not patchable
13- ' FormatStringConcatenation' ,
10+ disable( // consider fix, or reasoning.
1411 ' FunctionalInterfaceMethodChanged' ,
1512 ' JavaxInjectOnAbstractMethod' ,
1613 ' 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' ,
3114 )
3215 error(
3316 ' AmbiguousJsonCreator' ,
@@ -49,45 +32,19 @@ tasks.withType(JavaCompile).configureEach {
4932 ' PrimitiveComparison' ,
5033 ' RedundantStringConversion' ,
5134 ' RedundantStringEscape' ,
35+ ' ReturnValueIgnored' ,
5236 ' SelfAssignment' ,
5337 ' StringJoin' ,
5438 ' StringJoining' ,
39+ ' UnnecessarilyFullyQualified' ,
40+ ' UnnecessaryLambda' ,
41+ )
42+ // bug: this only happens when the file is dirty.
43+ // might be an up2date (caching) issue, as file is currently in corrupt state.
44+ // ForbidGradleInternal(import org.gradle.api.internal.project.ProjectInternal;)
45+ errorproneArgs. add(' -XepExcludedPaths:' +
46+ ' .*/SelfTest.java|' +
47+ ' .*/GradleIntegrationHarness.java'
5548 )
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' )
60- if (! getenv(). containsKey(' CI' ) && getenv(' IN_PLACE' )?. toBoolean()) {
61- errorproneArgs. addAll(
62- ' -XepPatchLocation:IN_PLACE' ,
63- ' -XepPatchChecks:' +
64- ' AmbiguousJsonCreator,' +
65- ' ArrayEquals,' +
66- ' AssertJNullnessAssertion,' +
67- ' AutowiredConstructor,' +
68- ' CanonicalAnnotationSyntax,' +
69- ' CollectorMutability,' +
70- ' ConstantNaming,' +
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,'
90- )
91- }
9249 }
9350}
0 commit comments