Excavator: Upgrades Baseline to the latest version #301
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
excavator is a bot for automating changes across repositories.
Changes produced by the roomba/latest-baseline-oss check.
Release Notes
0.25.0
com.palantir.baseline-circleci
plugin (Excavator: Prefer AssertJ #307)0.25.1
0.26.0
com.palantir.baseline-circleci
transitively applies configuration-resolver plugin Excavator: Upgrades gradle wrapper to the latest version #3090.26.1
com.palantir.baseline-circleci
now always applies the configuration resolver plugin (Excavator: Migrate annotation processors to native gradle implementation #311)0.27.0
0.27.1
0.28.0
com.palantir.baseline-checkstyle
(Excavator: Upgrade buildscript dependencies #317)com.palantir.baseline-versions
plugin (Fix develop build #312)0.29.0-rc1
Improvements
checkstyle
to 8.12 Excavator: Upgrade buildscript dependencies #313UnnecessaryParenthesis
andSummaryJavadoc
that could have been missed beforecom.palantir.baseline-checkstyle
plugin to avoid order of application dependencies and properly detect java plugin application Excavator: Upgrade buildscript dependencies #313com.palantir.baseline
correctly appropriately applies plugins to root project and individual subprojects Excavator: Prefer AssertJ #322apply plugin: 'com.palantir.baseline'
0.29.0
Improvements
gradle-circle-style
has been merged into this repo. All usages ofgradle-circle-style
are now handled bycom.palantir.baseline-circleci
Excavator: Upgrade dependencies #319CIRCLE_REPORTS
environment variable if setCheckStyle-IDEA
so users are prompted to install it if it's not available Excavator: Upgrade dependencies #3250.29.1
Bugfixes
0.29.2
Bugfixes
0.29.3
0.29.4
Bugfixes
0.30.0
gradle-baseline-java-config
dependency in build.gradle files is now optional and can be safely removed (Excavator: Upgrade buildscript dependencies #340)0.31.0
shaded
,repackaged
andthirdparty
packages (Excavator: Upgrade dependencies #351)0.31.1
Fixes
0.32.0
gradle.plugin.org.inferred:gradle-processors:1.2.18
to avoid seeingerror: plug-in not found: ErrorProne
ObjectMapper#findAndRegisterModules
(Excavator: Validate gradle wrapper is authentic #357)0.32.1
Bugfixes
0.32.2
checkNoUnusedPin
task if current project is root + task fix (Excavator: Upgrade buildscript dependencies #359)0.32.3
[fix] don't fail critically for wildcard forcing versions outside of bom #371
0.33.0
./gradlew format
(Excavator: Validate gradle wrapper is authentic #339)0.34.0
Improvements
0.35.0
0.36.0
./gradlew checkVersionsProps --fix
automatically resolves problems in your versions.props (Excavator: Upgrade buildscript dependencies #413)0.36.1
[fix] Fix BaselineVersions regression introduced in 0.36.0 (#418)
0.37.0
Improvements
checkBomConflict
,checkNoUnusedPin
now support--fix
(Excavator: Upgrades Baseline to the latest version #422)0.37.1
Bugfixes
0.37.2
0.37.3
0.37.4
0.38.0
SafeArg.of("..", e.getMessage())
(Excavator: Upgrade dependencies #444)0.38.1
0.39.0
0.39.1
0.40.0
0.41.0
0.42.0
Runtime#addShutdownHook
. (Excavator: Upgrade dependencies #473)0.43.0
baseline-eclipse
plugin on Java projects (Excavator: Upgrade dependencies #484)0.44.0
Update dependencies
0.45.0
0.45.1
0.46.0
0.47.0
[improvement] Allow disabling
com.palantir.baseline-versions
(#514)0.48.0
.baseline/checkstyle/custom-suppressions.xml
(Excavator: Migrate publishing to gradle-external-publish-plugin #516)0.49.0
PreferSafeLoggingPreconditions
check to enforce guava Preconditions, Objects.requireNonNull, and commons-lang3 Validate calls with no parameters and constant strings use logsafe (Excavator: Ensure consistent gradle/publish-(jar|dist).gradle files #517)0.49.1
0.50.0
[feature] Warn against .parallel() calls on Java streams (#537)
[fix] Correct prioritisation of versions.props to match nebula logic (#533)
0.51.0
./gradlew idea
deletes redundant ipr files (Excavator: Upgrade buildscript dependencies #550)0.51.1
0.52.0
com.palantir.baseline-exact-dependencies
helps declare necessary and sufficient dependencies (Excavator: Upgrade buildscript dependencies #548)0.53.0
0.54.0
com.palantir.baseline-release-compatibility
plugin (Excavator: Upgrades Baseline to the latest version #582)0.55.0
[break] Enable running of unique class check on multiple configurations (#583)
0.55.1
[fix] checkImplicitDependencies shouldn't count ignored artifacts (#601)
0.55.2
[fix] BaselineReleaseCompatibility up-to-date checking of compile tasks (#605)
0.56.0
[feature] Add an errorprone rule GradleCacheableTaskAction that prevents passing a lambda to Task.doFirst or Task.doLast when implementing gradle plugins (#608)
0.57.0
Iterables.partition(List, int)
withLists.partition(List, int)
(Excavator: Test libraries using Java 17 #622)Lists
orCollections2
transfrom
overIterables.transform
(Excavator: Apply gradle-jdks to OSS projects #623)0.58.0
[improvement] make CheckClassUniquenessTask cacheable (#637)
[fix] Add Javac Settings to uncheck "Use compiler from module target JDK when possible" (#629)
[fix] class uniqueness rule must have a config (#638)
0.59.0
[improvement] Spotless to remove blank lines at start of methods (#641)
0.60.0
0.61.0
0.62.0
0.62.1
[fix] Revert "[improvement] Ensure Optional#orElse argument is not method invocation" (#659)
0.63.0
[improvement] Support auto-applying error-prone suggested fixes (#660)
0.64.0
0.64.1
0.65.0
[improvement] Error-prone check to help prevent logging AuthHeader and BearerToken (#654)
[fix] fix potential NPE when configuring testing (#669)
[fix] Fix refaster compilation to support version recommendations (#667)
0.66.0
[improvement] Ignore DesignForExtension for ParameterizedTest (#673)
0.66.1
1.0.0
1.1.0
1.1.1
-PerrorProneApply
.1.2.0
1.3.0
It's possible to restore caching by adding
com.palantir.baseline.restore-test-cache = true
to yourgradle.properties
.1.4.0
1.5.0
1.6.0
1.6.1
1.7.0
./gradlew format -Pcom.palantir.baseline-format.eclipse
.1.8.0
() -> {}
1.8.1
1.8.2
EnableRuleMigrationSupport
inJUnit5RuleUsage
errorprone-rule1.9.0
checkImplicitDependencies
task will no longer suggest a fix of the current project.1.10.0
execute
oversubmit
when the result is ignored1.10.1
1.11.0
InputStreamSlowMultibyteRead
error prone check at ERROR severity1.12.0
baseline-idea
plugin now generates configuration more closely aligned with Gradle defaults.UnusedMethod
andUnusedVariable
.stream.sorted().findFirst()
intostream.min(Comparator.naturalOrder())
DangerousStringInternUsage
: Disallow String.intern() invocations1.12.1
UnusedMethod
andUnusedVariable
which automaticall remove code with side effects.1.13.0
LogSafePreconditionsConstantMessage
Slf4jLogsafeArgs
in test codeDuration#getNanos
mistakes and bans URL in equals methods1.14.0
OptionalOrElseThrowThrows
to prevent throwing from orElseThrow1.15.0
1.16.0
1.17.0
TypeParameterUnusedInFormals
errorprone check is disabled when compiling on Java 13, to workaround an error-prone bug.1.17.1
1.17.2
1.18.0
dependencies are ignored due to false positives as these dependencies
will not appear as dependencies in the generated byte-code, but are in
fact necessary dependencies to compile a given module.
1.19.0
PreconditionsConstantMessage
on gradle plugins2.0.0
2.1.0
2.1.1
2.2.0
project
) as can interfere with publishing.2.2.1
2.2.2
runtimeClasspath
configuration by default.2.3.0
{}
in safelog exception messages2.4.0
StrictUnusedVariable
check will catch any unused arguments (e.g. AuthHeaders) to public methods. If you need to suppress this, rename your variable to have an underscore prefix (e.g.s/foo/_foo/
) or just run./gradlew classes -PerrorProneApply
to auto-fix2.4.1
module-info.class
when checking class uniqueness2.4.2
src/*/resources
directory anymore.2.4.3
2.5.0
2.6.0
PreferAssertj
to assist migration to AssertJ from legacy test frameworks. It may be necessary to add a dependency onorg.assertj:assertj-core
in modules which do not already depend on AssertJ. If there's a technical reason that AssertJ cannot be used,PreferAssertj
may be explicitly disabled to prevent future upgrades from attempting to re-run the migration.2.7.0
StrictUnusedVariable
now ignores variables prefixed with_
and the suggested fix will rename all unused parameters in public methods instead of removing them@RunWith(Suite.class)
that references JUnit5 classes, as this can cause tests to silently not run!2.8.0
2.8.1
2.9.0
_
prefixbaselineErrorProne { patchChecks += 'PreferAssertj' }
2.9.1
StrictUnusedVariable
correctly converts previously suppressed variablesunused
to_
2.9.2
StrictUnusedVariable
will preserve side effects2.10.0
checkJUnitDependencies
task detects misconfigured JUnit dependencies which could result in some tests silently not running.2.10.1
2.11.0
2.11.1
2.11.2
assertThat
imports2.12.0
UnusedVariable
error prone rule by default2.13.0
@TestTemplate
annotation is now used to detect whether a class is test code.2.14.0
2.15.0
No documented user facing changes
2.16.0
isEqualTo
checks intohasValue
checks2.17.0
2.18.0
2.19.0
2.20.0
UnnecessaryParentheses
by defaultThrowError
to discourage throwing Errors in production codeErrors are often handled poorly by libraries resulting in unexpected
behavior and resource leaks. It's not obvious that 'catch (Exception e)'
does not catch Error.
This check is intended to be advisory - it's fine to
@SuppressWarnings("ThrowError")
in certain cases, but is usually notrecommended unless you are writing a testing library that throws
AssertionError.
Slf4jLevelCheck
to validate that slf4j level checks agree with contained logging.2.20.1
2.21.0
2.22.0
Automated release, no documented user facing changes
2.23.0
Calling address.getHostName may result in a DNS lookup which is a network request,
making the invocation significantly more expensive than expected depending on the
environment.
This check is intended to be advisory - it's fine to
@SuppressWarnings("ReverseDnsLookup") in certain cases, but is usually not
recommended.
2.24.0
verifyZeroInteractions
now gets rewritten toverifyNoMoreInteractions
, which has the same behaviour.com.palantir.safe-logging:preconditions
).2.25.0
com.palantir-java-format
which is also used to determine the version used by IntelliJ.2.26.0
./gradlew formatDiff
to reformat the relevant sections of any uncommitted changed Java files (relies ongit diff -U0 HEAD
under the hood)2.27.0
DangerousParallelStreamUsage
checks forCollection.parallelStream()
andStreamSupport
utility methods with parallel=true.Throwables must be logged without an Arg wrapper as the last parameter, otherwise unsafe data may be leaked from the unsafe message or the unsafe message of a cause.
2.28.0
FinalClass
error prone check, replacing the checkstyle implementation2.28.1
RedundantModifier
interpretation of implicit modifiers2.28.2
2.28.3
The most common issue this fixes is failures on
SafeArg.of("name", null)
assuming that the null literal value parameter may be a throwable.
2.29.0
StrictCollectionIncompatibleType
to guard collection usageThese checks don't imply bugs, and automation will fix failing cases automatically, so it's not necessary to block compilation.
FinalClass moved to warning rather than suggestion because there are a few edge cases (e.g. dependent projects using mockito without inline mock maker) where releases can run into issues if the bots don't fix findings in time.
2.30.0
InvocationTargetException
, otherwise anUndeclaredThrowableException
will be throwneach time the delegate throws an exception.
2.31.0
2.32.0
assert
statements in test code.Tests should use more specific AssertJ checks, which cannot be disabled by turning off asserts. Arguably the
assert
keyword should never be used, preferring preconditions. This way production environments cannot reach code paths that are impossible to test.2.33.0
Slf4jThrowable
check to ensure throwable args are logged last2.34.0
JooqResultStreamLeak
, which ensures that result streams and cursors returned from jOOQ results are closed in a try-with-resources block.2.35.0
2.35.1
The refaster rule breaks the common pattern:
Suppliers.memoize(supplier::get)
.2.35.2
2.36.0
StreamEmpty
with error proneStreamOfEmpty
to allow refactors to retain type arguments.2.37.0
AssertjPrimitiveComparison
for primitive comparisonsPrefer using AssertJ fluent comparisons over logic in an assertThat
statement for better failure output. assertThat(a == b).isTrue()
failures report 'expected true' where assertThat(a).isEqualTo(b)
provides the expected and actual values.
2.38.0
> 40% speedup when run against Google's codebase with errors enabled.
2.39.0
mockito-errorprone
to get Mockito error-prone checks.2.40.0
CatchSpecificity
andThrowSpecificity
to avoid unnecessarily broad throwables.Prefer more specific catch types than Exception and Throwable.
When methods are updated to throw new checked exceptions they expect
callers to handle failure types explicitly. Catching broad types defeats
the type system. By catching the most specific types possible we
leverage existing compiler functionality to detect unreachable code.
SafeArg.of
(when it's a last argument) are no longer unexpectedly split onto the next line.2.40.1
PreferJavaTimeOverload
error-prone check is turned off as it produces noisy false positives relating to custom AssertJ utilities.2.40.2
2.41.0
No documented user facing changes
2.42.0
NonComparableStreamSort
to validate that stream types implement comparable, as opposed to validating that casting to comparable does not cause a compiler error.This commit reduces the severity to WARNING because it's
possible that the check will flag code that happens to work
today, but we strongly recommend against sorting streams of
a type that is not directly comparable without a custom
comparator because it is likely to break later due to lack
of enforcement by the type system.
not enabled by default by providing a comma delimited list of check
names to the
-PerrorProneApply
option.2.43.0
Automated release, no documented user facing changes
2.44.0
can result in subtle resource leaks. Prefer replacing existing gauge
values using
registerWithReplacement
.This check doesn't apply unless a new enough version of Tritium
is available on the compilation classpath.
2.44.1
2.45.0
diff<br>- if (condition) statement;<br>+ if (condition) {<br>+ statement;<br>+ }<br>
2.45.1
baseline-idea
plugin now correctly marks test resources as test resources in IntelliJ.2.46.0
2.47.0
com.palantir.baseline-class-uniqueness
plugin now records conflicts in abaseline-class-uniqueness.lock
file. This should be checked-in to git and makes it easier to incrementally improve projects, rather than requiring a big-bang migration.2.48.0
2.48.1
./gradlew --write-locks
will now update the baseline-class-uniqueness.lock file.2.48.2
2.48.3
2.49.0
2.49.1
LoggerEnclosingClass
edge cases for type parameters and anonymous classesTo enable or disable this check, please contact the maintainers of Excavator.