Skip to content

Commit

Permalink
Merge pull request #11239 from MikeMcQuaid/audit_core_bottle_disabled…
Browse files Browse the repository at this point in the history
…_unneeded

formula_auditor: don't allow `bottle :unneeded` in core.
  • Loading branch information
MikeMcQuaid committed Jun 29, 2021
2 parents 1e8f6d7 + 0eb9b62 commit 5a5db3a
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions Library/Homebrew/formula_auditor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -438,13 +438,16 @@ def audit_bottle_spec

def audit_bottle_disabled
return unless formula.bottle_disabled?
return if formula.bottle_unneeded?

problem "Unrecognized bottle modifier" unless formula.bottle_disable_reason.valid?

return unless @core_tap

problem "Formulae in homebrew/core should not use `bottle :disabled`"
if !formula.bottle_disable_reason.valid?
problem "Unrecognized bottle modifier"
elsif @core_tap
if formula.bottle_unneeded?
problem "Formulae in homebrew/core should not use `bottle :unneeded`"
else
problem "Formulae in homebrew/core should not use `bottle :disabled`"
end
end
end

def audit_github_repository_archived
Expand Down

0 comments on commit 5a5db3a

Please sign in to comment.