-
Notifications
You must be signed in to change notification settings - Fork 4
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
Feature:command line options autotomatic help generation #71
Conversation
Codecov Report
@@ Coverage Diff @@
## main #71 +/- ##
==========================================
- Coverage 92.01% 90.25% -1.77%
==========================================
Files 47 47
Lines 3208 3273 +65
Branches 626 641 +15
==========================================
+ Hits 2952 2954 +2
- Misses 186 248 +62
- Partials 70 71 +1
... and 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before reviewing, I don't see a rationale for this change or how it's intended to be used, so I don't know how to approach it. Mind explaining a bit?
(Also, for future PRs, please do so -- if only through private messaging -- before assigning it to me for review.)
Apologies Amy, we will fill you in on the complete rationale now via DMs. The main design goal here though is that having to manually write the help text output for a program and keep it in sync with the option lists is bugprone and difficult, so we wanted to have the framework generate the texts as much as possible automatically, á la Python's argparse, or Rust's Clap frameworks. |
Ack. Will review this first thing tomorrow together. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @dragonmux, there are several nitpicks here and there. I can give a more definite answer if you supply an example or tests that I can feed into Binary Ninja.
…y length of option_t's
… on optionAlternation_t's
…t for optional padding
4da4039
to
807f088
Compare
…tic options_t help
…port for optional padding
… for optionSet_t's
…Set_t::displayHelp() It is known by the author that the upper-casing of the meta name will break if given non-ASCII characters, but C++ does not provide a good means to solve this for now.
…e help display, cleaning up the API
…d a destructor for arguments_t so the compiler doesn't try to auto-gen them and fail
d8bea38
to
834ea99
Compare
In this PR we extend the substrate/command_line/options subsystem to allow the help strings contained within to then be used to generate automatic help listings for programs.