Skip to content

Commit b2e71f4

Browse files
authored
Merge branch 'main' into fix/jgit-system-config
2 parents 50cb0e3 + 5e6ab47 commit b2e71f4

File tree

135 files changed

+3880
-600
lines changed

Some content is hidden

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

135 files changed

+3880
-600
lines changed

.github/workflows/changelog-print.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ jobs:
1010
name: changelogPrint
1111
steps:
1212
- uses: actions/checkout@v4
13-
- name: jdk 11
14-
uses: actions/setup-java@v4
13+
- uses: actions/setup-java@v4
1514
with:
16-
java-version: 11
15+
java-version: 21
1716
distribution: 'temurin'
1817
- name: gradle caching
1918
uses: gradle/actions/setup-gradle@v4

.github/workflows/ci.yml

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
on:
66
pull_request:
77
push:
8-
branches: [main]
8+
branches: [main, release]
99
workflow_dispatch:
1010

1111
concurrency:
@@ -23,11 +23,10 @@ jobs:
2323
uses: actions/checkout@v4
2424
with:
2525
fetch-depth: 0
26-
- name: Install JDK 11
27-
uses: actions/setup-java@v4
26+
- uses: actions/setup-java@v4
2827
with:
2928
distribution: "temurin"
30-
java-version: 11
29+
java-version: 21
3130
- name: gradle caching
3231
uses: gradle/actions/setup-gradle@v4
3332
- name: spotlessCheck
@@ -41,30 +40,25 @@ jobs:
4140
matrix:
4241
kind: [maven, gradle]
4342
# Test on the latest Java version once Gradle & Maven support it.
44-
jre: [11, 17, 21, 23]
45-
os: [ubuntu-latest]
43+
jre: [17, 21, 24]
44+
os: [ubuntu-latest, windows-latest]
4645
include:
47-
# test windows at the diagonals of the above matrix
48-
- kind: maven
49-
jre: 11
50-
os: windows-latest
51-
- kind: gradle
52-
jre: 17
53-
os: windows-latest
5446
# npm on linux only (crazy slow on windows)
5547
- kind: npm
56-
jre: 11
48+
jre: 17
5749
os: ubuntu-latest
5850
- kind: shfmt
59-
jre: 11
51+
jre: 17
6052
os: ubuntu-latest
6153
shfmt-version: v3.8.0
54+
- kind: idea
55+
jre: 17
56+
os: ubuntu-latest
6257
runs-on: ${{ matrix.os }}
6358
steps:
6459
- name: Checkout
6560
uses: actions/checkout@v4
66-
- name: Install JDK ${{ matrix.distribution }} ${{ matrix.java_version }}
67-
uses: actions/setup-java@v4
61+
- uses: actions/setup-java@v4
6862
with:
6963
distribution: "temurin"
7064
java-version: ${{ matrix.jre }}
@@ -91,6 +85,16 @@ jobs:
9185
- name: Test shfmt
9286
if: matrix.kind == 'shfmt'
9387
run: ./gradlew testShfmt
88+
- name: Test idea
89+
if: matrix.kind == 'idea'
90+
run: |
91+
download_link=$(curl https://data.services.jetbrains.com/products/releases\?code\=IIC\&latest\=true\&type\=release | jq -r '.IIC[0].downloads.linux.link')
92+
curl --location "$download_link" -o idea.tar.gz
93+
tar -xf idea.tar.gz
94+
cd idea-IC*
95+
export PATH=${PATH}:$(pwd)/bin
96+
cd ..
97+
./gradlew testIdea
9498
- name: junit result
9599
uses: mikepenz/action-junit-report@v5
96100
if: always() # always run even if the previous step fails

.github/workflows/deploy.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,9 @@ jobs:
3838
ORG_GRADLE_PROJECT_gpg_key64: ${{ secrets.GPG_KEY64 }}
3939
steps:
4040
- uses: actions/checkout@v4
41-
- name: jdk 11
42-
uses: actions/setup-java@v4
41+
- uses: actions/setup-java@v4
4342
with:
44-
java-version: 17
43+
java-version: 21
4544
distribution: 'temurin'
4645
- name: gradle caching
4746
uses: gradle/actions/setup-gradle@v4

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# Project-specific stuff
88
userHome/
99
workspace/
10+
testenv.properties
1011

1112
### Gradle ###
1213
.gradle
@@ -67,6 +68,7 @@ local.properties
6768

6869
## Directory-based project format:
6970
.idea/
71+
!.idea/icon.png
7072
# if you remove the above rule, at least ignore the following:
7173

7274
# User-specific stuff:

.idea/icon.png

1.6 KB
Loading

.idea/vcs.xml

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGES.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,38 @@ 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+
* **BREAKING** Bump the required Java to `17`. ([#2375](https://github.com/diffplug/spotless/issues/2375), [#2540](https://github.com/diffplug/spotless/pull/2540))
15+
* Bump JGit from `6.10.1` to `7.3.0` ([#2257](https://github.com/diffplug/spotless/pull/2257))
16+
* Adds support for worktrees (fixes [#1765](https://github.com/diffplug/spotless/issues/1765))
17+
* Bump default `google-java-format` version to latest `1.24.0` -> `1.28.0`. ([#2345](https://github.com/diffplug/spotless/pull/2345))
18+
19+
## [3.3.1] - 2025-07-21
20+
### Fixed
21+
* `GitPrePushHookInstaller` didn't work on windows, now fixed. ([#2562](https://github.com/diffplug/spotless/pull/2562))
22+
23+
## [3.3.0] - 2025-07-20
24+
### Added
25+
* Allow specifying path to Biome JSON config file directly in `biome` step. Requires biome 2.x. ([#2548](https://github.com/diffplug/spotless/pull/2548))
26+
* `GitPrePushHookInstaller`, a reusable library component for installing a Git `pre-push` hook that runs formatter checks. ([#2553](https://github.com/diffplug/spotless/pull/2553))
27+
* Allow setting Eclipse XML config from a string, not only from files ([#2361](https://github.com/diffplug/spotless/pull/2361))
28+
## Changed
29+
* Bump default `gson` version to latest `2.11.0` -> `2.13.1`. ([#2414](https://github.com/diffplug/spotless/pull/2414))
30+
* Bump default `jackson` version to latest `2.18.1` -> `2.19.2`. ([#2558](https://github.com/diffplug/spotless/pull/2558))
31+
* Bump default `gherkin-utils` version to latest `9.0.0` -> `9.2.0`. ([#2408](https://github.com/diffplug/spotless/pull/2408))
32+
* Bump default `cleanthat` version to latest `2.22` -> `2.23`. ([#2556](https://github.com/diffplug/spotless/pull/2556))
33+
34+
## [3.2.0] - 2025-07-07
35+
### Added
36+
* Support for `idea` ([#2020](https://github.com/diffplug/spotless/pull/2020), [#2535](https://github.com/diffplug/spotless/pull/2535))
37+
* Add support for removing wildcard imports via `removeWildcardImports` step. ([#2517](https://github.com/diffplug/spotless/pull/2517))
38+
* scalafmt: enforce version consistency between the version configured in Spotless and the version declared in Scalafmt config file ([#2460](https://github.com/diffplug/spotless/issues/2460))
39+
### Fixed
40+
* `SortPom` disable expandEmptyElements, to avoid empty body warnings. ([#2520](https://github.com/diffplug/spotless/pull/2520))
41+
* Fix biome formatter for new major release 2.x of biome ([#2537](https://github.com/diffplug/spotless/pull/2537))
42+
* Make sure npm-based formatters use the correct `node_modules` directory when running in parallel. ([#2542](https://github.com/diffplug/spotless/pull/2542))
43+
### Changed
44+
* Bump internal dependencies for npm-based formatters ([#2542](https://github.com/diffplug/spotless/pull/2542))
1345

1446
## [3.1.2] - 2025-05-27
1547
### Fixed
@@ -407,8 +439,6 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
407439
## [2.26.0] - 2022-06-05
408440
### Added
409441
* Support for `editorConfigOverride` in `ktlint`. ([#1218](https://github.com/diffplug/spotless/pull/1218) fixes [#1193](https://github.com/diffplug/spotless/issues/1193))
410-
### Fixed
411-
* `google-java-format` and `RemoveUnusedImportsStep` works on JDK16+ without jvm args workaround. ([#1224](https://github.com/diffplug/spotless/pull/1224) fixes [#834](https://github.com/diffplug/spotless/issues/834))
412442

413443
## [2.25.3] - 2022-05-10
414444
### Fixed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ If you get something running, we'd love to host your plugin within this repo as
163163

164164
To run all tests, simply do
165165

166-
> gradlew test
166+
> ./gradlew test
167167
168168
Since that takes some time, you might only want to run the tests
169169
concerning what you are working on:

INTELLIJ_IDEA_SCREENSHOTS.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Extracting Code Style from IntelliJ IDEA
2+
3+
## 1. Exporting Code Style Settings to a file
4+
To export code style settings from IntelliJ IDEA to a file, go to
5+
`Settings | Editor | Code Style` and click on the gear icon next to the scheme name.
6+
7+
![Exporting code style settings](_images/intellij_export_codestyle.png)
8+
9+
## 2. Using IntelliJ's active code style directly
10+
If you have your code style settings checked into version control (in your `.idea` directory),
11+
you can use the active code style directly in Spotless without exporting it to a file.
12+
The file can be found at `.idea/codeStyles/Project.xml`.
13+
14+
## Upstream documentation
15+
More details can be found in the [IntelliJ IDEA documentation](https://www.jetbrains.com/help/idea/command-line-formatter.html#options)
16+
for the command line formatter, which is what Spotless uses under the hood.

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ Once someone has filled in one square of the formatter/build system matrix, it's
175175

176176
## Acknowledgements
177177

178+
- Thanks to [over 200 contributors with merged PRs](https://github.com/diffplug/spotless/graphs/contributors), and also to everyone who helped with code review, file reproducible bugs, etc. A few contributions stand out as especially significant to the history of the project, though regrettably there are certain to be some important omissions!
179+
- Thanks to [Zongle Wang](https://github.com/Goooler) for an [enormous mound of contributions](https://github.com/diffplug/spotless/issues?q=is%3Apr%20is%3Aclosed%20author%3AGoooler), but especially for [his near-rewrite](https://github.com/diffplug/spotless/issues/1274#issuecomment-2146972303) so that Spotless could support Gradle's configuration cache natively.
180+
- Thanks to [Simon Gamma](https://github.com/simschla) for [adding support for npm-based formatters](https://github.com/diffplug/spotless/pull/283), [twice](https://github.com/diffplug/spotless/pull/606) including `prettier` and `tsfmt`.
178181
- Thanks to [Konstantin Lutovich](https://github.com/lutovich) for [implementing and maintaining the Maven plugin](https://github.com/diffplug/spotless/pull/188), as well as fixing [remote-build cache support for Gradle](https://github.com/diffplug/spotless/pull/571).
179182
- Thanks to [Frank Vennemeyer](https://github.com/fvgh) for [Groovy support via greclipse](https://github.com/diffplug/spotless/issues/13), [C++ support via CDT](https://github.com/diffplug/spotless/issues/232), [XML support via WTP](https://github.com/diffplug/spotless/pull/241) and a huge body of work with other eclipse-based formatters.
180183
- Thanks to [Jonathan Bluett-Duncan](https://github.com/jbduncan) for
@@ -185,12 +188,12 @@ Once someone has filled in one square of the formatter/build system matrix, it's
185188
- Thanks to [Daz DeBoer](https://github.com/bigdaz) for the reworking the guts of our Gradle plugin to support [buildcache](https://github.com/diffplug/spotless/pull/576), [InputChanges](https://github.com/diffplug/spotless/pull/607), and [lazy configuration](https://github.com/diffplug/spotless/pull/617).
186189
- Thanks to [Richard Willis](https://github.com/badsyntax) for creating the [VS Code extension for Spotless Gradle](https://marketplace.visualstudio.com/items?itemName=richardwillis.vscode-spotless-gradle).
187190
- Thanks to [Ryan Gurney](https://github.com/ragurney) for creating the [IntelliJ plugin for Spotless Gradle](https://plugins.jetbrains.com/plugin/18321-spotless-gradle).
191+
- Thanks to [Alex Danylenko](https://github.com/lazer-dev) for creating the [git pre-push hook](https://github.com/diffplug/spotless/pull/2553).
188192
- Thanks to [Markus Heberling](https://github.com/tisoft) for adding [generic native formatters](https://github.com/diffplug/spotless/pull/949), [jsr-223 formatters](https://github.com/diffplug/spotless/pull/945), and [maven pom sorting](https://github.com/diffplug/spotless/pull/946).
189193
- Thanks to [Matthias Balke](https://github.com/matthiasbalke) for [adding support for Antlr](https://github.com/diffplug/spotless/pull/328).
190194
- 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))
191195
- 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).
192196
- Thanks to [Ranadeep Polavarapu](https://github.com/RanadeepPolavarapu) for adding support for ktfmt ([#569](https://github.com/diffplug/spotless/pull/569))
193-
- Thanks to [Simon Gamma](https://github.com/simschla) for [adding support for npm-based formatters](https://github.com/diffplug/spotless/pull/283), [twice](https://github.com/diffplug/spotless/pull/606) including `prettier` and `tsfmt`.
194197
- Thanks to [Hakanai](https://github.com/hakanai) for adding [wildcards last support to the import sorter](https://github.com/diffplug/spotless/pull/956).
195198
- 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).
196199
- 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).

0 commit comments

Comments
 (0)