Skip to content
Snippets Groups Projects
Commit c905fb79 authored by Adam Vandenberg's avatar Adam Vandenberg
Browse files

brew audit - Google Code homes w/o trailing slash

Without a trailing slash, you redirect to the URL w/ a slash, so
might as well have it there in the first place.
parent c9d41345
No related branches found
No related tags found
No related merge requests found
......@@ -103,15 +103,28 @@ def audit_formula_options f, text
return problems
end
def audit_formula_instance f
problems = []
# Don't depend_on aliases; use full name
aliases = Formula.aliases
f.deps.select {|d| aliases.include? d}.each do |d|
problems << " * Dep #{d} is an alias; switch to the real name."
end
# Google Code homepages should end in a slash
if f.homepage =~ %r[^https?://code\.google\.com/p/[^/]+[^/]$]
problems << " * Google Code homepage should end with a slash."
end
return problems
end
def audit_some_formulae
ff.each do |f|
problems = []
# Don't depend_on aliases; use full name
aliases = Formula.aliases
f.deps.select {|d| aliases.include? d}.each do |d|
problems << " * Dep #{d} is an alias; switch to the real name."
end
problems += audit_formula_instance f
text = ""
File.open(f.path, "r") { |afile| text = afile.read }
......
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