spf13 / spf13/cobra

Generated documentation includes hidden flags for commands

Open
#1,663 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/docs-generation kind/bug lifecycle/frozen
Dominant language
Go
Stars
44.6k
Forks
3.5k
PR merge metrics
No merged PRs in 30d

Description

I am trying to generate documentation for a CLI tool that has deprecated (and hidden) command flags, and I believe the generated documentation should not contain these flags unless they are specifically set to not be hidden after being deprecated. This is the behaviour that the generation follows for hidden commands, but not hidden flags on a non-hidden command.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by tracing the documentation-generation paths for hidden commands and flags, then compare their handling of deprecated hidden flags. Done means generated CLI documentation omits hidden deprecated flags unless they are explicitly made visible, matching hidden-command behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.