Merge pull request #12860 from carlocab/external-tap-deps

formula_auditor: disallow external tap dependencies in core
This commit is contained in:
Carlo Cabrera 2022-02-10 17:40:48 +08:00 committed by GitHub
commit 9027cc2690
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -289,6 +289,13 @@ module Homebrew
next unless @core_tap
unless dep_f.tap.core_tap?
problem <<~EOS
Dependency '#{dep.name}' is not in homebrew/core. Formulae in homebrew/core
should not have dependencies in external taps.
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}'."