Skip to content

Enforce explicit formula install-step bases (28/29) - #23404

Merged
MikeMcQuaid merged 1 commit into
mainfrom
install-step-explicit-var-enforcement
Aug 5, 2026
Merged

Enforce explicit formula install-step bases (28/29)#23404
MikeMcQuaid merged 1 commit into
mainfrom
install-step-explicit-var-enforcement

Conversation

@MikeMcQuaid

Copy link
Copy Markdown
Member

Needs #23372
Needs Homebrew/homebrew-core#296288

Require formula install-step paths to identify their base explicitly.

  • report relative paths that still rely on the temporary var default
  • autocorrect compatibility calls to an explicit base
  • preserve absolute paths and deferred install-time tokens
  • leave the runtime fallback for the following PR

AI disclosure: using OpenAI Codex 5.6 Sol max with local review and testing.

@MikeMcQuaid
MikeMcQuaid marked this pull request as ready for review August 4, 2026 09:59
Copilot AI lite review requested due to automatic review settings August 4, 2026 09:59

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

This PR updates the FormulaAudit/InstallSteps RuboCop cop and its specs to enforce that formula install-step path arguments explicitly declare their base (instead of relying on the temporary implicit :var default), including autocorrection.

Changes:

  • Add enforcement + autocorrection for implicit :var-based paths in install-step DSL calls (and run path keyword arguments).
  • Expand cop specs to cover new offenses/corrections and update existing fixtures to use base: :var.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
Library/Homebrew/rubocops/install_steps.rb Adds explicit-base enforcement/autocorrect logic for install-step paths and run keyword path fields.
Library/Homebrew/test/rubocops/install_steps_spec.rb Updates fixtures to include explicit bases and adds new test coverage for the new offenses/autocorrection behavior.

馃挕 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Library/Homebrew/rubocops/install_steps.rb
@MikeMcQuaid
MikeMcQuaid force-pushed the install-step-explicit-var-enforcement branch from 82786f4 to 76d136a Compare August 4, 2026 11:11

@github-actions github-actions Bot 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.

Automated approval by github-actions[bot] for #23404 because all requirements are met:

  • #23404 is not from a fork.
  • #23404 is not a draft.
  • The approval workflow is running on a weekday.
  • @MikeMcQuaid is listed as a lead maintainer in README.md.
  • @MikeMcQuaid approved Homebrew/brew PR #23438 in the last 7 days.
  • #23404 was created at least 48 hours ago and has had no human review since creation.
  • Copilot has already reviewed #23404.
  • #23404 does not modify .github/ or other sensitive files.
  • All CI jobs are passing, including non-required jobs.

- Reject relative formula step paths without an explicit base.
- Autocorrect paths that previously relied on the temporary `var`
  compatibility default.
- Keep absolute paths and install-time path tokens unchanged.
@MikeMcQuaid
MikeMcQuaid force-pushed the install-step-explicit-var-enforcement branch from 76d136a to 8c5f51c Compare August 5, 2026 15:24
@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Aug 5, 2026
Merged via the queue into main with commit 271b3f5 Aug 5, 2026
79 of 82 checks passed
@MikeMcQuaid
MikeMcQuaid deleted the install-step-explicit-var-enforcement branch August 5, 2026 17:05
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.

2 participants