apple / apple/swift-argument-parser
Warn/validate commands with optional arguments before non-optional
Open
enhancement
- Dominant language
- Swift
- Stars
- 3.8k
- Forks
- 411
- Avg merge
- 7d 13h
- Merged PRs (30d)
- 17
Description
As described in #489, a command that declares an optional `@Argument` before a non-optional `@Argument` won't ever allow a single-argument call. It would be nice if ArgumentParser provided a validation warning / error so that authors could move to a different design.
Contributor guide
Research direction
Start by reading issue #489 and the handling of @Argument declarations in ArgumentParser. Determine where positional argument ordering can be validated, then add a warning or error for an optional argument before a non-optional one and verify that authors are directed toward a valid design.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100