cmd/update_report: format new formulae/casks as table#23058
Open
branchv wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts brew update’s update report output to display “New Formulae” and “New Casks” in a two-column, table-like format to better visually separate names from descriptions.
Changes:
- Collect new formulae and casks into
[name, description]rows instead of printing each line directly. - Add a
print_tablehelper to compute column width and render aligned output.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
33ef706 to
2f11e8d
Compare
MikeMcQuaid
reviewed
Jul 11, 2026
MikeMcQuaid
left a comment
Member
There was a problem hiding this comment.
Thanks! Code looks good but want to have some shared "print table" implementation.
| end | ||
|
|
||
| sig { params(items: T::Array[[String, String]]).void } | ||
| def print_table(items) |
Member
There was a problem hiding this comment.
Look at services/subcommand/list.rb, Library/Homebrew/cmd/info.rb: this would be at least the third "print a table" implementation we have. Would be good to extract all these to utils so they can be shared
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.
brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?Very minor style tweak to print new formulae/casks as a table with evenly spaced columns. Generally, I am mainly glancing at the package names and then read the description for anything that catches my eye. Currently, the names/descriptions blend in and can be noisy to me, especially with a lots of new packages.
This PR tries to help readers quickly distinguish the name from the description, which I find more readable
Example:
Before:
After: