aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/audit.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index 4851c0744..3a41dbdfa 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -3,6 +3,7 @@ require "utils"
require "extend/ENV"
require "formula_cellar_checks"
require "official_taps"
+require "tap_migrations"
require "cmd/search"
module Homebrew
@@ -769,6 +770,20 @@ class FormulaAuditor
end
end
+ def audit_reverse_migration
+ # Only enforce for new formula being re-added to core
+ return unless @strict
+ return unless formula.core_formula?
+
+ if TAP_MIGRATIONS.has_key?(formula.name)
+ problem <<-EOS.undent
+ #{formula.name} seems to be listed in tap_migrations.rb!
+ Please remove #{formula.name} from present tap & tap_migrations.rb
+ before submitting it to Homebrew/homebrew.
+ EOS
+ end
+ end
+
def audit_prefix_has_contents
return unless formula.prefix.directory?
@@ -823,6 +838,7 @@ class FormulaAuditor
text.without_patch.split("\n").each_with_index { |line, lineno| audit_line(line, lineno+1) }
audit_installed
audit_prefix_has_contents
+ audit_reverse_migration
end
private