From 2e8275477674c85b0bed5a7cd2f17b9acad6bd5a Mon Sep 17 00:00:00 2001 From: Gautham Goli Date: Thu, 25 May 2017 22:21:23 +0530 Subject: audit: Port audit_legacy_patches method to rubocop and add tests --- Library/Homebrew/dev-cmd/audit.rb | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'Library/Homebrew/dev-cmd') diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 0d9a630fd..e42eafd92 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -817,16 +817,6 @@ class FormulaAuditor end end - def audit_legacy_patches - return unless formula.respond_to?(:patches) - legacy_patches = Patch.normalize_legacy_patches(formula.patches).grep(LegacyPatch) - - return if legacy_patches.empty? - - problem "Use the patch DSL instead of defining a 'patches' method" - legacy_patches.each { |p| patch_problems(p) } - end - def patch_problems(patch) case patch.url when /raw\.github\.com/, %r{gist\.github\.com/raw}, %r{gist\.github\.com/.+/raw}, -- cgit v1.2.3