KEMBAR78
rubocops/components_order: skip fails_with inside on_system by cho-m · Pull Request #20688 · Homebrew/brew · GitHub
Skip to content

Conversation

cho-m
Copy link
Member

@cho-m cho-m commented Sep 15, 2025

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Seen in https://github.com/Homebrew/homebrew-core/pull/241981/files#r2347675278

Prior to change, when trying:

on_intel do
  fails_with :gcc do
    version "11"
    cause "reason"
  end
end

brew audit outputs:

Nest `on_intel` blocks inside `fails_with` blocks when there is only one inner block.

Changing to:

fails_with :gcc do
  on_intel do
    version "11"
    cause "reason"
  end
end

brew audit outputs:

undefined method 'on_intel' for an instance of CompilerFailure

With PR change, the former now works.

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Sep 15, 2025
Merged via the queue into main with commit 7165348 Sep 15, 2025
36 checks passed
@MikeMcQuaid MikeMcQuaid deleted the skip-nest-fails_with branch September 15, 2025 11:56
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