Skip to content

Commit baaa5f2

Browse files
committed
Merge branch 'main' into forbidModuleImports
2 parents e4cfda5 + d9e837a commit baaa5f2

File tree

111 files changed

+785
-1309
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+785
-1309
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,25 @@ jobs:
9797
cd ..
9898
./gradlew testIdea
9999
- name: junit result
100-
uses: mikepenz/action-junit-report@v5
100+
uses: mikepenz/action-junit-report@v6
101101
if: always() # always run even if the previous step fails
102102
with:
103103
check_name: JUnit ${{ matrix.kind }} ${{ matrix.jre }} ${{ matrix.os }}
104104
report_paths: '*/build/test-results/*/TEST-*.xml'
105105
check_retries: true
106+
107+
# Status check that is required in branch protection rules.
108+
final-status:
109+
needs:
110+
- build
111+
runs-on: ubuntu-latest
112+
if: always()
113+
steps:
114+
- name: Check
115+
run: |
116+
results=$(tr -d '\n' <<< '${{ toJSON(needs.*.result) }}')
117+
if ! grep -q -v -E '(failure|cancelled)' <<< "$results"; then
118+
echo "One or more required jobs failed"
119+
exit 1
120+
fi
121+
echo "All required jobs completed successfully."

CHANGES.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,19 @@ This document is intended for Spotless developers.
1010
We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `1.27.0`).
1111

1212
## [Unreleased]
13+
### Changes
14+
* Bump default `ktfmt` version to latest `0.58` -> `0.59`. ([#2681](https://github.com/diffplug/spotless/pull/2681)
15+
* Use Task Providers for task initialization. [#2719](https://github.com/diffplug/spotless/pull/2719)
16+
* **BREAKING** Bump minimum supported Gradle version from 7.3 to 8.1. [#2719](https://github.com/diffplug/spotless/pull/2719)
17+
* Bump default `jackson` version to latest `2.20.0` -> `2.20.1`. ([#2730](https://github.com/diffplug/spotless/pull/2730))
18+
* Bump default `cleanthat` version to latest `2.23` -> `2.24`. ([#2620](https://github.com/diffplug/spotless/pull/2620))
1319
### Fixed
14-
- palantirJavaFormat is no longer arbitrarily set to outdated versions on Java 17, latest available version is always used ([#2686](https://github.com/diffplug/spotless/pull/2686) fixes [#2685](https://github.com/diffplug/spotless/issues/2685))
20+
* palantirJavaFormat is no longer arbitrarily set to outdated versions on Java 17, latest available version is always used ([#2686](https://github.com/diffplug/spotless/pull/2686) fixes [#2685](https://github.com/diffplug/spotless/issues/2685))
1521
### Added
16-
- Add a `forbidModuleImports` API for java ([#2679](https://github.com/diffplug/spotless/issues/2679))
22+
* Add a `forbidModuleImports` API for java ([#2679](https://github.com/diffplug/spotless/issues/2679))
23+
* new options to customize Flexmark, e.g. to allow YAML front matter ([#2616](https://github.com/diffplug/spotless/issues/2616))
24+
### Removed
25+
* **BREAKING** Drop support for older Ktlint versions. ([#2711](https://github.com/diffplug/spotless/pull/2711))
1726

1827
## [4.0.0] - 2025-09-24
1928
### Changes

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ Once someone has filled in one square of the formatter/build system matrix, it's
197197
- Thanks to [Matthias Balke](https://github.com/matthiasbalke) for [adding support for Antlr](https://github.com/diffplug/spotless/pull/328).
198198
- Thanks to [Matthias Andreas Benkard](https://github.com/benkard) for adding support for google-java-format 1.8+ ([#563](https://github.com/diffplug/spotless/pull/563))
199199
- Thanks to [Thomas Broyer](https://github.com/tbroyer) for adding support for google-java-format's [skip-reflowing-long-strings option](https://github.com/diffplug/spotless/pull/929).
200-
- Thanks to [Ranadeep Polavarapu](https://github.com/RanadeepPolavarapu) for adding support for ktfmt ([#569](https://github.com/diffplug/spotless/pull/569))
201200
- Thanks to [Hakanai](https://github.com/hakanai) for adding [wildcards last support to the import sorter](https://github.com/diffplug/spotless/pull/956).
202201
- Thanks to [Kevin Brooks](https://github.com/k-brooks) for [updating all eclipse-based formatters to 4.13](https://github.com/diffplug/spotless/pull/482) and [fixing Groovy for multiproject](https://github.com/diffplug/spotless/issues/877).
203202
- Thanks to [Dylan Baroody](https://github.com/dylanbaroody) for fixing [sql formatting support for JDBI bind list params](https://github.com/diffplug/spotless/pull/955).

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ spotless {
3131
}
3232

3333
dependencies {
34-
rewrite(platform('org.openrewrite.recipe:rewrite-recipe-bom:3.16.0'))
34+
rewrite(platform('org.openrewrite.recipe:rewrite-recipe-bom:3.18.0'))
3535
rewrite('org.openrewrite.recipe:rewrite-migrate-java:3.19.0')
3636
rewrite('org.openrewrite.recipe:rewrite-java-security:3.19.2')
3737
rewrite('org.openrewrite.recipe:rewrite-rewrite:0.14.0')
3838
rewrite('org.openrewrite.recipe:rewrite-static-analysis:2.19.0')
39-
rewrite('org.openrewrite.recipe:rewrite-third-party:0.29.0')
39+
rewrite('org.openrewrite.recipe:rewrite-third-party:0.31.1')
4040
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ VER_SLF4J=[1.6,2.0[
3030
# Used in multiple places
3131
VER_DURIAN=1.2.0
3232
VER_JGIT=7.4.0.202509020913-r
33-
VER_JUNIT=5.14.0
33+
VER_JUNIT=5.14.1
3434
VER_ASSERTJ=3.27.6
3535
VER_MOCKITO=5.20.0
3636
VER_SELFIE=2.5.4

gradle/error-prone.gradle

Lines changed: 40 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,50 @@
1-
import static java.lang.System.getenv
2-
31
apply plugin: 'net.ltgt.errorprone'
42

53
dependencies {
64
errorprone('com.google.errorprone:error_prone_core:2.42.0')
7-
errorprone('tech.picnic.error-prone-support:error-prone-contrib:0.25.0')
8-
constraints {
9-
errorprone('com.google.guava:guava') {
10-
version {
11-
require('33.4.8-jre')
12-
}
13-
because('Older versions use deprecated methods in sun.misc.Unsafe')
14-
// https://github.com/junit-team/junit-framework/pull/5039#discussion_r2414490581
15-
}
16-
}
5+
errorprone('tech.picnic.error-prone-support:error-prone-contrib:0.26.0')
176
}
187

198
tasks.withType(JavaCompile).configureEach {
209
options.errorprone {
21-
disableAllChecks = true // consider removal to avoid error prone error´s, following convention over configuration.
22-
error('RedundantStringConversion')
23-
if (!getenv().containsKey('CI') && getenv('IN_PLACE')?.toBoolean()) {
24-
errorproneArgs.addAll(
25-
'-XepPatchLocation:IN_PLACE',
26-
'-XepPatchChecks:RedundantStringConversion'
27-
)
28-
}
10+
disable( // consider fix, or reasoning.
11+
'FunctionalInterfaceMethodChanged',
12+
'JavaxInjectOnAbstractMethod',
13+
'OverridesJavaxInjectableMethod',
14+
)
15+
error(
16+
'AmbiguousJsonCreator',
17+
'AssertJNullnessAssertion',
18+
'AutowiredConstructor',
19+
'CanonicalAnnotationSyntax',
20+
'CollectorMutability',
21+
'ConstantNaming',
22+
'DirectReturn',
23+
'EmptyMethod',
24+
'ExplicitArgumentEnumeration',
25+
'ExplicitEnumOrdering',
26+
'IdentityConversion',
27+
'ImmutablesSortedSetComparator',
28+
'IsInstanceLambdaUsage',
29+
'MockitoMockClassReference',
30+
'MockitoStubbing',
31+
'NestedOptionals',
32+
'PrimitiveComparison',
33+
'RedundantStringConversion',
34+
'RedundantStringEscape',
35+
'ReturnValueIgnored',
36+
'SelfAssignment',
37+
'StringJoin',
38+
'StringJoining',
39+
'UnnecessarilyFullyQualified',
40+
'UnnecessaryLambda',
41+
)
42+
// bug: this only happens when the file is dirty.
43+
// might be an up2date (caching) issue, as file is currently in corrupt state.
44+
// ForbidGradleInternal(import org.gradle.api.internal.project.ProjectInternal;)
45+
errorproneArgs.add('-XepExcludedPaths:' +
46+
'.*/SelfTest.java|' +
47+
'.*/GradleIntegrationHarness.java'
48+
)
2949
}
3050
}

gradle/rewrite.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ apply plugin: 'org.openrewrite.rewrite'
22

33
rewrite {
44
activeRecipe('com.diffplug.spotless.openrewrite.SanityCheck')
5-
activeStyle('com.diffplug.spotless.openrewrite.SpotlessFormat')
65
exclusions.addAll(
76
'**.dirty.java',
87
'**FormatterProperties.java',

gradle/wrapper/gradle-wrapper.jar

176 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

lib-extra/build.gradle

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,8 @@ spotless {
3838

3939
apply from: rootProject.file('gradle/special-tests.gradle')
4040
tasks.withType(Test).configureEach {
41-
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_16)) {
42-
// needed for EclipseCdtFormatterStepTest
43-
jvmArgs '--add-opens=java.base/java.lang=ALL-UNNAMED'
44-
}
41+
// needed for EclipseCdtFormatterStepTest
42+
jvmArgs '--add-opens=java.base/java.lang=ALL-UNNAMED'
4543
}
4644

4745
def NEEDS_P2_DEPS = [
@@ -50,9 +48,6 @@ def NEEDS_P2_DEPS = [
5048
'groovy',
5149
'jdt'
5250
]
53-
if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) {
54-
NEEDS_P2_DEPS.remove('cdt')
55-
}
5651
for (needsP2 in NEEDS_P2_DEPS) {
5752
sourceSets.register(needsP2) {
5853
compileClasspath += sourceSets.main.output

0 commit comments

Comments
 (0)