-
-
Notifications
You must be signed in to change notification settings - Fork 589
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
Improve usage message printing #877
Conversation
Codecov Report
@@ Coverage Diff @@
## next #877 +/- ##
==========================================
- Coverage 37.97% 37.64% -0.33%
==========================================
Files 48 48
Lines 10567 10641 +74
==========================================
- Hits 4013 4006 -7
- Misses 6554 6635 +81
|
Thanks for simplifying the options interface! This has been bugging me for a while. 😅 I have some experimental code locally that uses an However, I am still struggling to find a nice way of merging the general handling in options.c and config_libconfig.c. Having the same logic in two places is kind of not nice. The first attempt using macros has turned out to be even messier... |
@tryone144 can i see your first attempt? |
I am currently away from my main machine on a spotty (at best) internet connection. I will push the partially working WIP code as soon as I get back. |
See this branch. This is out-of-date with
|
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Laying the usage message out by hand is tedious, also error prone because the option names are duplicated at 2 places and have to be consistent. Create a struct to hold the option names and help messages, and do layout programmatically. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
@tryone144 I've looked at your attempt. Nice idea but it did end up being quite messy. I think we can merge this PR as an incremental improvement. Eventually I think it might be a good idea to generate the config code from a python script or something. |
No description provided.