formula_auditor: do not allow depending on aliases

This commit is contained in:
Alexander Bayandin 2020-12-23 14:31:54 +00:00
parent cb8e9a695f
commit 1e68ce5a3f

View File

@ -235,8 +235,7 @@ module Homebrew
problem "Dependency '#{dep.name}' was renamed; use new name '#{dep_f.name}'." problem "Dependency '#{dep.name}' was renamed; use new name '#{dep_f.name}'."
end end
if self.class.aliases.include?(dep.name) && if self.class.aliases.include?(dep.name) && dep_f.core_formula?
dep_f.core_formula? && !dep_f.versioned_formula?
problem "Dependency '#{dep.name}' from homebrew/core is an alias; " \ problem "Dependency '#{dep.name}' from homebrew/core is an alias; " \
"use the canonical name '#{dep.to_formula.full_name}'." "use the canonical name '#{dep.to_formula.full_name}'."
end end