-
Notifications
You must be signed in to change notification settings - Fork 362
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
Return empty string in Option::get_name() for hidden options #333
Conversation
include/CLI/Option.hpp
Outdated
@@ -627,6 +627,8 @@ class Option : public OptionBase<Option> { | |||
std::string get_name(bool positional = false, //<[input] Show the positional name | |||
bool all_options = false //<[input] Show every option | |||
) const { | |||
if (detail::to_lower(get_group()).empty()) |
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.
Don't think we need detail::to_lower()
call.
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.
wouldn't appear so if we are just checking empty()
Please rebase and force-with-lease, please. CI should be fixed. You might need to run pre-commit, but unlikely. I'll do it if you need me to. |
Thanks for fixing CI. Added a few more commits. |
Codecov Report
@@ Coverage Diff @@
## master #333 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 12 12
Lines 3175 3177 +2
=====================================
+ Hits 3175 3177 +2
Continue to review full report at Codecov.
|
Thanks! |
Fixes #332