Add general constraint handling that can be the basis of depends/conflicts/either
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 259
- Forks
- 35
- PR merge metrics
- No merged PRs in 30d
Description
From https://github.com/ManageIQ/optimist/pull/130#issuecomment-1100475979, @nanobowers wrote:
> This seems like a specialization of a more general type of argument validation.
>
> More specifically, the condition you are trying to satisfy with either: is max==1 and min==1. Should we entertain cases where min/max are not 1? conflicts: is kinda like max==1 and min==ANY
>
> Was thinking something along the lines of:
>
> ```ruby
> validate min: , max: , args:
> ```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with PR #130 and the linked issue comment, then inspect how depends, conflicts, and either are represented in Optimist. Define and document a general validation interface that accepts min, max, and argument symbols, with tests showing it can support those constraint types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100