enhance: Upgrade Claude Code hooks with advanced JSON reporting#6429
Closed
edmundmiller wants to merge 2 commits intomasterfrom
Closed
enhance: Upgrade Claude Code hooks with advanced JSON reporting#6429edmundmiller wants to merge 2 commits intomasterfrom
edmundmiller wants to merge 2 commits intomasterfrom
Conversation
✅ Deploy Preview for nextflow-docs-staging canceled.
|
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>
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.
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.
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>
7948f91 to
87253b3
Compare
Member
|
This PR adds a lot of stuff, but it's not clear to me what the value is. Maybe try a more focused PR with a clear valuable change |
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.
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,systemMessageBenefits