Files
everything-claude-code/docs/ja-JP/rules/ruby/hooks.md
Claude ec9ace9c54 docs: add native Japanese translation of ECC documentation (ja-JP)
Translate everything-claude-code repository to Japanese including:
- 17 root documentation files
- 60 agent documentation files
- 80 command documentation files
- 99 rule files across 18 language directories (common, angular, arkts, cpp, csharp, dart, fsharp, golang, java, kotlin, perl, php, python, ruby, rust, swift, typescript, web)
- 199 skill documentation files

Total: 455 files translated to Japanese with:
- Consistent terminology glossary applied throughout
- YAML field names preserved in English (name, description, etc.)
- Code blocks and examples untouched (comments translated)
- Markdown structure and relative links preserved
- Professional translation maintaining technical accuracy

This translation expands ECC accessibility to Japanese-speaking developers and teams.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-05-17 02:31:40 -04:00

1.8 KiB

paths
paths
**/*.rb
**/*.rake
**/Gemfile
**/Gemfile.lock
**/config/routes.rb

Ruby フック

このファイルは common/hooks.md を Ruby および Rails 固有のコンテンツで拡張します。

PostToolUse フック

binstub とチェックイン済みツールを優先するようにプロジェクトローカルのフックを設定する:

  • RuboCop: Ruby 編集後に bundle exec rubocop -A <file> またはプロジェクトのより安全なフォーマッタコマンドを実行する。
  • Brakeman: セキュリティに関わる Rails の変更後に bundle exec brakeman --no-pager を実行する。
  • テスト: 変更されたファイルに対して最も狭い範囲の bin/rails test ... または bundle exec rspec ... コマンドを実行する。
  • Bundler audit: Gemfile または Gemfile.lock が変更され、プロジェクトに bundler-audit がインストールされている場合、bundle exec bundle-audit check --update を実行する。

警告

  • アプリケーションコードにコミットされた debuggerbinding.irbbinding.pryputsppp の呼び出しに対して警告する。
  • 編集が CSRF 保護を無効にしたり、マスアサインメントを拡大したり、パラメータ化なしで生の SQL を追加した場合に警告する。
  • マイグレーションが可逆的なパスや文書化されたロールアウト計画なしにデータを破壊的に変更する場合に警告する。

CI ゲートの提案

bundle exec rubocop
bundle exec brakeman --no-pager
bin/rails test
bundle exec rspec

プロジェクトに存在するコマンドのみを使用する。メンテナーの承認なしに新しいフック依存関係をインストールしない。