Skip to content

fix: setup-huskyのcheck-file-lengthパスをscripts/からscript/に統一 - #538

Merged
keito4 merged 1 commit into
mainfrom
fix/setup-husky-script-path
Mar 7, 2026
Merged

fix: setup-huskyのcheck-file-lengthパスをscripts/からscript/に統一#538
keito4 merged 1 commit into
mainfrom
fix/setup-husky-script-path

Conversation

@keito4

@keito4 keito4 commented Mar 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • setup-husky.md 内の scripts/(複数形)を script/(単数形)に統一
  • repo-maintenance および各リポジトリへの実際の追加で使用している script/ に合わせた修正

変更箇所

  • L19: bash scripts/check-file-length.shbash script/check-file-length.sh
  • L25: mkdir -p scriptsmkdir -p script
  • L30: cp ... scripts/cp ... script/
  • L139: bash scripts/check-file-length.shbash script/check-file-length.sh

Test plan

  • /setup-husky 実行時に script/check-file-length.sh が正しいパスに配置されることを確認

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • Chores
    • Updated project setup process to automatically configure file-length checking parameters during initialization.
    • Reorganized build and check script directory structure for improved consistency across development environments.

repo-maintenanceおよび実際のリポジトリへの追加で使用している
script/(単数形)に合わせて修正。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Mar 7, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Updates 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

Cohort / File(s) Summary
Husky Setup Configuration
.claude/commands/setup-husky.md
Renames scripts directory to script, updates pre-commit hook invocations to reference script/check-file-length.sh, adds template copy step for .filelengthignore, and updates DevContainer environment path handling.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

released

Poem

🐰 Scripts became script, so neat and so small,
Templates copy like snowflakes in fall,
Hooks all adjusted with newfangled care,
DevContainers dance through the pre-commit air! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: standardizing the file path from 'scripts/' (plural) to 'script/' (singular) in the setup-husky file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/setup-husky-script-path

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 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.template at 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.template from 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:

  1. Documenting a fallback to the repo root template when the DevContainer path is unavailable
  2. Keeping both templates in sync
  3. 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

📥 Commits

Reviewing files that changed from the base of the PR and between 33937be and 28e2b79.

📒 Files selected for processing (1)
  • .claude/commands/setup-husky.md

@keito4
keito4 merged commit df4a4ba into main Mar 7, 2026
5 checks passed
@github-actions

github-actions Bot commented Mar 7, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.86.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions github-actions Bot added the released リリース済み label Mar 7, 2026
@keito4
keito4 deleted the fix/setup-husky-script-path branch March 20, 2026 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released リリース済み

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant