Reject conflicting CLI operation modes
まだ誰も着手していません。
評価
調査の方向性
main.go のフラグ宣言とモード選択の switch から始めてください。issue から直接リンクされている箇所です。-scrape -upload -map のような競合する組み合わせで switch を確認し、実際のリクエストは実行せずに再現してください。-scrape、-parse、-upload のうち2つ以上を指定したコマンドが、処理を開始する前に分かりやすいメッセージを表示してゼロ以外の終了コードで終了すること、そして単一モードのコマンドとモード未指定時のヘルプ出力が従来どおり動作することが完了条件です。
索引モデルが issue の本文から書いたものです。
説明
Description
The CLI accepts multiple operation modes (-scrape, -parse, and -upload) at once. The switch in main.go silently chooses the first matching mode instead of reporting an invalid combination.
For example, -scrape -upload -map starts scraping even though the command requests both scraping and uploading.
Expected behavior:
- Reject any combination containing more than one operation mode with a clear message explaining that only one mode may be selected.
- Exit with a nonzero status before starting scraping, parsing, or uploading.
- Preserve valid single-mode commands and the existing help behavior when no mode is supplied.
Steps To Reproduce
- Build the executable with
make build(orbuild.bat buildon Windows). - Run:
./api-tools -scrape -upload -map - Observe that the CLI selects scraping instead of rejecting the conflicting modes.
The same problem applies to -scrape -parse, -parse -upload, and all three mode flags together. The example above performs a real map scrape; inspecting the mode-selection switch also demonstrates the problem without making requests.
Additional Context
Flag declarations and mode-selection switch in main.go.
Environment
- 主要言語
- Go
- スター
- 12
- フォーク
- 54
- 平均マージ
- 14日 1時間
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
UTDNebula/api-tools のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
Improve unit tests in sectionParser_test.go対応中かも @Sidd-Pelluru が 41 日前に担当しました。 オープンL1 recommended for recruits
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
Improve unit tests in discountsParser_test.go対応中かも @LikithInam が 27 日前に担当しました。 オープンL1 recommended for recruits
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
L1 recommended for recruits
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
Comet Calendar events with multiple locations対応中かも @azythromycin が 21 日前に担当しました。 オープンL1 Type: Bug Report
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
UTDNebula/api-tools の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
blocked-needs-validation bug
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
projectcapsule/capsule#2280 ·
メンテナーはふだん 1 日以内に返信
-
bug ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
kerti/balances-v2#801 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
[BUG] AdvancedCronJob validating webhook reports incorrect field paths for concurrencyPolicy and pod templates対応中かも @bhuvan-somisetty が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
openkruise/kruise#2650 ·
メンテナーはふだん 1 日以内に返信