-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Use VisibleFlags during doc generation #999
Conversation
Codecov Report
@@ Coverage Diff @@
## master #999 +/- ##
=========================================
Coverage ? 73.38%
=========================================
Files ? 32
Lines ? 2435
Branches ? 0
=========================================
Hits ? 1787
Misses ? 539
Partials ? 109
Continue to review full report at Codecov.
|
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, defer to @saschagrunert though!
Thanks for the fix, @subpop :) |
Hidden commands are excluded during doc generation but hidden flags are not. Using VisibleFlags() instead of the Flags slice fixes that. Signed-off-by: Link Dupont <link@sub-pop.net>
777b332
Ugh, sorry. Rebased this change onto master and it invalidated the approvals. :( |
Motivation
Hidden commands are excluded during doc generation but hidden flags are not. This results in generated documentation (man pages and markdown) including hidden flags in the output. Using
VisibleFlags()
instead of theFlags
slice filters out hidden flags before preparing them for document output.Testing
I added a hidden flag to the testApp. Test output should remain unchanged, since hidden flags should not be included in documentation output.