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

Return empty string in Option::get_name() for hidden options #333

Merged
merged 4 commits into from
Oct 27, 2019
Merged

Return empty string in Option::get_name() for hidden options #333

merged 4 commits into from
Oct 27, 2019

Conversation

skannan89
Copy link
Contributor

Fixes #332

@@ -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())
Copy link
Contributor Author

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.

Copy link
Collaborator

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()

@henryiii
Copy link
Collaborator

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.

@skannan89
Copy link
Contributor Author

Thanks for fixing CI. Added a few more commits.

@codecov
Copy link

codecov bot commented Oct 25, 2019

Codecov Report

Merging #333 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #333   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          12     12           
  Lines        3175   3177    +2     
=====================================
+ Hits         3175   3177    +2
Impacted Files Coverage Δ
include/CLI/Option.hpp 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 343a730...228e828. Read the comment docs.

@henryiii henryiii merged commit 2bea398 into CLIUtils:master Oct 27, 2019
@henryiii
Copy link
Collaborator

Thanks!

@henryiii henryiii added this to the v1.9 milestone Dec 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hidden option is displayed with (no|incorrect) args
4 participants