Skip to content

Commit 15f5953

Browse files
Excavator: Upgrades Baseline to the latest version
1 parent 0e90f3e commit 15f5953

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
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
@@ -10,7 +10,7 @@ buildscript {
1010
dependencies {
1111
classpath 'com.netflix.nebula:gradle-info-plugin:5.1.1'
1212
classpath 'com.netflix.nebula:nebula-publishing-plugin:14.0.0'
13-
classpath 'com.palantir.baseline:gradle-baseline-java:0.65.0'
13+
classpath 'com.palantir.baseline:gradle-baseline-java:2.18.0'
1414
classpath 'com.palantir.gradle.conjure:gradle-conjure:4.2.0'
1515
classpath 'com.palantir.gradle.gitversion:gradle-git-version:0.7.1'
1616
classpath 'com.palantir.launchconfig:gradle-launch-config-plugin:1.2.0'

recipe-example-server/src/main/java/com/palantir/conjure/examples/resources/RecipeBookResource.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package com.palantir.conjure.examples.resources;
1818

19-
import com.google.common.base.Preconditions;
2019
import com.palantir.conjure.examples.recipe.api.Recipe;
2120
import com.palantir.conjure.examples.recipe.api.RecipeBookService;
2221
import com.palantir.conjure.examples.recipe.api.RecipeErrors;
@@ -38,7 +37,7 @@ public RecipeBookResource(Set<Recipe> recipes) {
3837

3938
@Override
4039
public Recipe getRecipe(RecipeName name) {
41-
Preconditions.checkNotNull(name, "Recipe name must be provided.");
40+
com.palantir.logsafe.Preconditions.checkNotNull(name, "Recipe name must be provided.");
4241
checkIfRecipeExists(name);
4342

4443
return recipes.get(name);

0 commit comments

Comments
 (0)