Skip to content

Use visibility.base for .longWithSingleDash help names - #985

Open
aniketatgithub wants to merge 1 commit into
apple:mainfrom
aniketatgithub:fix-901-helpname-visibility
Open

aniketatgithub wants to merge 1 commit into
apple:mainfrom
aniketatgithub:fix-901-helpname-visibility

Conversation

@aniketatgithub

Copy link
Copy Markdown

Fixes #901.

In NameSpecification.generateHelpNames(visibility:), the .longWithSingleDash case interpolated the whole visibility struct instead of visibility.base like the .long case does. Since ArgumentVisibility has no CustomStringConvertible, a non-default visibility help flag with single-dash long names came out as e.g. -show-help-ArgumentVisibility(base: hidden) instead of -show-help-hidden.

One-line fix: use visibility.base in the .longWithSingleDash case, matching .long. Added singleDashCustomHelpNamesUseVisibilityBase, which fails before the fix (produces the struct-dump name) and passes after.

Checklist

  • I've added at least one test that validates that my change is working, if appropriate
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

Signed-off-by: Aniket <aniketkomailkro@gmail.com>

This branch has not been deployed

No deployments
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.

Bug: Inconsistent visibility string interpolation in generateHelpNames for .longWithSingleDash vs .long names

1 participant