Skip to content

feat: 全サブコマンドに PATH 位置引数を追加#75

Merged
makinzm merged 4 commits intomainfrom
feat/pr75-target-path-argument
Mar 24, 2026
Merged

feat: 全サブコマンドに PATH 位置引数を追加#75
makinzm merged 4 commits intomainfrom
feat/pr75-target-path-argument

Conversation

@makinzm
Copy link
Copy Markdown
Owner

@makinzm makinzm commented Mar 24, 2026

Summary

  • 全サブコマンド(check, analyze, report external, init)に位置引数 [PATH] を追加
  • mille check ./path/to/project のように任意ディレクトリを対象に検査可能
  • デフォルト . で既存動作と完全互換
  • CommonArgs 構造体 + Command::common() exhaustive match により、新コマンド追加時に PATH 対応を忘れるとコンパイルエラー

Test plan

  • args.rs unit test 9件追加(全コマンドの PATH パース確認)
  • E2E テスト 3件追加(別ディレクトリからの check 実行、存在しないパスのエラー)
  • 既存テスト全 584 件が通過することを確認
  • CI 通過確認

🤖 Generated with Claude Code

makinzm and others added 4 commits March 24, 2026 22:18
- args.rs: CommonArgs.path / Command::common() を使う unit test 9件
- e2e_check.rs: PATH 位置引数で別ディレクトリから check を実行するテスト 3件

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- CommonArgs 構造体を導入し #[command(flatten)] で全コマンドに埋め込み
- Command::common() で exhaustive match → 新コマンド追加時にコンパイルエラーで強制
- runner.rs: apply_path() で CWD を変更してから各サブコマンドを実行
- デフォルト "." で既存動作と完全互換

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@makinzm makinzm merged commit 201eaf8 into main Mar 24, 2026
8 checks passed
@makinzm makinzm deleted the feat/pr75-target-path-argument branch March 24, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant