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.
This commit is contained in:
parent
c9d41345d0
commit
c905fb79f4
@ -103,8 +103,7 @@ def audit_formula_options f, text
|
|||||||
return problems
|
return problems
|
||||||
end
|
end
|
||||||
|
|
||||||
def audit_some_formulae
|
def audit_formula_instance f
|
||||||
ff.each do |f|
|
|
||||||
problems = []
|
problems = []
|
||||||
|
|
||||||
# Don't depend_on aliases; use full name
|
# Don't depend_on aliases; use full name
|
||||||
@ -113,6 +112,20 @@ def audit_some_formulae
|
|||||||
problems << " * Dep #{d} is an alias; switch to the real name."
|
problems << " * Dep #{d} is an alias; switch to the real name."
|
||||||
end
|
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 = []
|
||||||
|
|
||||||
|
problems += audit_formula_instance f
|
||||||
|
|
||||||
text = ""
|
text = ""
|
||||||
File.open(f.path, "r") { |afile| text = afile.read }
|
File.open(f.path, "r") { |afile| text = afile.read }
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user