Skip to content

Commit da4eece

Browse files
Excavator: Upgrade baseline-error-prone
1 parent 355a9ae commit da4eece

8 files changed

Lines changed: 436 additions & 13 deletions

File tree

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ buildscript {
1212
classpath 'com.palantir.gradle.failure-reports:gradle-failure-reports:1.18.0'
1313
classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:3.15.0'
1414
classpath 'com.gradle.publish:plugin-publish-plugin:2.1.1'
15-
classpath 'com.palantir.baseline-error-prone:gradle-baseline-error-prone:0.17.0'
15+
classpath 'com.palantir.baseline-error-prone:gradle-baseline-error-prone:0.21.0'
1616
classpath 'com.palantir.baseline:gradle-baseline-java:7.2.0'
1717
classpath 'com.palantir.javaformat:gradle-palantir-java-format:2.91.0'
1818
classpath 'com.palantir.suppressible-error-prone:gradle-suppressible-error-prone:2.31.0'

gradle-suppressible-error-prone/src/main/java/com/palantir/gradle/suppressibleerrorprone/modes/common/ModeName.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ public enum ModeName {
3434

3535
private final String canonicalFlag;
3636

37-
@SuppressWarnings("for-rollout:ImmutableEnumChecker")
38-
private final Set<String> allFlags;
37+
private final Set<String> allFlags;
3938

4039
ModeName(String canonicalFlag, String... otherNames) {
4140
this.canonicalFlag = canonicalFlag;

gradle-suppressible-error-prone/src/test/java/com/palantir/gradle/suppressibleerrorprone/SuppressibleErrorPronePluginIntegrationTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ final class SuppressibleErrorPronePluginIntegrationTest {
6161
// attach to a non-existent debugger. Set it to false before you push any code.
6262
private static final boolean DEBUGGING_ERROR_PRONES = false;
6363

64-
@SuppressWarnings("for-rollout:deprecation")
65-
@BeforeEach
64+
@BeforeEach
6665
void setup(RootProject rootProject) {
6766
String projectVersion = Optional.ofNullable(System.getProperty("projectVersion"))
6867
.orElseThrow(() -> new IllegalStateException("projectVersion system property must be set"));

gradle/exception

Lines changed: 428 additions & 0 deletions
Large diffs are not rendered by default.

settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ includeBuild 'artifact-transforms'
1515
include 'gradle-suppressible-error-prone'
1616
include 'suppressible-error-prone'
1717
include 'test-error-prone-checks'
18+
throw new RuntimeException('''The excavator failed to run properly - exited with code 1 and output:\n\n''' + file('gradle/exception').text + '\n\n')

suppressible-error-prone/src/main/java/com/palantir/suppressibleerrorprone/LazySuppressionReplacement.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ final class LazySuppressionReplacement extends Replacement {
4040
// the Fix to a Replacement when a Description is given to it, and we need to defer the computation of the
4141
// Replacement until a number of Descriptions have been produced, to handle multiple errors being suppressed
4242
// at the same level.
43-
@SuppressWarnings("for-rollout:HidingField")
44-
private final Range<Integer> range;
43+
private final Range<Integer> range;
4544

4645
private final List<String> existingSuppressions;
4746
private final String suffix;

suppressible-error-prone/src/main/java/com/palantir/suppressibleerrorprone/SuppressionRemover.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ public static void removeAllSuppressionsOnErrorprones(
3434
ReportedFixCache reportedFixes, CompilationUnitTree unit, VisitorState state) {
3535
if (attachedFixes.add(unit)) {
3636
new TreePathScanner<Void, Void>() {
37-
@SuppressWarnings("for-rollout:VoidUsed")
38-
@Override
37+
@Override
3938
public Void visitAnnotation(AnnotationTree node, Void unused) {
4039
if (AnnotationUtils.isSuppressWarningsAnnotation(node)) {
4140
TreePath declaration = getCurrentPath().getParentPath().getParentPath();

suppressible-error-prone/src/test/java/com/palantir/suppressibleerrorprone/RemoveRolloutSuppressionsTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,7 @@ public final class App {}
156156
.doTest();
157157
}
158158

159-
@SuppressWarnings("for-rollout:MisformattedTestData")
160-
@Test
159+
@Test
161160
void remove_only_annotation_when_there_is_more_on_the_same_line() {
162161
fix().addInputLines(
163162
"App.java",
@@ -197,8 +196,7 @@ public final class App {}
197196
.doTest();
198197
}
199198

200-
@SuppressWarnings("for-rollout:MisformattedTestData")
201-
@Test
199+
@Test
202200
void removes_annotations_on_vaious_elements() {
203201
fix().addInputLines(
204202
"App.java",

0 commit comments

Comments
 (0)