commandlineparser / commandlineparser/commandline

Incorrect verb mapped to default verb

未關閉
#667 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
C#
星號
4.8k
分支
478
PR 合併指標
30 天內沒有已合併 PR

描述

When verb is not specified it is mapped to default verb, when default verb specified. Awesome!

But I recently found that even a incorrect verb is provided it is mapped to default verb as well.

So how could throw an exception to user notifying that incorrect verb is given, while there is a default verb as well. I want to allow empty verb as well.

Empty verb => Default Verb
Incorrect verb => call **with no parsed**

[Here is a sample code snippet](https://dotnetfiddle.net/5iIN8E).

Thank you for the great library!

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

Start with the linked .NET Fiddle and trace how the library handles an unspecified verb, a configured default verb, and an invalid verb. Confirm the intended distinction in the issue: an empty verb uses the default, while an invalid verb is reported without parsed output; add or update coverage for these cases if the relevant tests are found.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
csharp
領域
cli
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。