apple / apple/swift-argument-parser

Warn/validate commands with optional arguments before non-optional

Open
#499 1 comment 1 reaction 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.