`Command.Validators` should be invoked only when the command options are arguments are valid
まだ誰も着手していません。
評価
調査の方向性
ソースファイルもテストも指定されていません。まず関連する issue #2645 を読み、オプションと引数のバリデーションに対して Command のバリデータがどの位置で呼び出されるかを追跡してください。issue で要求されている動作と順序が一致するか、または Command のバリデータがバリデーション済みのオプション値と引数値を読み取れない理由をドキュメントで明確に説明できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
For Option<T> and Argument<T>, custom validators are invoked before the conversion from the token (string) to T. It's well behavior for the use case such the production of better error messages, even so the behavior is not well documented (related #2645).
For Command, as same as above, validators are invoked before its options and arguments today, but it's useless.
I expect to be able to use Command validators for the complex validation of our command line. In other words, the options and arguments should be validated with their definitions (Arity, AllowMultipleArgumentsPerToken, CustomParser, etc, and Validators) first, then only when no one have any errors, the command validators should be invoked.
Or, reading the values of options and arguments from Command.Validators is incorrect? If so, better documentation is needed.
- 主要言語
- C#
- スター
- 3.7k
- フォーク
- 434
- 平均マージ
- 6時間 27分
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
dotnet/command-line-api のほかの issue
-
German localization is incomplete対応中かも @b-v-d-e-v が 17 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
dotnet/command-line-api#2852 ·
-
Incomplete French (fr) translation: RequiredOptionWasNotProvided not translated対応中かも @JPBlanc が 115 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
dotnet/command-line-api#2822 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
dotnet/command-line-api#2792 · コメント 2 件 · リアクション 16 件 ·
-
`Argument.Arity` modify internal state on first get access.対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
dotnet/command-line-api#2704 ·
-
GetCompletions should check exit code of invoked application対応中かも @baradgur が 1286 日前に担当しました。 オープンArea-Completions bug help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
dotnet/command-line-api#2137 · コメント 1 件 · リアクション 3 件 ·
dotnet/command-line-api の issue をすべて見る
似ている issue
-
bug priority: P2
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
:watch: Not Triaged dotnet-csharp/svc fundamentals/subsvc
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
Wrong values of Kernel32.FileShare.Delete and Kernel32.FileAttributes.PosixSemantics対応中かも @ElectLive が今日担当しました。 オープンbug good first issue help wanted
難易度 1/5 1時間未満 初心者へのやさしさ 83/100
ForNeVeR/TruePath#241 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
files-community/Files#19047 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信