commandlineparser / commandlineparser/commandline
Custom error message for missing sequence values
- 主要言語
- C#
- スター
- 4.8k
- フォーク
- 478
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Hello, thanks for this great library.
I have a question regarding sequence values. I've set a property for sequence of values like this:
```csharp
[Value(0, Min = 1, HelpText = "Path(s) to file(s)", Hidden = true)]
public IEnumerable FilePaths { get; }
```
So at least one value is required. When I parse an empty list of arguments the generated help message contains this:
```
ERROR(S):
A sequence value not bound to option name is defined with few items than required.
```
That message is not very informative to the user (it also contains a grammatical error if I'm not mistaken: `few` should be `fewer`?). How can I customize it? Thanks in advance.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず、示されている C# の Value 属性と空の引数リストを使って問題を再現します。シーケンス値の検証とヘルプメッセージのフォーマット処理を追跡し、現在のテキストがどこで生成されているかを特定します。ユーザーが不足している値のメッセージをカスタマイズでき、デフォルトの文言が有益で文法的に正しくなれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp
- 領域
- cli
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 30/100