commandlineparser / commandlineparser/commandline
Support for arguments that require each other but are optional
- 主要語言
- C#
- 星號
- 4.8k
- 分支
- 478
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Similar to the MutuallyExclusiveSet, it would be very helpful to be able to specify that if argument A is specified then argument B is required, but if A is not specified, then B is optional.
This may be a very specific use case, and I wouldn't even pursue it, but I'm having difficulty using the built in HelpWriter when my additional validation fails, since this validation is outside of the normal flow.
An alternative would be to support passing a Function to something like parser.CustomValidation() where the developer could get the parsed options (that were properly parsed) and run additional validation checks. If a check fails the developer can raise an exception.
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
先找出現有的 MutuallyExclusiveSet 和 HelpWriter 實作,然後檢視已解析的選項與驗證失敗如何流經剖析器。將要求的相依選用引數與提議的 CustomValidation 函式進行比較;完成的定義是實作一種已達成共識的行為,並以測試涵蓋其說明/錯誤處理。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- csharp
- 領域
- cli
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 30/100