Enforce explicit formula install-step bases (28/29) - #23404
Merged
Conversation
Contributor
There was a problem hiding this comment.
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 (andrunpath 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.
MikeMcQuaid
force-pushed
the
install-step-explicit-var-enforcement
branch
from
August 4, 2026 11:11
82786f4 to
76d136a
Compare
Contributor
There was a problem hiding this comment.
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
force-pushed
the
install-step-explicit-var-enforcement
branch
from
August 5, 2026 15:24
76d136a to
8c5f51c
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.
Needs #23372
Needs Homebrew/homebrew-core#296288
Require formula install-step paths to identify their base explicitly.
AI disclosure: using OpenAI Codex 5.6 Sol max with local review and testing.