fix: setup-huskyのcheck-file-lengthパスをscripts/からscript/に統一 - #538
Conversation
repo-maintenanceおよび実際のリポジトリへの追加で使用している script/(単数形)に合わせて修正。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthroughUpdates the Husky setup documentation and configuration by renaming the scripts directory to script, updating all related pre-commit hook path references, and adding a step to copy the file-length ignore template during initialization. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.claude/commands/setup-husky.md (1)
33-37: Note: Template path only available in DevContainer.The path
/usr/local/share/config-templates/.filelengthignore.templateat line 35 only exists inside the DevContainer environment. Developers running this setup outside the container will not be able to copy this template unless they use the fallback.filelengthignore.templatefrom the repo root.Additionally, the two template files are not in sync: the repo root version has 16 lines while the DevContainer version has 31 lines (includes additional patterns for build outputs, tests, and lock files).
Consider either:
- Documenting a fallback to the repo root template when the DevContainer path is unavailable
- Keeping both templates in sync
- Using only the repo root template for consistency across environments
Example fallback approach
# テンプレートから .filelengthignore をコピー if [ -f /usr/local/share/config-templates/.filelengthignore.template ]; then cp /usr/local/share/config-templates/.filelengthignore.template .filelengthignore +elif [ -f .filelengthignore.template ]; then + cp .filelengthignore.template .filelengthignore fi🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/commands/setup-husky.md around lines 33 - 37, The setup script in .claude/commands/setup-husky.md currently only copies /usr/local/share/config-templates/.filelengthignore.template which exists only in the DevContainer; update the script to first attempt the DevContainer path and if not present fall back to the repo-root .filelengthignore.template (or alternatively choose to always use the repo-root template for consistency), and ensure the chosen template contains the full 31-line content (sync or replace the shorter repo-root file if you pick that); adjust the copy logic and any comments to reflect the fallback behavior so non-container developers get a usable .filelengthignore.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.claude/commands/setup-husky.md:
- Around line 33-37: The setup script in .claude/commands/setup-husky.md
currently only copies
/usr/local/share/config-templates/.filelengthignore.template which exists only
in the DevContainer; update the script to first attempt the DevContainer path
and if not present fall back to the repo-root .filelengthignore.template (or
alternatively choose to always use the repo-root template for consistency), and
ensure the chosen template contains the full 31-line content (sync or replace
the shorter repo-root file if you pick that); adjust the copy logic and any
comments to reflect the fallback behavior so non-container developers get a
usable .filelengthignore.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 17dd2219-cab0-495c-9c39-0b229cbdea38
📒 Files selected for processing (1)
.claude/commands/setup-husky.md
|
🎉 This PR is included in version 1.86.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
setup-husky.md内のscripts/(複数形)をscript/(単数形)に統一repo-maintenanceおよび各リポジトリへの実際の追加で使用しているscript/に合わせた修正変更箇所
bash scripts/check-file-length.sh→bash script/check-file-length.shmkdir -p scripts→mkdir -p scriptcp ... scripts/→cp ... script/bash scripts/check-file-length.sh→bash script/check-file-length.shTest plan
/setup-husky実行時にscript/check-file-length.shが正しいパスに配置されることを確認🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes