Skip to content

Commit

Permalink
Excavator: Upgrades Baseline to the latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
svc-excavator-bot committed May 26, 2020
1 parent c6edd87 commit 51ce072
Show file tree
Hide file tree
Showing 39 changed files with 263 additions and 79 deletions.
9 changes: 0 additions & 9 deletions .baseline/checkstyle/checkstyle-suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,4 @@

<!-- Generated code should not be subjected to checkstyle. -->
<suppress files="[/\\].*[/\\]generated.*[/\\]" checks="." />

<!-- Docker Compose Rule modifications: -->
<suppress files=".*" checks="DesignForExtension" />
<suppress files=".*" checks="LineLength" />
<suppress files=".*" checks="AbbreviationAsWordInName" />
<suppress files=".*" checks="TypeName" />
<suppress files=".*" checks="AvoidStaticImport" />
<suppress files=".*" checks="OverloadMethodsDeclarationOrder" />
<suppress files=".*" checks="FinalClass" />
</suppressions>
32 changes: 11 additions & 21 deletions .baseline/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,6 @@
<module name="NewlineAtEndOfFile"> <!-- Java Style Guide: Line ending: LF -->
<property name="lineSeparator" value="lf"/>
</module>
<module name="RegexpHeader">
<property name="header" value="^/\*$\n^ \* \(c\) Copyright \d{4} Palantir Technologies Inc\. All rights reserved\.$"/>
<property name="fileExtensions" value=".java,.ts"/>
</module>
<module name="RegexpMultiline"> <!-- Development Practices: Writing good unit tests -->
<property name="fileExtensions" value="java"/>
<property name="format" value="@VisibleForTesting\s+(protected|public)"/>
<property name="message" value="@VisibleForTesting members should be package-private."/>
</module>
<module name="RegexpSingleline"> <!-- No reference needed as this is evident. -->
<property name="format" value="&lt;&lt;&lt;&lt;&lt;&lt;&lt;"/>
<property name="message" value="Found (&lt;&lt;&lt;&lt;&lt;&lt;&lt;), so it looks like you had a merge conflict that compiles. Please fix it."/>
Expand All @@ -53,6 +44,9 @@
<property name="optional" value="true"/>
</module>
<module name="SuppressWarningsFilter"/> <!-- baseline-gradle: README.md -->
<module name="BeforeExecutionExclusionFileFilter">
<property name="fileNamePattern" value="module\-info\.java$"/>
</module>
<module name="TreeWalker">
<module name="SuppressionCommentFilter"/> <!-- baseline-gradle: README.md -->
<module name="SuppressionCommentFilter">
Expand Down Expand Up @@ -84,11 +78,13 @@
<module name="AvoidStarImport"/> <!-- Java Style Guide: No wildcard imports -->
<module name="AvoidStaticImport"> <!-- Java Style Guide: No static imports -->
<property name="excludes" value="
com.google.common.base.Preconditions.*,
com.palantir.logsafe.Preconditions.*,
java.util.Collections.*,
java.util.stream.Collectors.*,
com.palantir.logsafe.Preconditions.*,
com.google.common.base.Preconditions.*,
org.apache.commons.lang3.Validate.*"/>
org.apache.commons.lang3.Validate.*,
org.assertj.core.api.Assertions.*,
org.mockito.Mockito.*"/>
</module>
<module name="ClassTypeParameterName"> <!-- Java Style Guide: Type variable names -->
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
Expand All @@ -110,7 +106,6 @@
<module name="EmptyStatement"/> <!-- Java Style Guide: One statement per line -->
<module name="EqualsHashCode"/>
<module name="FallThrough"/> <!-- Java Style Guide: Fall-through: commented -->
<module name="FinalClass"/> <!-- Java Coding Guidelines: Private constructors -->
<module name="GenericWhitespace"> <!-- Java Style Guide: Horizontal whitespace -->
<message key="ws.followed" value="GenericWhitespace ''{0}'' is followed by whitespace."/>
<message key="ws.preceded" value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
Expand Down Expand Up @@ -369,10 +364,6 @@
<property name="format" value="\bIOUtils\.toString\("/>
<property name="message" value="Prefer Guava''s [CharStreams,Files,Resources].toString to avoid charset/stream closing issues."/>
</module>
<module name="RegexpSinglelineJava">
<property name="format" value="static enum"/>
<property name="message" value="Redundant ''static'' modifier."/>
</module>
<module name="RegexpSinglelineJava">
<property name="format" value="\/\/TODO|\/\/ TODO(?!\([^()\s]+\): )"/>
<property name="message" value="TODO format: // TODO(#issue): explanation"/>
Expand Down Expand Up @@ -410,7 +401,6 @@
<message key="name.invalidPattern" value="Type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="TypecastParenPad"/> <!-- Java Style Guide: Horizontal whitespace -->
<module name="UnnecessaryParentheses"/>
<module name="UnusedImports"> <!-- Java Style Guide: No unused imports -->
<property name="processJavadoc" value="true"/>
</module>
Expand All @@ -422,6 +412,7 @@
<property name="allowEmptyMethods" value="true"/>
<property name="allowEmptyTypes" value="true"/>
<property name="allowEmptyLoops" value="true"/>
<property name="allowEmptyLambdas" value="true"/>
<property name="ignoreEnhancedForColon" value="false"/>
<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)"/>
<message key="ws.notPreceded" value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
Expand All @@ -435,7 +426,7 @@
</module>
<module name="CyclomaticComplexity"/> <!-- Java Coding Guidelines: Reduce Cyclomatic Complexity -->
<module name="DesignForExtension"> <!-- Java Coding Guidelines: Design for extension -->
<property name="ignoredAnnotations" value="Test, Before, BeforeEach, After, AfterEach, BeforeClass, BeforeAll, AfterClass, AfterAll"/>
<property name="ignoredAnnotations" value="ParameterizedTest, Test, Before, BeforeEach, After, AfterEach, BeforeClass, BeforeAll, AfterClass, AfterAll"/>
</module>
<module name="JavadocMethod"> <!-- Java Style Guide: Where Javadoc is used -->
<property name="scope" value="public"/>
Expand Down Expand Up @@ -468,10 +459,9 @@
<module name="NestedTryDepth"/> <!-- Java Coding Guide: Try/catch blocks: never nested -->
<module name="NonEmptyAtclauseDescription"/> <!-- Java Style Guide: At-clauses -->
<module name="ParameterName"> <!-- Java Style Guide: Parameter names -->
<property name="format" value="^[a-z][a-zA-Z0-9]+$"/>
<property name="format" value="^_?[a-z][a-zA-Z0-9]+$"/>
<message key="name.invalidPattern" value="Parameter name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="SingleLineJavadoc"/> <!-- Java Style Guide: General form -->
<module name="SummaryJavadocCheck"> <!-- Java Coding Guidelines: Javadoc -->
<property name="forbiddenSummaryFragments" value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
</module>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ org.eclipse.jdt.ui.ignorelowercasenames=true
org.eclipse.jdt.ui.importorder=;
org.eclipse.jdt.ui.javadoc=false
org.eclipse.jdt.ui.keywordthis=false
org.eclipse.jdt.ui.ondemandthreshold=99
org.eclipse.jdt.ui.ondemandthreshold=999
org.eclipse.jdt.ui.overrideannotation=true
org.eclipse.jdt.ui.staticondemandthreshold=99
org.eclipse.jdt.ui.staticondemandthreshold=999
org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment"/><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*\n * (c) Copyright ${year} Palantir Technologies Inc. All rights reserved.\n */\n\n${package_declaration}\n\n/**\n * \n */\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">throw new RuntimeException(${exception_var});</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false
Expand Down
9 changes: 5 additions & 4 deletions .baseline/idea/intellij-java-palantir-style.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<option name="BINARY_OPERATION_WRAP" value="1" />
<option name="BLANK_LINES_AFTER_CLASS_HEADER" value="1" />
<option name="CALL_PARAMETERS_WRAP" value="1" />
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
<option name="DOWHILE_BRACE_FORCE" value="3" />
<option name="EXTENDS_KEYWORD_WRAP" value="1" />
<option name="EXTENDS_LIST_WRAP" value="1" />
Expand All @@ -30,9 +30,10 @@
<package name="" static="false" withSubpackages="true" />
</value>
</option>
<option name="INSERT_INNER_CLASS_IMPORTS" value="true" />
<GroovyCodeStyleSettings>
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
<option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
<value />
</option>
Expand All @@ -55,7 +56,7 @@
<option name="KEEP_CONTROL_STATEMENT_IN_ONE_LINE" value="false" />
<option name="METHOD_CALL_CHAIN_WRAP" value="1" />
<option name="METHOD_PARAMETERS_WRAP" value="1" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
<option name="OPTIMIZE_IMPORTS_ON_THE_FLY" value="true" />
<option name="OTHER_INDENT_OPTIONS">
<value>
Expand Down
3 changes: 1 addition & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ buildscript {
classpath 'com.netflix.nebula:gradle-info-plugin:6.0.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5'
classpath 'com.netflix.nebula:nebula-publishing-plugin:16.0.0'
classpath 'com.palantir.baseline:gradle-baseline-java:0.62.1'
classpath 'com.palantir.baseline:gradle-baseline-java:3.14.1'
classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:1.16.0'
classpath 'com.palantir.gradle.gitversion:gradle-git-version:0.12.2'
classpath 'gradle.plugin.org.inferred:gradle-processors:3.3.0'
Expand All @@ -25,7 +25,6 @@ buildscript {

plugins {
id 'com.palantir.git-version' version '0.12.2'
id 'com.palantir.configuration-resolver' version '0.2.0'
}

apply plugin: 'com.palantir.baseline'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ public abstract class DockerComposeExtension extends DockerComposeManager
implements BeforeAllCallback, AfterAllCallback {

@Override
public void beforeAll(ExtensionContext unused) throws IOException, InterruptedException {
public void beforeAll(ExtensionContext _value) throws IOException, InterruptedException {
before();
}

@Override
public void afterAll(ExtensionContext unused) {
public void afterAll(ExtensionContext _value) {
after();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,22 +130,22 @@ private void runDockerComposeRule(DockerComposeManager dockerComposeManager) thr
private Optional<ClusterWaitEvent> isClusterWait(Event event) {
return event.accept(new Event.Visitor<Optional<ClusterWaitEvent>>() {
@Override
public Optional<ClusterWaitEvent> visitBuild(BuildEvent value) {
public Optional<ClusterWaitEvent> visitBuild(BuildEvent _value) {
return Optional.empty();
}

@Override
public Optional<ClusterWaitEvent> visitPull(PullEvent value) {
public Optional<ClusterWaitEvent> visitPull(PullEvent _value) {
return Optional.empty();
}

@Override
public Optional<ClusterWaitEvent> visitUp(UpEvent value) {
public Optional<ClusterWaitEvent> visitUp(UpEvent _value) {
return Optional.empty();
}

@Override
public Optional<ClusterWaitEvent> visitWaitForServices(WaitForServicesEvent value) {
public Optional<ClusterWaitEvent> visitWaitForServices(WaitForServicesEvent _value) {
return Optional.empty();
}

Expand All @@ -155,22 +155,22 @@ public Optional<ClusterWaitEvent> visitClusterWait(ClusterWaitEvent value) {
}

@Override
public Optional<ClusterWaitEvent> visitShutdownStop(ShutdownStopEvent value) {
public Optional<ClusterWaitEvent> visitShutdownStop(ShutdownStopEvent _value) {
return Optional.empty();
}

@Override
public Optional<ClusterWaitEvent> visitLogCollection(LogCollectionEvent value) {
public Optional<ClusterWaitEvent> visitLogCollection(LogCollectionEvent _value) {
return Optional.empty();
}

@Override
public Optional<ClusterWaitEvent> visitShutdown(ShutdownEvent value) {
public Optional<ClusterWaitEvent> visitShutdown(ShutdownEvent _value) {
return Optional.empty();
}

@Override
public Optional<ClusterWaitEvent> visitUnknown(String unknownType) {
public Optional<ClusterWaitEvent> visitUnknown(String _unknownType) {
return Optional.empty();
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@

package com.palantir.docker.compose;

import com.google.common.collect.Sets;
import com.palantir.docker.compose.connection.Cluster;
import com.palantir.docker.compose.connection.Container;
import com.palantir.docker.compose.connection.ContainerCache;
import java.io.IOException;
import java.util.List;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

final class RecordingCluster extends Cluster {
private final Cluster delegate;
private final Set<String> recordedContainerNames = Sets.newConcurrentHashSet();
private final Set<String> recordedContainerNames = ConcurrentHashMap.newKeySet();

RecordingCluster(Cluster delegate) {
this.delegate = delegate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
import java.util.function.Supplier;
import java.util.stream.Collectors;

public class DaemonEnvironmentValidator implements EnvironmentValidator {
public final class DaemonEnvironmentValidator implements EnvironmentValidator {

private static final Set<String> ILLEGAL_VARIABLES = ImmutableSet.of(DOCKER_TLS_VERIFY, DOCKER_HOST, DOCKER_CERT_PATH);
private static final Supplier<DaemonEnvironmentValidator> SUPPLIER = Suppliers.memoize(
() -> new DaemonEnvironmentValidator())::get;
() -> new DaemonEnvironmentValidator());

public static DaemonEnvironmentValidator instance() {
return SUPPLIER.get();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class DaemonHostIpResolver implements HostIpResolver {
public static final String LOCALHOST = "127.0.0.1";

@Override
public String resolveIp(String dockerHost) {
public String resolveIp(String _dockerHost) {
return LOCALHOST;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private static StreamEx<File> dirAndParents(File startDir) {
@Override
public Optional<File> get() {
Optional<File> toReturn = dir;
dir = dir.flatMap(directory -> Optional.ofNullable(directory.getParentFile()));
dir = dir.map(directory -> directory.getParentFile());
return toReturn;
}
}))
Expand Down
Loading

0 comments on commit 51ce072

Please sign in to comment.