Skip to content

Refactor CLI to use positional args and support multiple test paths#9

Merged
minami110 merged 1 commit intomainfrom
feature/fixoptions
Feb 20, 2026
Merged

Refactor CLI to use positional args and support multiple test paths#9
minami110 merged 1 commit intomainfrom
feature/fixoptions

Conversation

@minami110
Copy link
Copy Markdown
Owner

Summary

  • --path フラグを廃止し、positional arguments に変更 (省略時はデフォルト ".")
  • -v / -V 短縮フラグを削除 (--verbose / --version のみ残す)
  • 複数パスをサポート: gdunit4-test-runner tests/unit tests/integration foo.gd
  • Config.TestPath stringTestPaths []string
  • detector.Result.ResPath stringResPaths []string; 異なるプロジェクト間のパス混在を検証
  • runner.BuildArgs / Run[]string を受け取り、パスごとに -a フラグを生成
  • README.md・CLAUDE.md を新インターフェースに合わせて更新

Before:

gdunit4-test-runner --path tests/unit --godot-path /usr/bin/godot -v

After:

gdunit4-test-runner tests/unit
gdunit4-test-runner --godot-path /usr/bin/godot --verbose tests/unit tests/integration
gdunit4-test-runner   # パス省略時は "." (カレントディレクトリ)

Test plan

  • go test ./... がすべてパスする
  • go build ./cmd/gdunit4-test-runner が成功する
  • ./gdunit4-test-runner --help が新しい Usage を表示する
  • ./gdunit4-test-runner --version が正常に動作する

🤖 Generated with Claude Code

- Replace --path flag with positional arguments (default: ".")
- Remove -v/-V shorthand flags; keep --verbose/--version only
- Config.TestPath → TestPaths []string
- detector.Result.ResPath → ResPaths []string; Detect() validates all
  paths belong to the same Godot project
- runner.BuildArgs/Run accept []string, generating one -a flag per path
- Update README.md and CLAUDE.md to reflect new interface

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@minami110 minami110 self-assigned this Feb 20, 2026
@minami110 minami110 merged commit a4c8679 into main Feb 20, 2026
1 check passed
@minami110 minami110 deleted the feature/fixoptions branch February 20, 2026 09:43
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