Skip to content

Add brew style --fix --todo#21679

Merged
MikeMcQuaid merged 1 commit into
mainfrom
rubocop_fix_todo
Mar 6, 2026
Merged

Add brew style --fix --todo#21679
MikeMcQuaid merged 1 commit into
mainfrom
rubocop_fix_todo

Conversation

@MikeMcQuaid

Copy link
Copy Markdown
Member

Adds rubocop:todo comments for RuboCop violations that remain after auto-correction.

This was used in #21675

Copilot AI review requested due to automatic review settings March 6, 2026 15:50
@MikeMcQuaid
MikeMcQuaid enabled auto-merge March 6, 2026 15:53

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

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 --todo flag to brew style (enforced to require --fix) and plumb the option through to Homebrew::Style.
  • Update RuboCop invocation to include --disable-uncorrectable when todo is 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.

Comment thread Library/Homebrew/style.rb
Comment thread docs/Manpage.md Outdated
Comment thread manpages/brew.1 Outdated
Comment thread completions/zsh/_brew Outdated
Comment thread completions/fish/brew.fish Outdated
Adds `rubocop:todo` comments for RuboCop violations that remain after
auto-correction.
@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Mar 6, 2026
Merged via the queue into main with commit c3d69c8 Mar 6, 2026
39 checks passed
@MikeMcQuaid
MikeMcQuaid deleted the rubocop_fix_todo branch March 6, 2026 19:36
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