Skip to content

Commit a20ff8b

Browse files
Excavator: Upgrades Baseline to the latest version
1 parent 3d5b9a6 commit a20ff8b

File tree

5 files changed

+16
-15
lines changed

5 files changed

+16
-15
lines changed

.baseline/checkstyle/checkstyle.xml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,13 @@
8484
<module name="AvoidStarImport"/> <!-- Java Style Guide: No wildcard imports -->
8585
<module name="AvoidStaticImport"> <!-- Java Style Guide: No static imports -->
8686
<property name="excludes" value="
87+
com.google.common.base.Preconditions.*,
88+
com.palantir.logsafe.Preconditions.*,
8789
java.util.Collections.*,
8890
java.util.stream.Collectors.*,
89-
com.palantir.logsafe.Preconditions.*,
90-
com.google.common.base.Preconditions.*,
91-
org.apache.commons.lang3.Validate.*"/>
91+
org.apache.commons.lang3.Validate.*,
92+
org.assertj.core.api.Assertions.*,
93+
org.mockito.Mockito.*"/>
9294
</module>
9395
<module name="ClassTypeParameterName"> <!-- Java Style Guide: Type variable names -->
9496
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
@@ -422,6 +424,7 @@
422424
<property name="allowEmptyMethods" value="true"/>
423425
<property name="allowEmptyTypes" value="true"/>
424426
<property name="allowEmptyLoops" value="true"/>
427+
<property name="allowEmptyLambdas" value="true"/>
425428
<property name="ignoreEnhancedForColon" value="false"/>
426429
<message key="ws.notFollowed" value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
427430
<message key="ws.notPreceded" value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
@@ -435,7 +438,7 @@
435438
</module>
436439
<module name="CyclomaticComplexity"/> <!-- Java Coding Guidelines: Reduce Cyclomatic Complexity -->
437440
<module name="DesignForExtension"> <!-- Java Coding Guidelines: Design for extension -->
438-
<property name="ignoredAnnotations" value="Test, Before, BeforeEach, After, AfterEach, BeforeClass, BeforeAll, AfterClass, AfterAll"/>
441+
<property name="ignoredAnnotations" value="ParameterizedTest, Test, Before, BeforeEach, After, AfterEach, BeforeClass, BeforeAll, AfterClass, AfterAll"/>
439442
</module>
440443
<module name="JavadocMethod"> <!-- Java Style Guide: Where Javadoc is used -->
441444
<property name="scope" value="public"/>
@@ -468,7 +471,7 @@
468471
<module name="NestedTryDepth"/> <!-- Java Coding Guide: Try/catch blocks: never nested -->
469472
<module name="NonEmptyAtclauseDescription"/> <!-- Java Style Guide: At-clauses -->
470473
<module name="ParameterName"> <!-- Java Style Guide: Parameter names -->
471-
<property name="format" value="^[a-z][a-zA-Z0-9]+$"/>
474+
<property name="format" value="^_?[a-z][a-zA-Z0-9]+$"/>
472475
<message key="name.invalidPattern" value="Parameter name ''{0}'' must match pattern ''{1}''."/>
473476
</module>
474477
<module name="SingleLineJavadoc"/> <!-- Java Style Guide: General form -->

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ buildscript {
2828
classpath 'com.netflix.nebula:gradle-info-plugin:5.1.1'
2929
classpath 'com.netflix.nebula:nebula-publishing-plugin:14.0.0'
3030
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
31-
classpath 'com.palantir.baseline:gradle-baseline-java:0.65.0'
31+
classpath 'com.palantir.baseline:gradle-baseline-java:2.18.0'
3232
classpath 'com.palantir.gradle.conjure:gradle-conjure:4.13.3'
3333
classpath 'com.palantir.gradle.gitversion:gradle-git-version:0.12.2'
3434
classpath 'gradle.plugin.org.inferred:gradle-processors:3.1.0'

conjure-python-core/src/main/java/com/palantir/conjure/python/PythonAliasTopologicalSorter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ static class AliasEdgeVisitor implements Type.Visitor<List<AliasSnippet>> {
9090
}
9191

9292
@Override
93-
public List<AliasSnippet> visitPrimitive(PrimitiveType value) {
93+
public List<AliasSnippet> visitPrimitive(PrimitiveType _value) {
9494
return Collections.emptyList();
9595
}
9696

@@ -126,7 +126,7 @@ public List<AliasSnippet> visitReference(TypeName value) {
126126
}
127127

128128
@Override
129-
public List<AliasSnippet> visitExternal(ExternalReference value) {
129+
public List<AliasSnippet> visitExternal(ExternalReference _value) {
130130
return Collections.emptyList();
131131
}
132132

conjure-python-core/src/test/java/com/palantir/conjure/python/ConjureSubfolderRunner.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package com.palantir.conjure.python;
1818

19+
import com.palantir.logsafe.exceptions.SafeRuntimeException;
1920
import java.io.File;
2021
import java.lang.annotation.ElementType;
2122
import java.lang.annotation.Retention;
@@ -111,15 +112,15 @@ private Object createTestClassInstance()
111112

112113
private ParentFolder getParentFolder(ParentFolder annotation) {
113114
if (annotation == null) {
114-
throw new RuntimeException("The class must be annotated with @ParentFolder");
115+
throw new SafeRuntimeException("The class must be annotated with @ParentFolder");
115116
}
116117

117118
return annotation;
118119
}
119120

120121
private FrameworkMethod validateMethod(List<FrameworkMethod> annotated) {
121122
if (annotated.size() != 1) {
122-
throw new RuntimeException("There must be exactly one @ConjureSubfolderRunner.Test method");
123+
throw new SafeRuntimeException("There must be exactly one @ConjureSubfolderRunner.Test method");
123124
}
124125

125126
FrameworkMethod method = annotated.get(0);
@@ -149,7 +150,7 @@ private Optional<RunnerScheduler> maybeParallelScheduler(ParentFolder annotation
149150
@Override
150151
@SuppressWarnings("FutureReturnValueIgnored")
151152
public void schedule(Runnable childStatement) {
152-
executor.submit(childStatement);
153+
executor.execute(childStatement);
153154
}
154155

155156
@Override

conjure-python/src/main/java/com/palantir/conjure/python/cli/ConjurePythonCli.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import java.io.File;
3030
import java.io.IOException;
3131
import java.nio.file.Paths;
32-
import java.util.List;
3332
import java.util.Optional;
3433
import picocli.CommandLine;
3534

@@ -89,9 +88,7 @@ public static final class GenerateCommand implements Runnable {
8988
description = "Generate a `conda_recipe/meta.yaml`")
9089
private boolean writeCondaRecipe;
9190

92-
@CommandLine.Unmatched
93-
@SuppressWarnings("UnusedVariable")
94-
private List<String> unmatchedOptions;
91+
9592

9693
@Override
9794
public void run() {

0 commit comments

Comments
 (0)