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

zonemaster-cli: disallow CLI options that do not make sense together #403

Open
marc-vanderwal opened this issue Dec 3, 2024 · 0 comments
Labels
T-Bug Type: Bug in software or error in test case description
Milestone

Comments

@marc-vanderwal
Copy link
Contributor

There are combinations of command-line options to zonemaster-cli that do not make sense together, and should be rejected as usage errors.

Some examples:

  • A command line such as zonemaster-cli --help --list-tests --version --dump-profile doesn’t make sense at all, because all of these options select different modes. Any two of these options combined together should be rejected as an invalid command line.

  • In the synopsis, one line says zonemaster-cli [OPTIONS] --dump-profile. Because --dump-profile selects a different mode than the default one, there is just a small subset of OPTIONS that do make sense with --dump-profile. Which ones are acceptable, besides --profile=FILE? Combinations, such as the somewhat silly zonemaster-cli --dump-profile --no-json (because the --no-json applies to the output of zone testing and not profile dumps), should be rejected.

  • The error messages displayed on erroneous values for --level and --stop-level are inconsistent:

$ zonemaster-cli --stop-level=INVALID
Failed to recognize stop level 'INVALID'.
$ zonemaster-cli --level=INVALID
--level must be one of CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG, DEBUG2 or DEBUG3.
@marc-vanderwal marc-vanderwal added the T-Bug Type: Bug in software or error in test case description label Dec 3, 2024
@marc-vanderwal marc-vanderwal added this to the v2025.1 milestone Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Bug Type: Bug in software or error in test case description
Projects
None yet
Development

No branches or pull requests

1 participant