Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`Command.Validators` should be invoked only when the command options are arguments are valid

オープン
#2,779 コメント 5 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
csharp
領域
cli

調査の方向性

ソースファイルもテストも指定されていません。まず関連する 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

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

dotnet/command-line-api のほかの issue

dotnet/command-line-api の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。