Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Excavator: Upgrades Baseline to the latest version
  • Loading branch information
svc-excavator-bot committed Oct 18, 2018
commit 90c72384f1f7e315c60adaf8f426cf0efbf25d2a
6 changes: 2 additions & 4 deletions .baseline/checkstyle/checkstyle-suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@
<suppress files="[/\\]src[/\\].*[Tt]est[/\\](java|groovy)[/\\]" checks="VariableDeclarationUsageDistance" />
<suppress files="[/\\]src[/\\].*[Tt]est[/\\](java|groovy)[/\\]" checks="VisibilityModifier" />
<suppress files="[/\\]src[/\\].*[Tt]est[/\\](java|groovy)[/\\]" checks="AvoidStaticImport" />

<!-- Copied Guava classes. -->
<suppress files="[/\\]src[/\\].*(WrappingExecutorService.java)" checks="." />
<suppress files="[/\\]src[/\\].*(WrappingScheduledExecutorService.java)" checks="." />
<suppress files="[/\\]src[/\\].*[Tt]est[/\\](java|groovy)[/\\]" id="BanSystemOut" />
<suppress files="[/\\]src[/\\].*[Tt]est[/\\](java|groovy)[/\\]" id="BanSystemErr" />

<!-- JavadocStyle enforces existence of package-info.java package-level Javadoc; we consider this a bug. -->
<suppress files="package-info.java" checks="JavadocStyle" />
Expand Down
61 changes: 47 additions & 14 deletions .baseline/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@
<property name="file" value="${config_loc}/checkstyle-suppressions.xml"/>
</module>
<module name="SuppressWarningsFilter"/> <!-- baseline-gradle: README.md -->
<module name="SuppressionCommentFilter"/> <!-- baseline-gradle: README.md -->
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE.OFF\: ([\w\|]+)"/>
<property name="onCommentFormat" value="CHECKSTYLE.ON\: ([\w\|]+)"/>
<property name="checkFormat" value="$1"/>
</module>
<module name="TreeWalker">
<module name="SuppressionCommentFilter"/> <!-- baseline-gradle: README.md -->
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE.OFF\: ([\w\|]+)"/>
<property name="onCommentFormat" value="CHECKSTYLE.ON\: ([\w\|]+)"/>
<property name="checkFormat" value="$1"/>
</module>
<module name="AbbreviationAsWordInName"> <!-- Java Style Guide: Camel case : defined -->
<property name="ignoreFinal" value="false"/>
<property name="allowedAbbreviationLength" value="1"/>
Expand Down Expand Up @@ -105,7 +105,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="FileContentsHolder"/> <!-- Required for SuppressionCommentFilter -->
<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."/>
Expand All @@ -124,11 +123,17 @@
<message key="import.illegal" value="Use JUnit 4-style (org.junit.*) test classes and assertions instead of JUnit 3 (junit.framework.*)."/>
</module>
<module name="IllegalImport"> <!-- Java Coding Guidelines: Import the canonical package -->
<property name="illegalPkgs" value="org.elasticsearch.common.base, jersey.repackaged.com.google.common, com.google.api.client.repackaged, org.apache.hadoop.thirdparty.guava, com.clearspring.analytics.util, org.spark_project.guava"/>
<property name="illegalPkgs" value="org.elasticsearch.common.base, com.clearspring.analytics.util, org.spark_project.guava"/>
<message key="import.illegal" value="Must not import repackaged classes."/>
</module>
<module name="IllegalImport"> <!-- Java Coding Guidelines: Import the canonical package -->
<property name="illegalPkgs" value=".*\.(repackaged|shaded|thirdparty)"/>
<property name="regexp" value="true" />
<message key="import.illegal" value="Must not import repackaged classes."/>
</module>
<module name="IllegalImport">
<property name="illegalPkgs" value="^org\.gradle\..*internal"/>
<property name="illegalPkgs" value="^org\.gradle\.(internal|.*\.internal)"/>
<property name="regexp" value="true" />
<message key="import.illegal" value="Do not rely on gradle internal classes as these may change in minor releases - use org.gradle.api versions instead."/>
</module>
<module name="IllegalImport">
Expand All @@ -144,9 +149,14 @@
<message key="import.illegal" value="math is deprecated, use math3 instead."/>
</module>
<module name="IllegalImport">
<property name="id" value="BanLoggingImplementations"/>
<property name="illegalPkgs" value="org.apache.log4j, org.apache.logging.log4j, java.util.logging, ch.qos.logback"/>
<message key="import.illegal" value="Use SLF4J instead of a logging framework directly."/>
</module>
<module name="IllegalImport">
<property name="illegalClasses" value="com.google.common.base.Optional, com.google.common.base.Supplier"/>
<message key="import.illegal" value="Use the Java8 version of Guava objects."/>
</module>
<module name="IllegalInstantiation"> <!-- Java Coding Guidelines: Never instantiate primitive types -->
<property name="classes" value="java.lang.Boolean"/>
<property name="classes" value="java.lang.Byte"/>
Expand All @@ -165,19 +175,23 @@
<module name="IllegalType"> <!-- Java Coding Guide: Limit coupling on concrete classes -->
<property name="illegalClassNames" value="java.util.ArrayList, java.util.HashSet, java.util.HashMap, java.util.LinkedList, java.util.LinkedHashMap, java.util.LinkedHashSet, java.util.TreeSet, java.util.TreeMap, com.google.common.collect.ArrayListMultimap, com.google.common.collect.ForwardingListMultimap, com.google.common.collect.ForwardingMultimap, com.google.common.collect.ForwardingSetMultimap, com.google.common.collect.ForwardingSortedSetMultimap, com.google.common.collect.HashMultimap, com.google.common.collect.LinkedHashMultimap, com.google.common.collect.LinkedListMultimap, com.google.common.collect.TreeMultimap"/>
</module>
<module name="IllegalType">
<property name="id" value="BanGuavaCaches"/>
<property name="illegalClassNames" value="com.google.common.cache.CacheBuilder, com.google.common.cache.Cache, com.google.common.cache.LoadingCache"/>
<message key="illegal.type" value="Do not use Guava caches, they are outperformed by and harder to use than Caffeine caches"/>
</module>
<module name="ImportOrder"> <!-- Java Style Guide: Ordering and spacing -->
<property name="groups" value="/.*/"/>
<property name="option" value="top"/>
<property name="separated" value="true"/>
<property name="sortStaticImportsAlphabetically" value="true"/>
</module>
<module name="Indentation"> <!-- Java Style Guide: Block indentation: +4 spaces -->
<property name="arrayInitIndent" value="8"/>
<property name="lineWrappingIndentation" value="8"/>
</module>
<module name="InnerAssignment"/> <!-- Java Coding Guidelines: Inner assignments: Not used -->
<module name="LeftCurly"> <!-- Java Style Guide: Nonempty blocks: K & R style -->
<property name="maxLineLength" value="120"/>
</module>
<module name="LeftCurly"/> <!-- Java Style Guide: Nonempty blocks: K & R style -->
<module name="LineLength"> <!-- Java Style Guide: No line-wrapping -->
<property name="max" value="120"/>
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
Expand Down Expand Up @@ -265,6 +279,11 @@
<property name="format" value="CoreMatchers\.equalTo"/>
<property name="message" value="Use Assert.assertEquals()."/>
</module>
<module name="RegexpSinglelineJava">
<property name="id" value="BanJacksonFindAndRegisterModulesMethod"/>
<property name="format" value="findAndRegisterModules"/>
<property name="message" value="Use ObjectMapper#registerModule(&lt;yourModule&gt;) explicitly. ObjectMapper#findAndRegisterModules() is dangerous because it will change behaviour depending on which modules are on your classpath (including transitive dependencies)."/>
</module>
<module name="RegexpSinglelineJava"> <!-- Java Coding Guidelines: Use appropriate assertion methods -->
<property name="format" value="CoreMatchers\.notNull"/>
<property name="message" value="Use better assertion method(s): Assert.assertEquals(), assertNull(), assertSame(), etc."/>
Expand Down Expand Up @@ -315,6 +334,18 @@
<property name="message" value="printStackTrace is not generally allowed."/>
<property name="ignoreComments" value="true"/>
</module>
<module name="RegexpSinglelineJava">
<property name="id" value="BanSystemOut"/>
<property name="format" value="System\.out\."/>
<property name="message" value="Logging with System.out is not allowed because it has no metadata and can't be configured at runtime. Please use an SLF4J logger instead, e.g. log.info(&quot;Message&quot;)."/>
<property name="ignoreComments" value="true"/>
</module>
<module name="RegexpSinglelineJava">
<property name="id" value="BanSystemErr"/>
<property name="format" value="System\.err\."/>
<property name="message" value="Logging with System.err is not allowed because it has no metadata and can't be configured at runtime. Please use an SLF4J logger instead, e.g. log.info(&quot;Message&quot;)."/>
<property name="ignoreComments" value="true"/>
</module>
<module name="RegexpSinglelineJava">
<property name="format" value="\bCharsets\."/>
<property name="message" value="Use JDK StandardCharsets instead of alternatives."/>
Expand All @@ -333,7 +364,7 @@
</module>
<module name="RegexpSinglelineJava">
<property name="format" value="\/\/TODO|\/\/ TODO(?!\([^()\s]+\): )"/>
<property name="message" value="TODO format: // TODO(flastname): explanation"/>
<property name="message" value="TODO format: // TODO(#issue): explanation"/>
</module>
<module name="RegexpSinglelineJava">
<property name="format" value="(void setUp\(\))|(void setup\(\))|(void setupStatic\(\))|(void setUpStatic\(\))|(void beforeTest\(\))|(void teardown\(\))|(void tearDown\(\))|(void beforeStatic\(\))|(void afterStatic\(\))"/>
Expand Down Expand Up @@ -392,7 +423,9 @@
<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
</module>
<module name="CyclomaticComplexity"/> <!-- Java Coding Guidelines: Reduce Cyclomatic Complexity -->
<module name="DesignForExtension"/> <!-- Java Coding Guidelines: Design for extension -->
<module name="DesignForExtension"> <!-- Java Coding Guidelines: Design for extension -->
<property name="ignoredAnnotations" value="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"/>
<property name="allowMissingParamTags" value="true"/>
Expand Down
10 changes: 2 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,11 @@ buildscript {
}

dependencies {
classpath 'gradle.plugin.com.palantir:gradle-circle-style:1.1.2'
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.4'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.3'
classpath 'com.netflix.nebula:gradle-dependency-lock-plugin:4.9.5'
classpath 'com.netflix.nebula:nebula-dependency-recommender:6.0.0'
classpath 'com.netflix.nebula:nebula-publishing-plugin:5.1.5'
classpath 'com.palantir.baseline:gradle-baseline-java:0.24.0'
classpath 'com.palantir.configurationresolver:gradle-configuration-resolver-plugin:0.3.0'
classpath 'com.palantir.baseline:gradle-baseline-java:0.37.4'
}
}

Expand All @@ -39,22 +36,19 @@ plugins {

apply plugin: 'com.palantir.baseline-config' // provides baselineUpdateConfig task
apply plugin: 'com.palantir.baseline-idea'
apply plugin: 'com.palantir.circle.style'
apply plugin: 'com.palantir.baseline'

repositories {
maven { url "http://palantir.bintray.com/releases" }
}

dependencies {
baseline "com.palantir.baseline:gradle-baseline-java-config:0.24.0@zip"
}

allprojects {
version gitVersion()
group 'com.palantir.tracing'

apply plugin: 'com.palantir.configuration-resolver'
apply plugin: 'nebula.dependency-recommender'
dependencyRecommendations {
strategy OverrideTransitives
propertiesFile file: project.rootProject.file('versions.props')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,10 @@
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;

// CHECKSTYLE:OFF

import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.Logger;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.Appender;

// CHECKSTYLE:ON

import com.google.common.collect.ImmutableMap;
import com.palantir.tracing.api.Span;
import com.palantir.tracing.api.SpanType;
Expand Down