-
Notifications
You must be signed in to change notification settings - Fork 738
enhance: Upgrade Claude Code hooks with advanced JSON reporting #6429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
+832
−0
Conversation
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
✅ Deploy Preview for nextflow-docs-staging canceled.
|
@edmundmiller
edmundmiller
force-pushed
the
claude-hooks-enhanced
branch
2 times, most recently
from
September 25, 2025 10:35
500782e
to
41d9944
Compare
- Add EditorConfig enforcement hook using eclint - Add smart test runner that maps source files to test classes - Support all modules (nextflow, nf-commons, nf-lang, etc.) and plugins - Configure hooks to run on Edit/Write/MultiEdit operations - Add comprehensive documentation in .claude/README.md - Hooks provide immediate feedback on code formatting and test results Signed-off-by: Edmund Miller <edmund.miller@seqera.io>
@edmundmiller
edmundmiller
force-pushed
the
claude-hooks-enhanced
branch
from
September 25, 2025 12:35
41d9944
to
f856d9f
Compare
.claude/hooks/run-tests.py
Outdated
elif 'assertionerror' in failure_type or 'assertion' in failure_message:
suggestions.append(f"Review test assertions in {failed_test['name']}")
elif 'comparionfailure' in failure_type:
suggestions.append(f"Check expected vs actual values in {failed_test['name']}")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Typo in Function Name Causes JUnit Exception Handling Failure
The generate_failure_suggestions
function contains a typo, comparionfailure
, which should be comparisonfailure
. This prevents the hook from correctly identifying JUnit ComparisonFailure
exceptions, so specific suggestions for these test failures aren't generated.
@edmundmiller
edmundmiller
force-pushed
the
claude-hooks-enhanced
branch
3 times, most recently
from
October 8, 2025 21:07
312bb99
to
7948f91
Compare
This commit adds a complete set of Claude Code hooks to improve the development experience for Nextflow: **Immediate Formatting (PostToolUse):** - format-editorconfig.py: Applies editorconfig rules to all source files - format-idea.py: Formats Groovy files with IntelliJ IDEA code style **Build & Test Validation (Stop):** - check-build.py: Runs 'make compile' to catch compilation errors - run-tests.py: Runs corresponding test class for edited files **Subagent Validation (SubagentStop):** - check-build.py: Verifies subagent changes compile successfully **Benefits:** - Instant code formatting after each edit - Build errors caught before tests run - Tests only run once when agent finishes (not after each edit) - Subagents validate compilation but skip slower test runs - Non-blocking when optional tools (IDEA) not available **Configuration:** All hooks configured in .claude/settings.json with appropriate timeouts and proper event triggers for optimal development workflow. Signed-off-by: Edmund Miller <edmund.miller@seqera.io>
@edmundmiller
edmundmiller
force-pushed
the
claude-hooks-enhanced
branch
from
October 9, 2025 01:11
7948f91
to
87253b3
Compare
@pditommaso
pditommaso
force-pushed
the
master
branch
from
October 9, 2025 20:41
b7b4221
to
c1114bc
Compare
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.
Uh oh!
There was an error while loading. Please reload this page.
Summary
This PR enhances the Claude Code development hooks with advanced JSON reporting capabilities, transforming them from simple pass/fail indicators into intelligent development assistants.
Enhanced Features
🔧 EditorConfig Hook (
format-editorconfig.py
)🧪 Test Runner Hook (
run-tests.py
)📊 Advanced JSON Output
decision: "block"
,suppressOutput: true
,systemMessage
Benefits