Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests for CLI #13

Open
3 tasks
chshersh opened this issue May 17, 2022 · 1 comment
Open
3 tasks

Tests for CLI #13

chshersh opened this issue May 17, 2022 · 1 comment
Labels
cli-options CLI options, parsers help wanted Extra attention is needed test

Comments

@chshersh
Copy link
Owner

chshersh commented May 17, 2022

CLI guidelines suggestion the following convention for named arguments:

  • Every short flag must have long version as well
  • Don’t have ambiguous or similarly-named commands. For example, having two subcommands called “update” and “upgrade” is quite confusing. You might want to use different words, or disambiguate with extra words.
  • The given parser doesn't try to parse pre-defined parsers: --help, --version, --numeric-version, etc.

Is it possible to check such things with optparse-applicative? 🤔

@chshersh chshersh added the test label May 17, 2022
@chshersh chshersh added the cli-options CLI options, parsers label Jun 25, 2022
@chshersh chshersh moved this to Todo in Iris Project Jun 25, 2022
@chshersh chshersh added the help wanted Extra attention is needed label Aug 8, 2022
@zetkez
Copy link
Contributor

zetkez commented Oct 30, 2022

Hi, its possible to check all three points. In optparse-applicative-common are low level function which can be used to check all three points.
mapParser (\_ x -> optionNames . optMain $ x) sampleParser gives the list of defined parsers.

What can be done here for this ticket?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli-options CLI options, parsers help wanted Extra attention is needed test
Projects
No open projects
Status: Todo
Development

No branches or pull requests

2 participants