Skip to content

Commit 8fc0604

Browse files
authored
Merge branch 'main' into update-for-biome-2.x
2 parents e868b26 + e803400 commit 8fc0604

File tree

38 files changed

+1124
-43
lines changed

38 files changed

+1124
-43
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ jobs:
5959
jre: 11
6060
os: ubuntu-latest
6161
shfmt-version: v3.8.0
62+
- kind: idea
63+
jre: 11
64+
os: ubuntu-latest
6265
runs-on: ${{ matrix.os }}
6366
steps:
6467
- name: Checkout
@@ -91,6 +94,16 @@ jobs:
9194
- name: Test shfmt
9295
if: matrix.kind == 'shfmt'
9396
run: ./gradlew testShfmt
97+
- name: Test idea
98+
if: matrix.kind == 'idea'
99+
run: |
100+
download_link=$(curl https://data.services.jetbrains.com/products/releases\?code\=IIC\&latest\=true\&type\=release | jq -r '.IIC[0].downloads.linux.link')
101+
curl --location "$download_link" -o idea.tar.gz
102+
tar -xf idea.tar.gz
103+
cd idea-IC*
104+
export PATH=${PATH}:$(pwd)/bin
105+
cd ..
106+
./gradlew testIdea
94107
- name: junit result
95108
uses: mikepenz/action-junit-report@v5
96109
if: always() # always run even if the previous step fails

.gitignore

Lines changed: 1 addition & 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

.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: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
1111

1212
## [Unreleased]
1313
### Added
14+
* Support for `idea` ([#2020](https://github.com/diffplug/spotless/pull/2020), [#2535](https://github.com/diffplug/spotless/pull/2535))
1415
* Add support for removing wildcard imports via `removeWildcardImports` step. ([#2517](https://github.com/diffplug/spotless/pull/2517))
15-
1616
### Fixed
1717
* Fix biome formatter for new major release 2.x of biome ([#2537](https://github.com/diffplug/spotless/pull/2537))
18+
* Make sure npm-based formatters use the correct `node_modules` directory when running in parallel. ([#2542](https://github.com/diffplug/spotless/pull/2542))
19+
### Changed
20+
* Bump internal dependencies for npm-based formatters ([#2542](https://github.com/diffplug/spotless/pull/2542))
1821

1922
## [3.1.2] - 2025-05-27
2023
### Fixed

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.

_images/intellij_export_codestyle.png

131 KB
Loading

gradle/special-tests.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ def special = [
66
'buf',
77
'clang',
88
'gofmt',
9+
'idea',
910
'npm',
1011
'shfmt'
1112
]
@@ -37,5 +38,9 @@ tasks.named('test').configure {
3738
special.forEach { tag ->
3839
tasks.register("test${tag.capitalize()}", Test) {
3940
useJUnitPlatform { includeTags tag }
41+
if (rootProject.file('testenv.properties').exists()) {
42+
systemProperty 'testenv.properties.path', rootProject.file('testenv.properties').canonicalPath
43+
}
4044
}
4145
}
46+

lib/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ dependencies {
7676
testCommonImplementation "org.junit.jupiter:junit-jupiter:$VER_JUNIT"
7777
testCommonImplementation "org.assertj:assertj-core:$VER_ASSERTJ"
7878
testCommonImplementation "com.diffplug.durian:durian-testlib:$VER_DURIAN"
79+
testCommonImplementation projects.testlib
7980
testCommonRuntimeOnly "org.junit.platform:junit-platform-launcher"
8081

8182
// GLUE CODE (alphabetic order please)

0 commit comments

Comments
 (0)