Skip to content

Claude Code hooks (4/4): IntelliJ IDEA formatter#7243

Open
edmundmiller wants to merge 1 commit into
hooks-3-test-runnerfrom
hooks-4-idea-format
Open

Claude Code hooks (4/4): IntelliJ IDEA formatter#7243
edmundmiller wants to merge 1 commit into
hooks-3-test-runnerfrom
hooks-4-idea-format

Conversation

@edmundmiller

@edmundmiller edmundmiller commented Jun 18, 2026

Copy link
Copy Markdown
Member

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 .groovy file, run IntelliJ IDEA's headless
    formatter to match project code style.
  • IDEA is located via the IDEA_SH env var or common macOS/Linux/JetBrains-Toolbox paths.
  • Runs with 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.
  • Most environment-specific of the hooks, so it lands late in the stack — it can be dropped
    without unwinding the others.

Stack

  1. EditorConfig formatting (async) — Claude Code hooks (1/4): EditorConfig formatting #7240
  2. Build check — Claude Code hooks (2/4): build check on Stop #7241
  3. Test runner — Claude Code hooks (3/4): test runner #7242
  4. (this PR) IntelliJ IDEA formatter (async)
  5. Integration test runner — Claude Code hooks (5/5): integration test runner #7244

🤖 Generated with Claude Code

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant