-
Notifications
You must be signed in to change notification settings - Fork 0
feat(devloop): support pre-commit checks #32
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
Conversation
📝 WalkthroughWalkthroughValidator and documentation updates add execution of repository pre-commit hook scripts during validation: if Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
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.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@plugins/devloop/README.md`:
- Around line 36-38: The README and implementation disagree: the code currently
documents/checks for ./.husky/pre-commit and .git/hooks/pre-commit hook scripts
but the PR goal was to detect .pre-commit-config.yaml and run the Python
pre-commit tool (pre-commit run --all-files) while handling missing pre-commit;
update either the docs or the implementation to match: if you want to support
the pre-commit framework, modify the validator to detect .pre-commit-config.yaml
and invoke "pre-commit run --all-files" (gracefully handle when pre-commit is
not installed) and remove or clearly document hook-script fallback, or if you
intend to run arbitrary hook scripts, update README to explicitly state both ./
.husky/pre-commit and .git/hooks/pre-commit are checked and clarify the behavior
when those scripts are present versus when .pre-commit-config.yaml exists.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
plugins/devloop/README.mdplugins/devloop/README.zh-CN.mdplugins/devloop/agents/devloop-validator.md
🚧 Files skipped from review as they are similar to previous changes (1)
- plugins/devloop/README.zh-CN.md
🧰 Additional context used
📓 Path-based instructions (1)
**/*.md
📄 CodeRabbit inference engine (CLAUDE.md)
Markdown linting must ensure compliance with
.markdownlint.jsonconfiguration which disables MD013 and MD041 rules
Files:
plugins/devloop/README.mdplugins/devloop/agents/devloop-validator.md
🧠 Learnings (1)
📚 Learning: 2026-01-17T04:29:56.872Z
Learnt from: CR
Repo: lollipopkit/cc-plugins PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-17T04:29:56.872Z
Learning: Plugins should read per-project configuration from the target project's `.claude/<plugin-name>.local.md` file for local settings
Applied to files:
plugins/devloop/README.md
🔇 Additional comments (1)
plugins/devloop/agents/devloop-validator.md (1)
15-18: The primary inconsistency claim cannot be verified in the codebase.A thorough search found no evidence of PR objectives describing the
pre-committool (as opposed to git hook scripts). In fact, the README.md line 38 states: "If your repo contains a pre-commit hook script (e.g../.husky/pre-commit), the validator step will run it," which aligns with the implementation in lines 15-18. Both consistently reference git hook scripts, not thepre-committool. The git commit message ("feat(devloop): run pre-commit hook script in validator") suggests this behavior was intentional.However, the secondary concern about exit code handling is valid: the instructions should clarify whether hook script failures should halt validation or merely be reported. Consider adding guidance like:
- If the hook exits with a non-zero status, report the failure and stop validation
- If no hook script exists, report that you skipped this step.
Likely an incorrect or invalid review comment.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
| Notes: | ||
|
|
||
| - If your repo contains a pre-commit hook script (e.g. `./.husky/pre-commit`), the validator step will run it to help catch CI failures earlier. |
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.
Major inconsistency between PR objectives and implementation.
The PR objectives state that the validator should "run pre-commit checks (when configured and available)" by detecting .pre-commit-config.yaml and executing the pre-commit tool. However, the implementation actually runs git hook scripts at ./.husky/pre-commit or .git/hooks/pre-commit, which are different:
- Expected (per PR objectives): Detect
.pre-commit-config.yaml→ runpre-commit run --all-files→ handle whenpre-commitis not installed - Actual (per implementation): Check for
./.husky/pre-commitor.git/hooks/pre-commitscripts → run the script if it exists → skip if neither exists
The pre-commit framework (Python-based) and arbitrary git hook scripts are not the same thing. Many repositories use .git/hooks/pre-commit or Husky hooks without using the pre-commit tool at all.
Additionally, the documentation only mentions ./.husky/pre-commit as an example but omits that .git/hooks/pre-commit is also checked as a fallback.
📝 Suggested documentation improvement
If the implementation is correct and you intend to run arbitrary hook scripts:
-If your repo contains a pre-commit hook script (e.g. `./.husky/pre-commit`), the validator step will run it to help catch CI failures earlier.
+If your repo contains a pre-commit hook script (e.g., `./.husky/pre-commit` or `.git/hooks/pre-commit`), the validator step will run it to help catch CI failures earlier.If the PR objectives are correct and you intend to run the pre-commit tool:
-If your repo contains a pre-commit hook script (e.g. `./.husky/pre-commit`), the validator step will run it to help catch CI failures earlier.
+If your repo contains a `.pre-commit-config.yaml` configuration file, the validator step will run `pre-commit` checks to help catch CI failures earlier.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Notes: | |
| - If your repo contains a pre-commit hook script (e.g. `./.husky/pre-commit`), the validator step will run it to help catch CI failures earlier. | |
| Notes: | |
| - If your repo contains a pre-commit hook script (e.g., `./.husky/pre-commit` or `.git/hooks/pre-commit`), the validator step will run it to help catch CI failures earlier. |
| Notes: | |
| - If your repo contains a pre-commit hook script (e.g. `./.husky/pre-commit`), the validator step will run it to help catch CI failures earlier. | |
| Notes: | |
| - If your repo contains a `.pre-commit-config.yaml` configuration file, the validator step will run `pre-commit` checks to help catch CI failures earlier. |
🤖 Prompt for AI Agents
In `@plugins/devloop/README.md` around lines 36 - 38, The README and
implementation disagree: the code currently documents/checks for
./.husky/pre-commit and .git/hooks/pre-commit hook scripts but the PR goal was
to detect .pre-commit-config.yaml and run the Python pre-commit tool (pre-commit
run --all-files) while handling missing pre-commit; update either the docs or
the implementation to match: if you want to support the pre-commit framework,
modify the validator to detect .pre-commit-config.yaml and invoke "pre-commit
run --all-files" (gracefully handle when pre-commit is not installed) and remove
or clearly document hook-script fallback, or if you intend to run arbitrary hook
scripts, update README to explicitly state both ./ .husky/pre-commit and
.git/hooks/pre-commit are checked and clarify the behavior when those scripts
are present versus when .pre-commit-config.yaml exists.
Summary
Test plan
Closes #27
Summary by CodeRabbit
New Features
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.