|
1 | | -import static java.lang.System.getenv |
2 | | - |
3 | 1 | apply plugin: 'net.ltgt.errorprone' |
4 | 2 |
|
5 | 3 | dependencies { |
6 | 4 | errorprone('com.google.errorprone:error_prone_core:2.42.0') |
7 | | - 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 | | - } |
| 5 | + errorprone('tech.picnic.error-prone-support:error-prone-contrib:0.26.0') |
17 | 6 | } |
18 | 7 |
|
19 | 8 | tasks.withType(JavaCompile).configureEach { |
20 | 9 | options.errorprone { |
21 | | - disableAllChecks = true // consider removal to avoid error prone error´s, following convention over configuration. |
22 | | - error('RedundantStringConversion') |
23 | | - if (!getenv().containsKey('CI') && getenv('IN_PLACE')?.toBoolean()) { |
24 | | - errorproneArgs.addAll( |
25 | | - '-XepPatchLocation:IN_PLACE', |
26 | | - '-XepPatchChecks:RedundantStringConversion' |
27 | | - ) |
28 | | - } |
| 10 | + disable( // consider fix, or reasoning. |
| 11 | + 'FunctionalInterfaceMethodChanged', |
| 12 | + 'JavaxInjectOnAbstractMethod', |
| 13 | + 'OverridesJavaxInjectableMethod', |
| 14 | + ) |
| 15 | + error( |
| 16 | + 'AmbiguousJsonCreator', |
| 17 | + 'AssertJNullnessAssertion', |
| 18 | + 'AutowiredConstructor', |
| 19 | + 'CanonicalAnnotationSyntax', |
| 20 | + 'CollectorMutability', |
| 21 | + 'ConstantNaming', |
| 22 | + 'DirectReturn', |
| 23 | + 'EmptyMethod', |
| 24 | + 'ExplicitArgumentEnumeration', |
| 25 | + 'ExplicitEnumOrdering', |
| 26 | + 'IdentityConversion', |
| 27 | + 'ImmutablesSortedSetComparator', |
| 28 | + 'IsInstanceLambdaUsage', |
| 29 | + 'MockitoMockClassReference', |
| 30 | + 'MockitoStubbing', |
| 31 | + 'NestedOptionals', |
| 32 | + 'PrimitiveComparison', |
| 33 | + 'RedundantStringConversion', |
| 34 | + 'RedundantStringEscape', |
| 35 | + 'ReturnValueIgnored', |
| 36 | + 'SelfAssignment', |
| 37 | + 'StringJoin', |
| 38 | + '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' |
| 48 | + ) |
29 | 49 | } |
30 | 50 | } |
0 commit comments