cmd/update_report: format new formulae/casks as table - #23058
Conversation
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
left a comment
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) |
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 pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
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: