aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/rubocops/extend/formula_cop.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/rubocops/extend/formula_cop.rb')
-rw-r--r--Library/Homebrew/rubocops/extend/formula_cop.rb34
1 files changed, 0 insertions, 34 deletions
diff --git a/Library/Homebrew/rubocops/extend/formula_cop.rb b/Library/Homebrew/rubocops/extend/formula_cop.rb
index e4a9a5b45..4be0c0fe3 100644
--- a/Library/Homebrew/rubocops/extend/formula_cop.rb
+++ b/Library/Homebrew/rubocops/extend/formula_cop.rb
@@ -380,40 +380,6 @@ module RuboCop
add_offense(@offensive_node, @offense_source_range, msg)
end
- def patch_problems(patch)
- patch_url = string_content(patch)
- gh_patch_patterns = Regexp.union([%r{/raw\.github\.com/},
- %r{gist\.github\.com/raw},
- %r{gist\.github\.com/.+/raw},
- %r{gist\.githubusercontent\.com/.+/raw}])
- if regex_match_group(patch, gh_patch_patterns)
- unless patch_url =~ /[a-fA-F0-9]{40}/
- problem "GitHub/Gist patches should specify a revision:\n#{patch_url}"
- end
- end
-
- gh_patch_diff_pattern = %r{https?://patch-diff\.githubusercontent\.com/raw/(.+)/(.+)/pull/(.+)\.(?:diff|patch)}
- if match_obj = regex_match_group(patch, gh_patch_diff_pattern)
- problem <<-EOS.undent
- use GitHub pull request URLs:
- https://github.com/#{match_obj[1]}/#{match_obj[2]}/pull/#{match_ojb[3]}.patch
- Rather than patch-diff:
- #{patch_url}
- EOS
- end
-
- if regex_match_group(patch, %r{macports/trunk})
- problem "MacPorts patches should specify a revision instead of trunk:\n#{patch_url}"
- end
-
- if regex_match_group(patch, %r{^http://trac\.macports\.org})
- problem "Patches from MacPorts Trac should be https://, not http:\n#{patch_url}"
- end
-
- return unless regex_match_group(patch, %r{^http://bugs\.debian\.org})
- problem "Patches from Debian should be https://, not http:\n#{patch_url}"
- end
-
private
def formula_class?(node)