diff options
| author | Vlad Shablinsky | 2015-08-09 14:48:12 +0300 | 
|---|---|---|
| committer | Mike McQuaid | 2015-08-10 13:57:58 +0100 | 
| commit | 556ab3bcd6125e22506bb8845576c73a4330f14f (patch) | |
| tree | 665e3aa18167e6bb16f8191c7c76773b6b8be65a /Library/Homebrew/cmd/audit.rb | |
| parent | ae9bf4aaaa83f53ed767294632db15a74e425c59 (diff) | |
| download | brew-556ab3bcd6125e22506bb8845576c73a4330f14f.tar.bz2 | |
audit: add rules for naming
- restrict old names as names of new formulae
- warn about dependencies on old names
Diffstat (limited to 'Library/Homebrew/cmd/audit.rb')
| -rw-r--r-- | Library/Homebrew/cmd/audit.rb | 10 | 
1 files changed, 10 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 5af7792b2..5417313b0 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -6,6 +6,7 @@ require "official_taps"  require "tap_migrations"  require "cmd/search"  require "date" +require "formula_renames"  module Homebrew    def audit @@ -229,6 +230,11 @@ class FormulaAuditor        return      end +    if FORMULA_RENAMES.key? name +      problem "'#{name}' is reserved as the old name of #{FORMULA_RENAMES[name]}" +      return +    end +      if !formula.core_formula? && Formula.core_names.include?(name)        problem "Formula name conflicts with existing core formula."        return @@ -270,6 +276,10 @@ class FormulaAuditor            next          end +        if FORMULA_RENAMES[dep.name] == dep_f.name +          problem "Dependency '#{dep.name}' was renamed; use newname '#{dep_f.name}'." +        end +          if @@aliases.include?(dep.name)            problem "Dependency '#{dep.name}' is an alias; use the canonical name '#{dep.to_formula.full_name}'."          end  | 
