Claude Code hooks (1/4): EditorConfig formatting#7240
Open
edmundmiller wants to merge 1 commit into
Open
Conversation
✅ Deploy Preview for nextflow-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This was referenced Jun 18, 2026
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>
97108a2 to
4f0e9c8
Compare
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.
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 splitinto 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 withjq(the only addeddependency; hooks no-op silently if
jqis absent).This PR — EditorConfig enforcement (PostToolUse, async)
hooks/format-editorconfig.sh: after everyEdit/Write/MultiEditon a source file(
.groovy/.java/.gradle/.md/.txt/.yml/.yaml/.json), apply the project.editorconfigrules viaeclint fix.eclintis an optional dependency — the hook skips silently if it isn't installed(no global
npm installside effect).async: trueso formatting happens in the background and never blocks theconversation.
.claude/settings.json+.claude/README.mdscaffolding the later PRs build on.The stack (review front-to-back)
make compileon Stop/SubagentStop — Claude Code hooks (2/4): build check on Stop #7241tests/*.nfcase (asyncRewake) — Claude Code hooks (5/5): integration test runner #7244Each later PR targets the previous branch, so
settings.json/README.mdgrow cleanly withno cross-PR conflicts.
🤖 Generated with Claude Code