Skip to content

Claude Code hooks (1/4): EditorConfig formatting#7240

Open
edmundmiller wants to merge 1 commit into
masterfrom
hooks-1-editorconfig
Open

Claude Code hooks (1/4): EditorConfig formatting#7240
edmundmiller wants to merge 1 commit into
masterfrom
hooks-1-editorconfig

Conversation

@edmundmiller

@edmundmiller edmundmiller commented Jun 18, 2026

Copy link
Copy Markdown
Member

First of a 5-PR stack that adds Claude Code hooks
for developing the Nextflow engine (not for authoring Nextflow scripts — that tooling
lives in nextflow-io/agent-skills). This was previously one large PR (#6429); it's split
into one hook per PR so each can be reviewed and understood on its own.

All hooks are small, self-contained Bash scripts under .claude/hooks/, wired up in
.claude/settings.json. They parse the Claude Code JSON payload with jq (the only added
dependency; hooks no-op silently if jq is absent).

This PR — EditorConfig enforcement (PostToolUse, async)

  • hooks/format-editorconfig.sh: after every Edit/Write/MultiEdit on a source file
    (.groovy/.java/.gradle/.md/.txt/.yml/.yaml/.json), apply the project
    .editorconfig rules via eclint fix.
  • eclint is an optional dependency — the hook skips silently if it isn't installed
    (no global npm install side effect).
  • Runs with async: true so formatting happens in the background and never blocks the
    conversation.
  • Also adds the .claude/settings.json + .claude/README.md scaffolding the later PRs build on.

The stack (review front-to-back)

  1. (this PR) EditorConfig formatting (async)
  2. Build check — make compile on Stop/SubagentStop — Claude Code hooks (2/4): build check on Stop #7241
  3. Test runner — run the edited file's gradle test class — Claude Code hooks (3/4): test runner #7242
  4. IntelliJ IDEA formatter (async, optional) — Claude Code hooks (4/4): IntelliJ IDEA formatter #7243
  5. Integration test runner — run the edited tests/*.nf case (asyncRewake) — Claude Code hooks (5/5): integration test runner #7244

Each later PR targets the previous branch, so settings.json/README.md grow cleanly with
no cross-PR conflicts.

🤖 Generated with Claude Code

@netlify

netlify Bot commented Jun 18, 2026

Copy link
Copy Markdown

Deploy Preview for nextflow-docs ready!

Name Link
🔨 Latest commit 4f0e9c8
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs/deploys/6a3410203a5d6f0008e39519
😎 Deploy Preview https://deploy-preview-7240--nextflow-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Add the Claude Code hooks scaffolding (.claude/settings.json + README)
and the first development hook: format-editorconfig.sh.

After every Edit/Write/MultiEdit on a source file, it applies the
project .editorconfig rules via `eclint fix`. eclint is an optional
dependency: the hook skips silently when it is not installed (no global
npm install side effect). Runs with `async: true` so formatting never
blocks the conversation. Written in Bash; parses the hook payload with jq.

First in a stack that adds one hook per PR for incremental review.

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