Skip to content

doc: Clarify version explanation of --json info#22877

Merged
MikeMcQuaid merged 1 commit into
Homebrew:mainfrom
okuramasafumi:improve-info-json
Jul 5, 2026
Merged

doc: Clarify version explanation of --json info#22877
MikeMcQuaid merged 1 commit into
Homebrew:mainfrom
okuramasafumi:improve-info-json

Conversation

@okuramasafumi

Copy link
Copy Markdown
Contributor

For formula, we don't have to specify v2.
This change makes it clear that we need to specify v2 only for cask. It now also explains how to specify version.


  • Have you followed our Contributing guidelines?
  • Have you checked for other open Pull Requests for the same change?
  • Have you explained what your changes do? Performance claims (e.g. "this is faster") must include Hyperfine benchmarks.
  • Have you explained why you'd like these changes included, not just what they do?
  • For bug fixes, have you given step-by-step brew commands to reproduce the bug?
  • Have you written new tests (excluding integration tests)? Here's an example.
  • [] Have you successfully run brew lgtm (style, typechecking and tests) locally?

brew lgtm failed, but it's not related to this change.

==> brew style --changed --fix
Library/Homebrew/cmd/info.rb:20:5: C: Style/Documentation: Missing top-level documentation comment for class Homebrew::Cmd::Info.
    class Info < AbstractCommand
    ^^^^^^^^^^
Library/Homebrew/cmd/info.rb:21:7: C: Style/Documentation: Missing top-level documentation comment for class Homebrew::Cmd::Info::NameSize.
      class NameSize < T::Struct
      ^^^^^^^^^^^^^^

1 file inspected, 2 offenses detected
Error: Failure while executing; `/opt/homebrew/bin/brew style --changed --fix` exited with 1.

  • AI was used to generate or assist with generating this PR.

Copilot AI review requested due to automatic review settings June 25, 2026 14:18

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4eb7830571

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Library/Homebrew/cmd/info.rb Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the brew info command’s CLI help text to better explain the --json version behavior, especially distinguishing between formula and cask output.

Changes:

  • Clarifies the --json flag description for brew info, emphasizing that --json=v2 is needed for casks while formula defaults to v1.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Library/Homebrew/cmd/info.rb Outdated

@MikeMcQuaid MikeMcQuaid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@MikeMcQuaid MikeMcQuaid enabled auto-merge July 5, 2026 17:53
@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Jul 5, 2026
Merged via the queue into Homebrew:main with commit 4b09a41 Jul 5, 2026
40 checks passed
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.

3 participants