diff options
Diffstat (limited to 'Library/Homebrew/dev-cmd/audit.rb')
| -rw-r--r-- | Library/Homebrew/dev-cmd/audit.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 677a52447..9f296ca66 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -38,7 +38,7 @@ require "official_taps" require "cmd/search" require "cmd/style" require "date" -require "blacklist" +require "missing_formula" require "digest" module Homebrew @@ -399,7 +399,7 @@ class FormulaAuditor name = formula.name full_name = formula.full_name - if blacklisted?(name) + if Homebrew::MissingFormula.blacklisted_reason(name) problem "'#{name}' is blacklisted." end @@ -472,6 +472,12 @@ class FormulaAuditor problem "Dependency '#{dep.name}' is an alias; use the canonical name '#{dep.to_formula.full_name}'." end + if @new_formula && dep_f.keg_only_reason && + !["openssl", "apr", "apr-util"].include?(dep.name) && + [:provided_by_macos, :provided_by_osx].include?(dep_f.keg_only_reason.reason) + problem "Dependency '#{dep.name}' may be unnecessary as it is provided by macOS; try to build this formula without it." + end + dep.options.reject do |opt| next true if dep_f.option_defined?(opt) dep_f.requirements.detect do |r| @@ -1036,6 +1042,10 @@ class FormulaAuditor problem ":apr is deprecated. Usage should be \"apr-util\"" end + if line =~ /depends_on :tex/ + problem ":tex is deprecated." + end + # Commented-out depends_on problem "Commented-out dep #{$1}" if line =~ /#\s*depends_on\s+(.+)\s*$/ |
