diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index bb8f8811da..ca5891efdb 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -172,11 +172,12 @@ class FormulaAuditor [/^ bottle do/, "bottle block"], [/^ devel do/, "devel block"], [/^ head do/, "head block"], + [/^ bottle (:unneeded|:disable)/, "bottle modifier"], [/^ option/, "option"], [/^ depends_on/, "depends_on"], [/^ def install/, "install method"], [/^ def caveats/, "caveats method"], - [/^ test do/, "test block"] + [/^ test do/, "test block"], ] present = component_list.map do |regex, name| @@ -193,6 +194,9 @@ class FormulaAuditor if present.include?("head") && present.include?("head block") problem "Should not have both `head` and `head do`" end + if present.include?("bottle modifier") && present.include?("bottle block") + problem "Should not have `bottle :unneeded/:disable` and `bottle do`" + end end def audit_class