Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
6419de1
Basic IDEA usage locally.
IlyasYOY Jan 11, 2024
b84d243
Parameterize IDEA usage.
IlyasYOY Jan 23, 2024
1d8d9b2
Verify IDEA binary.
IlyasYOY Jan 23, 2024
9d09760
Merge branch 'main' of github.com:diffplug/spotless
IlyasYOY Jan 23, 2024
affd905
Gradle IDEA integration.
IlyasYOY Jan 23, 2024
effe2fc
Maven IDEA integration.
IlyasYOY Jan 23, 2024
8e30175
Make IDEA tests special
IlyasYOY Jan 23, 2024
1554dd6
docs: CHANGES.md
IlyasYOY Jan 23, 2024
763eaac
Config file for IDEA step
IlyasYOY Jan 23, 2024
fdb73b7
CI Fixes
IlyasYOY Jan 24, 2024
e58c9f8
Merge branch 'main' of github.com:diffplug/spotless
IlyasYOY Jan 24, 2024
c6c6cce
docs: fixed structure of CHANGES.md
IlyasYOY Jan 24, 2024
bf5918c
Merge branch 'main' of github.com:diffplug/spotless
IlyasYOY Jan 27, 2024
9123527
Create State object
IlyasYOY Jan 27, 2024
7d6eed4
Merge branch 'main' of github.com:diffplug/spotless
IlyasYOY Jan 28, 2024
e03e715
Merge branch 'main' into main-IlyasYOY
nedtwigg Feb 13, 2024
a0bde46
spotlessApply
nedtwigg Feb 13, 2024
1025821
feat: add support for absolute binary path
simschla Dec 16, 2024
dc3b568
fix: don't interact with the file directly
simschla Dec 16, 2024
a9320dd
doc: add link to jetbrains documentation
simschla Dec 16, 2024
9568b51
Merge branch 'main' of github.com:diffplug/spotless into feature/inte…
simschla Dec 16, 2024
c067d28
Merge remote-tracking branch 'upstream/main' into feature/intellij-fo…
simschla Jun 25, 2025
39d1653
refactor: move `idea` to generic formatters
simschla May 9, 2025
599ad51
refactor: use builder for idea-step creation
simschla May 12, 2025
d771a9c
chore: provide custom idea.properties with custom config/system paths
simschla May 13, 2025
619051c
chore: fix formatter to use UTF-8 (as asserted by spotless)
simschla May 13, 2025
0570c6a
feat: allow specifying idea execs not on path
simschla May 13, 2025
1027aca
refactor: turn ideastep into autoclosable implementation
simschla May 16, 2025
7b2b21c
refactor: adapt creation pipeline to allow createLazy to work with fu…
simschla May 18, 2025
412430d
chore: add testIdea to ci
simschla May 19, 2025
b686a1c
docs: start documenting idea usage
simschla Jun 20, 2025
3277660
chore: adapt api for idea step
simschla Jun 20, 2025
6d71e4d
docs: add documentation for IntelliJ codestyle
simschla Jun 25, 2025
50e2589
fix(mvn): pass developer root dir to maven tests
simschla Jun 25, 2025
3000ad8
style: reformat with spotless
simschla Jun 29, 2025
b7aed37
docs: update with PR-reference
simschla Jun 29, 2025
b5e117e
fix: correct pmd warnings
simschla Jun 30, 2025
044f98d
docs: fix typo
simschla Jun 30, 2025
6c7ecf5
chore: cleanups based on review
simschla Jun 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ jobs:
jre: 11
os: ubuntu-latest
shfmt-version: v3.8.0
- kind: idea
jre: 11
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
Expand Down Expand Up @@ -91,6 +94,16 @@ jobs:
- name: Test shfmt
if: matrix.kind == 'shfmt'
run: ./gradlew testShfmt
- name: Test idea
if: matrix.kind == 'idea'
run: |
download_link=$(curl https://data.services.jetbrains.com/products/releases\?code\=IIC\&latest\=true\&type\=release | jq -r '.IIC[0].downloads.linux.link')
curl --location "$download_link" -o idea.tar.gz
tar -xf idea.tar.gz
cd idea-IC*
export PATH=${PATH}:$(pwd)/bin
cd ..
./gradlew testIdea
- name: junit result
uses: mikepenz/action-junit-report@v5
if: always() # always run even if the previous step fails
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# Project-specific stuff
userHome/
workspace/
testenv.properties

### Gradle ###
.gradle
Expand Down
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (

## [Unreleased]
### Added
* Support for `idea` ([#2020](https://github.com/diffplug/spotless/pull/2020), [#2535](https://github.com/diffplug/spotless/pull/2535))
* Add support for removing wildcard imports via `removeWildcardImports` step. ([#2517](https://github.com/diffplug/spotless/pull/2517))

## [3.1.2] - 2025-05-27
Expand Down
16 changes: 16 additions & 0 deletions INTELLIJ_IDEA_SCREENSHOTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Extracting Code Style from IntelliJ IDEA

## 1. Exporting Code Style Settings to a file
To export code style settings from IntelliJ IDEA to a file, go to
`Settings | Editor | Code Style` and click on the gear icon next to the scheme name.

![Exporting code style settings](_images/intellij_export_codestyle.png)

## 2. Using IntelliJ's active code style directly
If you have your code style settings checked into version control (in your `.idea` directory),
you can use the active code style directly in Spotless without exporting it to a file.
The file can be found at `.idea/codeStyles/Project.xml`.

## Upstream documentation
More details can be found in the [IntelliJ IDEA documentation](https://www.jetbrains.com/help/idea/command-line-formatter.html#options)
for the command line formatter, which is what Spotless uses under the hood.
Binary file added _images/intellij_export_codestyle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions gradle/special-tests.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ def special = [
'buf',
'clang',
'gofmt',
'idea',
'npm',
'shfmt'
]
Expand Down Expand Up @@ -37,5 +38,9 @@ tasks.named('test').configure {
special.forEach { tag ->
tasks.register("test${tag.capitalize()}", Test) {
useJUnitPlatform { includeTags tag }
if (rootProject.file('testenv.properties').exists()) {
systemProperty 'testenv.properties.path', rootProject.file('testenv.properties').canonicalPath
}
}
}

Loading
Loading