Repository navigation
fix(mangen): Hide hidden positionals from the SYNOPSIS - #6482
Merged
epage merged 2 commits intoAug 12, 2026
Merged
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
codeAnqiang-ma
force-pushed
the
fix/mangen-hidden-positional-synopsis
branch
from
August 12, 2026 18:32
648efc3 to
07c6fd2
Compare
Member
|
As a warning,
|
santoshkumarradha
pushed a commit
to Agent-Field/CodeAF
that referenced
this pull request
Oct 24, 2026
…#6482) Test-first two-commit PR: the hidden_positionals snapshot test lands at the first commit, the one-line filter in clap_mangen/src/render.rs at the second. Base 8e50ec8 (parent of the first commit), reference 07c6fd2 (the PR head); the reference patch spans the whole PR so it applies to the base, whose snapshot the fix commit edits. Pinned stable Rust 1.85.0 (the tree's MSRV) in the environment image. Controls: gold 1.00, negative 0.0 with both blockers failed. Assisted-by: CodeAF Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR try to solve?
Fixes #6481
clap_mangen's SYNOPSIS rendered positional arguments marked withArg::hide(true), whileusage.rs),So a man page could advertise a positional in the SYNOPSIS that is documented nowhere else on the page. This applies the same
is_hide_set()filter to the positionals loop insynopsis().Notes to reviewers
Follows the "test commit first, then fix commit" convention: the first commit snapshots the current behavior (
[secret]present in SYNOPSIS), the second commit's snapshot diff shows exactly what changed.Test evidence (
cargo test -p clap_mangen):Regenerating all snapshots with
SNAPSHOTS=overwriteonly changedhidden_positional.bash.roff, so no other rendering scenario is affected. Other workspace crates were not run.This PR was prepared with AI assistance; I reproduced the issue locally and reviewed every change.