Skip to content

rubocops: remove outdated text cops, move test files for lines cops - #24524

Merged
MikeMcQuaid merged 1 commit into
mainfrom
rubocop-text-cleanup
Nov 7, 2026
Merged

MikeMcQuaid merged 1 commit into
mainfrom
rubocop-text-cleanup

Conversation

@cho-m

@cho-m cho-m commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Continuing with more clean up:


  • 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 brew benchmark results.
  • 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?

  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

@coderabbitai

coderabbitai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Bug Fixes

    • Formula audits no longer flag Go language imports, formula lookup calls, or dependency ensure commands. This updates which patterns are reported during formula checks.
  • Chores

    • Audit tests now use stricter type checking, with existing test expectations unchanged.

FormulaAudit::Text no longer reports three patterns as offenses. Its related offense examples are removed. Line cop spec files now use strict Sorbet typing and include return signatures.

Changes: Text audit checks

Layer / File(s) Summary
Remove text audit checks
Library/Homebrew/rubocops/text.rb, Library/Homebrew/test/rubocops/text_spec.rb
The cop no longer checks for require "language/go", Formula.factory(name), or dep ensure. The corresponding offense tests are removed.

Line cop spec typing

Layer / File(s) Summary
Tighten line cop spec typing
Library/Homebrew/test/rubocops/lines/*_spec.rb
The spec files change their Sorbet directive to strict and add return signatures. make_check_spec.rb also adds signatures for its path helper and before hook.
Merge Risk: Minimal · up to 3c83e

This change removes outdated formula audit checks and tightens typing in test files. No merge-blocking risk was identified in the supplied context.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the two main parts of the change: removing outdated text cops and moving test files for the lines cops. The changeset removes the text cop checks for language/go, Formula.factory and d…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description states that the PR removes the Formula.factory, language/go and dep cop references, and moves rubocop/lines test files out of rubocop/text while adding strict typing. The changeset mat…
Full details: Title check

Explanation

The title names the two main parts of the change: removing outdated text cops and moving test files for the lines cops. The changeset removes the text cop checks for language/go, Formula.factory and dep ensure, and moves the lines cop specs to strict typing. The title is specific and accurate, though it is slightly broad in scope. It does not name the strict typing change, but that is a secondary detail.

Full details: Description check

Explanation

The description states that the PR removes the Formula.factory, language/go and dep cop references, and moves rubocop/lines test files out of rubocop/text while adding strict typing. The changeset matches these claims: text.rb and text_spec.rb drop the matching checks and examples, and the lines spec files change to typed: strict. The description is specific and relevant, so the check passes.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f275663b-279d-4352-841c-0788ff8aa608
Commits

Reviewing files that changed from the base of the PR and between f1ff939 and 3c83e29.

Files selected for processing: 2

  • Library/Homebrew/rubocops/text.rb
  • Library/Homebrew/test/rubocops/text_spec.rb
Files with no reviewable changes: 2

  • Library/Homebrew/rubocops/text.rb
  • Library/Homebrew/test/rubocops/text_spec.rb

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

* Formula.factory was removed in 4d9d018
* language/go was removed in c9a7b62
* dep was removed in
  Homebrew/homebrew-core@6432bad
* move test files which are for rubocop/lines not rubocop/text. Also add
  strict typing.
@cho-m
cho-m force-pushed the rubocop-text-cleanup branch from f1ff939 to 3c83e29 Compare November 7, 2026 01:49

@p-linnane p-linnane 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.

Nice!

@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 added this pull request to the merge queue Nov 7, 2026
Merged via the queue into main with commit 5cf37c0 Nov 7, 2026
55 checks passed
@MikeMcQuaid
MikeMcQuaid deleted the rubocop-text-cleanup branch November 7, 2026 14:19
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

⌂ 换网址