Skip to content
Snippets Groups Projects
Commit 192e6e05 authored by Jack Nagel's avatar Jack Nagel
Browse files

audit: allow some forms of gist patches


The problem is not the raw URLs, but URLs that do not contain the commit
hash corresponding to a particular version of the gist.

Signed-off-by: default avatarJack Nagel <jacknagel@gmail.com>
parent f5d0fbcc
No related branches found
No related tags found
No related merge requests found
......@@ -253,7 +253,9 @@ class FormulaAuditor
Patches.new(f.patches).select { |p| p.external? }.each do |p|
case p.url
when %r[raw\.github\.com], %r[gist\.github\.com/raw]
problem "Using raw GitHub URLs is not recommended:\n#{p.url}"
unless p.url =~ /[a-fA-F0-9]{40}/
problem "GitHub/Gist patches should specify a revision:\n#{p.url}"
end
when %r[macports/trunk]
problem "MacPorts patches should specify a revision instead of trunk:\n#{p.url}"
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment