apple / apple/swift-argument-parser

EnumerableFlag not pulling correct values

Open
#152 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
3.8k
Forks
411
Avg merge
7d 14h
Merged PRs (30d)
15

Description

![image](https://user-images.githubusercontent.com/32688/82160840-42e27180-9855-11ea-8c6a-9c69a6d80dd8.png)

Expect: --single, --double (raw values)
Get: --single-quote, --double-quote (the member names)

Current workaround: use the wonderful `name(for:)` method but it would be better not to have to.

Contributor guide

Open the contributing guide

Research direction

Reproduce the EnumerableFlag case described in the issue and trace how its values are obtained, starting with the existing name(for:) workaround. Done means the generated flags use the raw values (--single and --double) rather than the member names (--single-quote and --double-quote), with a regression test covering the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.