Add brew style --fix --todo#21679
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new brew style --todo option that, when used with --fix, aims to leave rubocop:todo comments for remaining (uncorrectable) RuboCop offenses, and updates user-facing docs/completions accordingly.
Changes:
- Add
--todoflag tobrew style(enforced to require--fix) and plumb the option through toHomebrew::Style. - Update RuboCop invocation to include
--disable-uncorrectablewhentodois enabled. - Update manpage/docs/completions and add an RSpec assertion for the new RuboCop flag.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| manpages/brew.1 | Documents new --todo option in the brew style manpage. |
| docs/Manpage.md | Documents new --todo option in Markdown manpage source. |
| completions/zsh/_brew | Adds --todo completion entry for brew style. |
| completions/fish/brew.fish | Adds --todo completion entry for brew style. |
| completions/bash/brew | Adds --todo to bash completion flags list for brew style. |
| Library/Homebrew/test/style_spec.rb | Adds a spec asserting --disable-uncorrectable is passed when todo: true. |
| Library/Homebrew/style.rb | Adds todo: plumbing and passes --disable-uncorrectable to RuboCop. |
| Library/Homebrew/sorbet/rbi/dsl/homebrew/dev_cmd/style_cmd.rbi | Adds Sorbet RBI for todo? CLI arg accessor. |
| Library/Homebrew/dev-cmd/style.rb | Adds --todo switch (depends on --fix) and passes todo: into style options. |
Files not reviewed (1)
- Library/Homebrew/sorbet/rbi/dsl/homebrew/dev_cmd/style_cmd.rbi: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
MikeMcQuaid
force-pushed
the
rubocop_fix_todo
branch
from
March 6, 2026 18:51
5e9b01a to
f00db26
Compare
p-linnane
approved these changes
Mar 6, 2026
Adds `rubocop:todo` comments for RuboCop violations that remain after auto-correction.
MikeMcQuaid
force-pushed
the
rubocop_fix_todo
branch
from
March 6, 2026 18:58
f00db26 to
481a766
Compare
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.
Adds
rubocop:todocomments for RuboCop violations that remain after auto-correction.This was used in #21675