Enum list options not displayed in help text
まだ誰も着手していません。
評価
調査の方向性
まず、報告に示されている Parser と HelpText.AutoBuild の設定を使用して、IEnumerable 型のオプションで問題を再現します。AddEnumValuesToHelpText がコレクションのオプション型をどのように処理するかを追跡します。完了条件は、生成された --help の出力にリストオプションの enum の有効な値が含まれ、スカラー enum に対する既存の動作が維持されることです。
索引モデルが issue の本文から書いたものです。
説明
Apologies if this question/bug was already open
Describe the bug
The property: HelpText.AddenumValuesToHelpText does not work when the option is of type IEnummerable<{Enum}>. I'm guessing the list is masking the fact that its containing an enum.
Is it possible to have the same Valid values: {enum values} in the help text to be displayed when its a list of enums?
To Reproduce
- Create an option of type
IEnummerable<{Enum}> - configure a parser as follows:
var parser = new Parser(with =>
{
with.CaseInsensitiveEnumValues = true;
with.HelpWriter = null;
with.AutoVersion = false;
});
var parserResult = parser.ParseArguments<TArgs>(args.SplitArgs());
parserResult
.WithNotParsed(_ =>
{
var helpText = HelpText.AutoBuild(parserResult, h =>
{
h.AutoVersion = false;
h.Heading = string.Empty;
h.Copyright = string.Empty;
h.AddEnumValuesToHelpText = true;
return h;
});
Console.WriteLine(helpText);
});
- use the --help to find no
Valid values: {enum values}in the help text.
Expected behavior
I expected a list of enums to still show available options
Screenshots
- 主要言語
- C#
- スター
- 4.8k
- フォーク
- 478
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
commandlineparser/commandline のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
commandlineparser/commandline#951 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
commandlineparser/commandline#880 · リアクション 2 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
commandlineparser/commandline#952 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
commandlineparser/commandline#948 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
commandlineparser/commandline#947 ·
commandlineparser/commandline の issue をすべて見る
似ている issue
-
Documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
cake-build/cake#5024 ·
-
Frontend status/draft TechnicalDebt
難易度 2/5 1〜2日 初心者へのやさしさ 75/100
Altinn/altinn-auth#4143 ·
-
.NET Flaky Test Testing Tests
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
getsentry/sentry-dotnet#5617 · コメント 1 件 ·
-
:watch: Not Triaged dotnet-fsharp/svc
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
Client customer-reported needs-team-attention question Service Attention WebPubSub
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Azure/azure-sdk-for-net#63292 · コメント 3 件 · リアクション 1 件 ·