Skip to content
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

cli/parser: allow options to be hidden #11510

Merged
merged 1 commit into from Jun 9, 2021

Conversation

Rylan12
Copy link
Member

@Rylan12 Rylan12 commented Jun 9, 2021

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Allows options to be marked with hidden: true to hide them from brew help, manpages, and completions.

I went with hidden instead of undocumented because it looks like @MikeMcQuaid started to work on this a bit in #11075 and added a seemingly useless hidden keyword argument to the flag method. For compatibility (even though there's likely no one using it as it didn't do anything) I stuck with that. Another more minor benefit to hidden is that it won't require shifting the other arguments in the switch/flag/comma_array method call because hidden is fewer characters than description while undocumented is more.

I've also marked the --bottle flag of brew info as hidden.

@BrewTestBot
Copy link
Member

Review period will end on 2021-06-10 at 02:05:58 UTC.

@BrewTestBot BrewTestBot added the waiting for feedback Merging is blocked until sufficient time has passed for review label Jun 9, 2021
@MikeMcQuaid MikeMcQuaid added the critical Critical change which should be shipped as soon as possible. label Jun 9, 2021
@MikeMcQuaid
Copy link
Member

Great work, thanks @Rylan12!

@BrewTestBot
Copy link
Member

Review period skipped due to critical label.

@BrewTestBot BrewTestBot removed the waiting for feedback Merging is blocked until sufficient time has passed for review label Jun 9, 2021
@MikeMcQuaid MikeMcQuaid merged commit ed0ed9f into Homebrew:master Jun 9, 2021
@Rylan12 Rylan12 deleted the add-hidden-option-to-parser branch June 9, 2021 15:08
@github-actions github-actions bot added the outdated PR was locked due to age label Jul 10, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
critical Critical change which should be shipped as soon as possible. outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants