Skip to content

Commit 87e2d24

Browse files
committed
Merge branch 'main' into expandWildcardImports
2 parents bf76643 + 1c0788e commit 87e2d24

File tree

27 files changed

+131
-54
lines changed

27 files changed

+131
-54
lines changed

.github/renovate.json5

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,18 @@
33
"extends": [
44
"config:recommended",
55
],
6-
"packageRules": [
6+
packageRules: [
77
{
8-
"groupName": "Ktlint",
9-
"enabled": false,
10-
"matchPackageNames": [
11-
"/com.pinterest.ktlint:*/",
8+
groupName: 'Ktlint',
9+
matchPackageNames: [
10+
'com.pinterest.ktlint:*',
1211
]
13-
}
12+
},
13+
{
14+
groupName: 'OpenRewrite',
15+
matchPackageNames: [
16+
'org.openrewrite.recipe:*',
17+
],
18+
},
1419
]
1520
}

.github/workflows/changelog-print.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
name: changelogPrint
1111
steps:
12-
- uses: actions/checkout@v5
12+
- uses: actions/checkout@v6
1313
- uses: actions/setup-java@v5
1414
with:
1515
java-version: 21

.github/workflows/ci.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ concurrency:
1212
group: ${{ github.workflow }}-${{ github.ref }}
1313
cancel-in-progress: true
1414
jobs:
15-
sanityCheck:
15+
sanity-check:
16+
name: SanityCheck
1617
runs-on: ubuntu-latest
1718
env:
1819
buildcacheuser: ${{ secrets.BUILDCACHE_USER }}
1920
buildcachepass: ${{ secrets.BUILDCACHE_PASS }}
2021
steps:
2122
- name: Checkout
22-
uses: actions/checkout@v5
23+
uses: actions/checkout@v6
2324
with:
2425
fetch-depth: 0
2526
- uses: actions/setup-java@v5
@@ -35,7 +36,7 @@ jobs:
3536
- name: assemble testClasses
3637
run: ./gradlew assemble testClasses
3738
build:
38-
needs: sanityCheck
39+
needs: sanity-check
3940
strategy:
4041
fail-fast: false
4142
matrix:
@@ -58,7 +59,7 @@ jobs:
5859
runs-on: ${{ matrix.os }}
5960
steps:
6061
- name: Checkout
61-
uses: actions/checkout@v5
62+
uses: actions/checkout@v6
6263
- uses: actions/setup-java@v5
6364
with:
6465
distribution: "temurin"
@@ -107,7 +108,7 @@ jobs:
107108
# Status check that is required in branch protection rules.
108109
final-status:
109110
needs:
110-
- sanityCheck
111+
- sanity-check
111112
- build
112113
runs-on: ubuntu-latest
113114
if: always()

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737

3838
steps:
3939
- name: Checkout repository
40-
uses: actions/checkout@v5
40+
uses: actions/checkout@v6
4141
with:
4242
# We must fetch at least the immediate parents so that if this is
4343
# a pull request then we can checkout the head.

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
ORG_GRADLE_PROJECT_gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
3838
ORG_GRADLE_PROJECT_gpg_key64: ${{ secrets.GPG_KEY64 }}
3939
steps:
40-
- uses: actions/checkout@v5
40+
- uses: actions/checkout@v6
4141
- uses: actions/setup-java@v5
4242
with:
4343
java-version: 21

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
1212
## [Unreleased]
1313
### Added
1414
- Add a `expandWildcardImports` API for java ([#2679](https://github.com/diffplug/spotless/issues/2594))
15+
- Add the ability to specify a wildcard version (`*`) for external formatter executables. ([#2757](https://github.com/diffplug/spotless/issues/2757))
16+
### Changes
17+
- Bump default `ktlint` version to latest `1.7.1` -> `1.8.0`. ([2763](https://github.com/diffplug/spotless/pull/2763))
18+
- Bump default `gherkin-utils` version to latest `9.2.0` -> `10.0.0`. ([#2619](https://github.com/diffplug/spotless/pull/2619))
1519

1620
## [4.1.0] - 2025-11-18
1721
### Changes

gradle.properties

Lines changed: 2 additions & 2 deletions
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.1
33+
VER_JUNIT=6.0.1
3434
VER_ASSERTJ=3.27.6
3535
VER_MOCKITO=5.20.0
36-
VER_SELFIE=2.5.4
36+
VER_SELFIE=2.5.5

gradle/error-prone.gradle

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import static java.lang.System.getenv
2+
3+
apply plugin: 'net.ltgt.errorprone'
4+
5+
tasks.withType(JavaCompile).configureEach {
6+
options.errorprone {
7+
disableAllWarnings = true // https://github.com/diffplug/spotless/issues/2745 https://github.com/google/error-prone/issues/5365
8+
disable(
9+
// consider fix, or reasoning.
10+
'AnnotateFormatMethod', // We don`t want to use ErrorProne's annotations.
11+
'DoNotCallSuggester', // We don`t want to use ErrorProne's annotations.
12+
'FunctionalInterfaceMethodChanged',
13+
'ImmutableEnumChecker', // We don`t want to use ErrorProne's annotations.
14+
'InlineMeSuggester', // We don`t want to use ErrorProne's annotations.
15+
'JavaxInjectOnAbstractMethod',
16+
'OverridesJavaxInjectableMethod',
17+
'ReturnValueIgnored', // We don`t want to use ErrorProne's annotations.
18+
)
19+
error(
20+
'ReturnValueIgnored',
21+
'SelfAssignment',
22+
'StringJoin',
23+
'UnnecessarilyFullyQualified',
24+
'UnnecessaryLambda',
25+
)
26+
// bug: this only happens when the file is dirty.
27+
// might be an up2date (caching) issue, as file is currently in corrupt state.
28+
// ForbidGradleInternal(import
29+
excludedPaths.set(
30+
'.*/GradleIntegrationHarness.java|'+
31+
'.*/SelfTest.java'
32+
)
33+
if (!getenv().containsKey('CI') && getenv('IN_PLACE')?.toBoolean()) {
34+
errorproneArgs.addAll(
35+
'-XepPatchLocation:IN_PLACE',
36+
'-XepPatchChecks:' +
37+
'MissingOverride'
38+
)
39+
}
40+
}
41+
}
42+
43+
dependencies {
44+
errorprone('com.google.errorprone:error_prone_core:2.42.0')
45+
}

gradle/rewrite.gradle

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ rewrite {
2121
failOnDryRunResults = true
2222
}
2323
dependencies {
24-
rewrite(platform('org.openrewrite.recipe:rewrite-recipe-bom:3.18.0'))
25-
rewrite('org.openrewrite.recipe:rewrite-migrate-java:3.20.0')
26-
rewrite('org.openrewrite.recipe:rewrite-java-security:3.20.0')
27-
rewrite('org.openrewrite.recipe:rewrite-rewrite:0.14.1')
28-
rewrite('org.openrewrite.recipe:rewrite-static-analysis:2.20.0')
29-
rewrite('org.openrewrite.recipe:rewrite-third-party:0.31.1')
24+
rewrite('org.openrewrite.recipe:rewrite-migrate-java:3.22.0')
25+
rewrite('org.openrewrite.recipe:rewrite-java-security:3.22.0')
26+
rewrite('org.openrewrite.recipe:rewrite-rewrite:0.16.0')
27+
rewrite('org.openrewrite.recipe:rewrite-static-analysis:2.22.0')
28+
rewrite('org.openrewrite.recipe:rewrite-third-party:0.31.2')
3029
}

lib-extra/src/jdt/java/com/diffplug/spotless/extra/glue/jdt/EclipseJdtSortMembers.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,64 +98,84 @@ private static class Buffer implements IBuffer {
9898
this.contents = contents;
9999
}
100100

101+
@Override
101102
public void addBufferChangedListener(IBufferChangedListener listener) {}
102103

104+
@Override
103105
public void append(char[] text) {}
104106

107+
@Override
105108
public void append(String text) {}
106109

110+
@Override
107111
public void close() {}
108112

113+
@Override
109114
public char getChar(int position) {
110115
return '\u0000';
111116
}
112117

118+
@Override
113119
public char[] getCharacters() {
114120
return contents.toCharArray();
115121
}
116122

123+
@Override
117124
public String getContents() {
118125
return contents;
119126
}
120127

128+
@Override
121129
public int getLength() {
122130
return 0;
123131
}
124132

133+
@Override
125134
public IOpenable getOwner() {
126135
return null;
127136
}
128137

138+
@Override
129139
public String getText(int offset, int length) {
130140
return null;
131141
}
132142

143+
@Override
133144
public IResource getUnderlyingResource() {
134145
return null;
135146
}
136147

148+
@Override
137149
public boolean hasUnsavedChanges() {
138150
return false;
139151
}
140152

153+
@Override
141154
public boolean isClosed() {
142155
return false;
143156
}
144157

158+
@Override
145159
public boolean isReadOnly() {
146160
return true;
147161
}
148162

163+
@Override
149164
public void removeBufferChangedListener(IBufferChangedListener listener) {}
150165

166+
@Override
151167
public void replace(int position, int length, char[] text) {}
152168

169+
@Override
153170
public void replace(int position, int length, String text) {}
154171

172+
@Override
155173
public void save(IProgressMonitor progress, boolean force) {}
156174

175+
@Override
157176
public void setContents(char[] contents) {}
158177

178+
@Override
159179
public void setContents(String contents) {
160180
this.contents = contents;
161181
}

0 commit comments

Comments
 (0)