Claude Code hooks (4/4): IntelliJ IDEA formatter#7243
Open
edmundmiller wants to merge 1 commit into
Open
Conversation
After editing a .groovy file, run IntelliJ IDEA's headless formatter to match project code style. IDEA is located via IDEA_SH or common macOS/Linux/JetBrains-Toolbox paths. Wired with `async: true` so it formats in the background without blocking the conversation, and is fully non-blocking: skips silently when IDEA is absent (optional dependency) and only warns — never blocks — if the formatter errors. Written in Bash; parses the payload with jq. Most environment-specific of the hooks, so it lands last in the stack and can be dropped without unwinding the others. Stacked on hooks-3-test-runner. Signed-off-by: Edmund Miller <edmund.miller@seqera.io>
0936cb9 to
578641e
Compare
bdbba00 to
e097194
Compare
This was referenced Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 4 of the Claude Code engine-development hooks stack. Targets
hooks-3-test-runner(PR #7242).
This PR — IntelliJ IDEA formatter (PostToolUse, async)
hooks/format-idea.sh: after editing a.groovyfile, run IntelliJ IDEA's headlessformatter to match project code style.
IDEA_SHenv var or common macOS/Linux/JetBrains-Toolbox paths.async: true(background, non-blocking) and is fully non-blocking otherwise:skips silently when IDEA isn't installed (optional dependency) and only warns — never
blocks — if the formatter errors.
without unwinding the others.
Stack
🤖 Generated with Claude Code