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

Print flags in sorted order when showing --help output #4034

Closed
idoqo opened this issue Apr 8, 2021 · 2 comments
Closed

Print flags in sorted order when showing --help output #4034

idoqo opened this issue Apr 8, 2021 · 2 comments

Comments

@idoqo
Copy link
Contributor

idoqo commented Apr 8, 2021

The output of $component --help (e.g., rule --help) doesn't seem to follow any pattern currently. It will help to make the output more deterministic, say by printing the supported arguments and flags in sorted order.

For example, while working on #3993, I noticed that small changes to how flags get parsed resulted in huge diffs in the generated docs (which in turn is generated from the help output). Outputting sorted flags will:

  • help ensure that changes in the generated docs are minimal when flags are moved around in the code.
  • group related flags (for instance, flags starting with --query.* would end up being grouped together).
@bwplotka
Copy link
Member

bwplotka commented Apr 9, 2021

Help wanted. It would be helpful! 🤗

@wiardvanrij
Copy link
Member

Can be closed :)

@idoqo idoqo closed this as completed Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants