apple / apple/swift-argument-parser
Improved documentation for parseAsRoot
- Dominant language
- Swift
- Stars
- 3.8k
- Forks
- 411
- Avg merge
- 7d 14h
- Merged PRs (30d)
- 15
Description
When I read "Manual Parsing and Testing" I got the impression that `parseAsRoot` would only ever return one of the Math subcommands but I discovered that that wasn't the case when I tried using it. When I went looking to find out why `-h` stopped working for me I found that a `HelpCommand` was returned by `parseAsRoot`. It worked in your example as you execute the `run` method of the `command` in the default case of the switch.
I believe that a short note to that effect would help others.
Also, in the example variance is calculated as the sum of the squared errors when it is actually the mean.
Contributor guide
Research direction
Start with the “Manual Parsing and Testing” documentation and its parseAsRoot example. Confirm that parseAsRoot can return HelpCommand and check the variance calculation; done means the documentation explains the returned command behavior and uses the mean squared error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- cli, documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100