From cbff83898e586c7a58d5580fc81e780cb7363682 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Wed, 19 Jan 2022 03:00:55 +0800 Subject: [PATCH] formula_auditor: audit for deprecated dependencies Closes #12748. --- Library/Homebrew/formula_auditor.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Library/Homebrew/formula_auditor.rb b/Library/Homebrew/formula_auditor.rb index a06941104d..1a7292a244 100644 --- a/Library/Homebrew/formula_auditor.rb +++ b/Library/Homebrew/formula_auditor.rb @@ -307,6 +307,13 @@ module Homebrew EOS end + if dep_f.deprecated? && !formula.deprecated? && !formula.disabled? + problem <<~EOS + Dependency '#{dep.name}' is deprecated but has un-deprecated dependents. Either + un-deprecate '#{dep.name}' or deprecate all of its dependents. + EOS + end + # we want to allow uses_from_macos for aliases but not bare dependencies if self.class.aliases.include?(dep.name) && spec.uses_from_macos_names.exclude?(dep.name) problem "Dependency '#{dep.name}' is an alias; use the canonical name '#{dep.to_formula.full_name}'."