Skip to content

Commit bc9f236

Browse files
committed
Merge branch 'main' into feature/prettier-editorconfig
2 parents e13f43f + 3f8a35a commit bc9f236

File tree

182 files changed

+5121
-900
lines changed

Some content is hidden

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

182 files changed

+5121
-900
lines changed

renovate.json renamed to .github/renovate.json5

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
33
"extends": [
4-
"config:base"
4+
"config:recommended",
55
],
66
"packageRules": [
77
{
88
"groupName": "Ktlint",
99
"enabled": false,
10-
"matchPackagePatterns": [
11-
"com.pinterest.ktlint:*"
10+
"matchPackageNames": [
11+
"/com.pinterest.ktlint:*/",
1212
]
1313
}
1414
]

.github/workflows/changelog-print.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ jobs:
99
runs-on: ubuntu-latest
1010
name: changelogPrint
1111
steps:
12-
- uses: actions/checkout@v4
13-
- name: jdk 11
14-
uses: actions/setup-java@v4
12+
- uses: actions/checkout@v5
13+
- uses: actions/setup-java@v5
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: 24 additions & 20 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:
@@ -20,14 +20,13 @@ jobs:
2020
buildcachepass: ${{ secrets.BUILDCACHE_PASS }}
2121
steps:
2222
- name: Checkout
23-
uses: actions/checkout@v4
23+
uses: actions/checkout@v5
2424
with:
2525
fetch-depth: 0
26-
- name: Install JDK 11
27-
uses: actions/setup-java@v4
26+
- uses: actions/setup-java@v5
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
65-
uses: actions/checkout@v4
66-
- name: Install JDK ${{ matrix.distribution }} ${{ matrix.java_version }}
67-
uses: actions/setup-java@v4
60+
uses: actions/checkout@v5
61+
- uses: actions/setup-java@v5
6862
with:
6963
distribution: "temurin"
7064
java-version: ${{ matrix.jre }}
@@ -81,7 +75,7 @@ jobs:
8175
run: ./gradlew testNpm
8276
- name: Setup go
8377
if: matrix.kind == 'shfmt'
84-
uses: actions/setup-go@v5
78+
uses: actions/setup-go@v6
8579
with:
8680
go-version: 'stable'
8781
- name: Install shfmt
@@ -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/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@v4
40+
uses: actions/checkout@v5
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: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,10 @@ 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@v4
41-
- name: jdk 11
42-
uses: actions/setup-java@v4
40+
- uses: actions/checkout@v5
41+
- uses: actions/setup-java@v5
4342
with:
44-
java-version: 11
43+
java-version: 21
4544
distribution: 'temurin'
4645
- name: gradle caching
4746
uses: gradle/actions/setup-gradle@v4

.github/workflows/gradle-wrapper-validation.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.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: 73 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,89 @@ 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+
* Bump default `ktlint` version to latest `1.5.0` -> `1.7.1`. ([#2555](https://github.com/diffplug/spotless/pull/2555))
19+
* Bump default `jackson` version to latest `2.19.2` -> `2.20.0`. ([#2606](https://github.com/diffplug/spotless/pull/2606))
20+
* Bump default `gson` version to latest `2.13.1` -> `2.13.2`. ([#2615](https://github.com/diffplug/spotless/pull/2615))
21+
22+
## [3.3.1] - 2025-07-21
23+
### Fixed
24+
* `GitPrePushHookInstaller` didn't work on windows, now fixed. ([#2562](https://github.com/diffplug/spotless/pull/2562))
25+
26+
## [3.3.0] - 2025-07-20
27+
### Added
28+
* Allow specifying path to Biome JSON config file directly in `biome` step. Requires biome 2.x. ([#2548](https://github.com/diffplug/spotless/pull/2548))
29+
* `GitPrePushHookInstaller`, a reusable library component for installing a Git `pre-push` hook that runs formatter checks. ([#2553](https://github.com/diffplug/spotless/pull/2553))
30+
* Allow setting Eclipse XML config from a string, not only from files ([#2361](https://github.com/diffplug/spotless/pull/2361))
31+
## Changed
32+
* Bump default `gson` version to latest `2.11.0` -> `2.13.1`. ([#2414](https://github.com/diffplug/spotless/pull/2414))
33+
* Bump default `jackson` version to latest `2.18.1` -> `2.19.2`. ([#2558](https://github.com/diffplug/spotless/pull/2558))
34+
* Bump default `gherkin-utils` version to latest `9.0.0` -> `9.2.0`. ([#2408](https://github.com/diffplug/spotless/pull/2408))
35+
* Bump default `cleanthat` version to latest `2.22` -> `2.23`. ([#2556](https://github.com/diffplug/spotless/pull/2556))
36+
37+
## [3.2.0] - 2025-07-07
38+
### Added
39+
* Support for `idea` ([#2020](https://github.com/diffplug/spotless/pull/2020), [#2535](https://github.com/diffplug/spotless/pull/2535))
40+
* Add support for removing wildcard imports via `removeWildcardImports` step. ([#2517](https://github.com/diffplug/spotless/pull/2517))
41+
* 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))
42+
### Fixed
43+
* `SortPom` disable expandEmptyElements, to avoid empty body warnings. ([#2520](https://github.com/diffplug/spotless/pull/2520))
44+
* Fix biome formatter for new major release 2.x of biome ([#2537](https://github.com/diffplug/spotless/pull/2537))
45+
* Make sure npm-based formatters use the correct `node_modules` directory when running in parallel. ([#2542](https://github.com/diffplug/spotless/pull/2542))
46+
### Changed
47+
* Bump internal dependencies for npm-based formatters ([#2542](https://github.com/diffplug/spotless/pull/2542))
48+
49+
## [3.1.2] - 2025-05-27
50+
### Fixed
51+
* Fix `UnsupportedOperationException` in the Gradle plugin when using `targetExcludeContent[Pattern]` ([#2487](https://github.com/diffplug/spotless/pull/2487))
52+
* pgp key had expired, this and future releases will be signed by new key ([details](https://github.com/diffplug/spotless/discussions/2464))
53+
### Changed
54+
* Bump default `eclipse` version to latest `4.34` -> `4.35`. ([#2458](https://github.com/diffplug/spotless/pull/2458))
55+
* Bump default `greclipse` version to latest `4.32` -> `4.35`. ([#2458](https://github.com/diffplug/spotless/pull/2458))
56+
57+
## [3.1.1] - 2025-04-07
58+
### Changed
59+
* Use palantir-java-format 2.57.0 on Java 21. ([#2447](https://github.com/diffplug/spotless/pull/2447))
60+
* Re-try `npm install` with `--prefer-online` after `ERESOLVE` error. ([#2448](https://github.com/diffplug/spotless/pull/2448))
61+
* Allow multiple npm-based formatters having the same module dependencies, to share a `node_modules` dir without race conditions. [#2462](https://github.com/diffplug/spotless/pull/2462))
62+
63+
## [3.1.0] - 2025-02-20
64+
### Added
65+
* Support for`clang-format` on maven-plugin ([#2406](https://github.com/diffplug/spotless/pull/2406))
66+
* Allow overriding classLoader for all `JarState`s to enable spotless-cli ([#2427](https://github.com/diffplug/spotless/pull/2427))
67+
68+
## [3.0.2] - 2025-01-14
69+
### Fixed
70+
* Node.JS-based tasks now work with the configuration cache ([#2372](https://github.com/diffplug/spotless/issues/2372))
71+
* Eclipse-based tasks can now handle parallel configuration ([#2389](https://github.com/diffplug/spotless/issues/2389))
72+
73+
## [3.0.1] - 2025-01-07
74+
### Fixed
75+
* Deployment was missing part of the CDT formatter, now fixed. ([#2384](https://github.com/diffplug/spotless/issues/2384))
76+
77+
## [3.0.0] - 2025-01-06
78+
## Headline changes
79+
* All steps now support roundtrip serialization (end of [#987](https://github.com/diffplug/spotless/issues/987)).
80+
* Spotless now supports [linting](https://github.com/diffplug/spotless/blob/main/CONTRIBUTING.md#lints) in addition to formatting.
1381
### Changed
1482
* Allow setting Eclipse config from a string, not only from files ([#2337](https://github.com/diffplug/spotless/pull/2337))
1583
* Bump default `ktlint` version to latest `1.3.0` -> `1.4.0`. ([#2314](https://github.com/diffplug/spotless/pull/2314))
1684
* Add _Sort Members_ feature based on [Eclipse JDT](plugin-gradle/README.md#eclipse-jdt) implementation. ([#2312](https://github.com/diffplug/spotless/pull/2312))
1785
* Bump default `jackson` version to latest `2.18.0` -> `2.18.1`. ([#2319](https://github.com/diffplug/spotless/pull/2319))
1886
* Bump default `ktfmt` version to latest `0.52` -> `0.53`. ([#2320](https://github.com/diffplug/spotless/pull/2320))
1987
* Bump default `ktlint` version to latest `1.4.0` -> `1.5.0`. ([#2354](https://github.com/diffplug/spotless/pull/2354))
88+
* Bump minimum `eclipse-cdt` version to `11.0` (removed support for `10.7`). ([#2373](https://github.com/diffplug/spotless/pull/2373))
89+
* Bump default `eclipse` version to latest `4.32` -> `4.34`. ([#2381](https://github.com/diffplug/spotless/pull/2381))
90+
2091
### Fixed
2192
* You can now use `removeUnusedImports` and `googleJavaFormat` at the same time again. (fixes [#2159](https://github.com/diffplug/spotless/issues/2159))
2293
* The default list of type annotations used by `formatAnnotations` now includes Jakarta Validation's `Valid` and constraints validations (fixes [#2334](https://github.com/diffplug/spotless/issues/2334))
2394

95+
2496
## [3.0.0.BETA4] - 2024-10-24
2597
### Added
2698
* APIs to support linting. (implemented in [#2148](https://github.com/diffplug/spotless/pull/2148), [#2149](https://github.com/diffplug/spotless/pull/2149), [#2307](https://github.com/diffplug/spotless/pull/2307))
@@ -32,6 +104,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
32104
### Changed
33105
* **BREAKING** Moved `PaddedCell.DirtyState` to its own top-level class with new methods. ([#2148](https://github.com/diffplug/spotless/pull/2148))
34106
* **BREAKING** Removed `isClean`, `applyTo`, and `applyToAndReturnResultIfDirty` from `Formatter` because users should instead use `DirtyState`.
107+
* `FenceStep` now uses `ConfigurationCacheHack`. ([#2378](https://github.com/diffplug/spotless/pull/2378) fixes [#2317](https://github.com/diffplug/spotless/issues/2317))
35108
### Fixed
36109
* `ktlint` steps now read from the `string` instead of the `file` so they don't clobber earlier steps. (fixes [#1599](https://github.com/diffplug/spotless/issues/1599))
37110

@@ -369,8 +442,6 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
369442
## [2.26.0] - 2022-06-05
370443
### Added
371444
* Support for `editorConfigOverride` in `ktlint`. ([#1218](https://github.com/diffplug/spotless/pull/1218) fixes [#1193](https://github.com/diffplug/spotless/issues/1193))
372-
### Fixed
373-
* `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))
374445

375446
## [2.25.3] - 2022-05-10
376447
### Fixed

0 commit comments

Comments
 (0)