Skip to content
Snippets Groups Projects
Commit 17e55ead authored by commitay's avatar commitay
Browse files

audit: check for `bottle do` blocks in new formulae

parent 53ecfda2
No related branches found
No related tags found
No related merge requests found
......@@ -254,6 +254,7 @@ module Homebrew
def initialize(formula, options = {})
@formula = formula
@versioned_formula = formula.versioned_formula?
@new_formula_inclusive = options[:new_formula]
@new_formula = options[:new_formula] && !@versioned_formula
@strict = options[:strict]
@online = options[:online]
......@@ -563,6 +564,18 @@ module Homebrew
end
end
def audit_bottle_spec
# special case: new versioned formulae should be audited
return unless @new_formula_inclusive
return unless @core_tap
return if formula.bottle_disabled?
return unless formula.bottle_defined?
new_formula_problem "New formulae should not have a `bottle do` block"
end
def audit_bottle_disabled
return unless formula.bottle_disabled?
return if formula.bottle_unneeded?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment