You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Audit GoReleaser flags in staged resources - #24481
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.
Codex with GPT 6.1 Sol at Extra High effort, with local review and testing.
No actionable comments were generated in the recent review.
Summary
Summary by CodeRabbit
New Features
Added a formula audit check for std_go_args calls that use GoReleaser linker flags in staged resources. The check distinguishes these calls from those in the main formula and does not flag default or custom linker flags, helping formula authors identify this specific configuration.
This change adds and loads the StdGoArgs formula audit cop. It reports eligible std_go_args calls in stage blocks when the final hash includes ldflags: :goreleaser. RSpec examples cover reporting and non-reporting cases.
Changes: Staged Go argument audit
Layer / File(s)
Summary
Add and validate the staged argument audit Library/Homebrew/rubocops/std_go_args.rb, Library/Homebrew/rubocops/all.rb, Library/Homebrew/test/rubocops/std_go_args_spec.rb
Adds and loads the StdGoArgs cop. The cop reports matching calls in stage blocks. Specs cover matching calls and cases that should not report offenses.
Merge Risk: Minimal · up to 20909
The new audit is active for named formula checks. No material merge risk was identified.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: auditing GoReleaser flags in staged resources. The raw summary adds a cop, StdGoArgs, that reports std_go_args calls using ldflags: :goreleaser inside stage blocks. Th…
Description check
The description states the purpose: preventing resource builds from using the parent formula's metadata. This matches the new cop, which flags ldflags: :goreleaser in staged resources, and the specs t…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: auditing GoReleaser flags in staged resources. The raw summary adds a cop, StdGoArgs, that reports std_go_args calls using ldflags: :goreleaser inside stage blocks. The title is specific and matches the changeset.
Full details: Description check
Explanation
The description states the purpose: preventing resource builds from using the parent formula's metadata. This matches the new cop, which flags ldflags: :goreleaser in staged resources, and the specs that cover it. The description also includes checklist and AI-usage text, but the core purpose is related to the changeset.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
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
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.
Prevent resource builds from using the parent formula's metadata.
brew benchmarkresults.brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?Codex with GPT 6.1 Sol at Extra High effort, with local review and testing.