Skip to content

Suppress private visibility arguments in generate-manual output #665

@monoxygen

Description

@monoxygen

Arguments that specify private visibility, such as:

@Flag(help: ArgumentHelp(visibility: .private))
var hiddenFromHelp: Bool = false

show up in the man page generated by the generate-manual command:

.It Fl -hidden-from-help

If private visibility indicates that help should never be shown for that argument, it seems reasonable and desirable that it also not be visible in man pages.

ArgumentParser version: 1.5.0
Swift version: swift-driver version: 1.110 Apple Swift version 6.0 (swiftlang-6.0.0.4.52 clang-1600.0.21.1.3)

Checklist

  • If possible, I've reproduced the issue using the main branch of this package
  • I've searched for existing GitHub issues

Steps to Reproduce

  1. Define an argument with private visibility, such as the hiddenFromHelp argument above
  2. Build the client executable at path <executable>
  3. Run swift run generate-manual <executable> --output-directory <outputdir>

Expected behavior

hiddenFromHelp should not be included in the man page generated at <outputdir>

Actual behavior

hiddenFromHelp is included in the man page generated at <outputdir>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions