Merge pull request #2006 from vszakats/patch-2

audit: enforce https for *.sourceforge.io urls
This commit is contained in:
Mike McQuaid 2017-02-15 14:38:08 +00:00 committed by GitHub
commit 21eaa1c60a
2 changed files with 4 additions and 1 deletions

View File

@ -584,7 +584,9 @@ class FormulaAuditor
# People will run into mixed content sometimes, but we should enforce and then add # People will run into mixed content sometimes, but we should enforce and then add
# exemptions as they are discovered. Treat mixed content on homepages as a bug. # exemptions as they are discovered. Treat mixed content on homepages as a bug.
# Justify each exemptions with a code comment so we can keep track here. # Justify each exemptions with a code comment so we can keep track here.
if homepage =~ %r{^http://[^/]*github\.io/} case homepage
when %r{^http://[^/]*\.github\.io/},
%r{^http://[^/]*\.sourceforge\.io/}
problem "Please use https:// for #{homepage}" problem "Please use https:// for #{homepage}"
end end

View File

@ -434,6 +434,7 @@ class FormulaAuditorTests < Homebrew::TestCase
"sf1" => "http://foo.sourceforge.net/", "sf1" => "http://foo.sourceforge.net/",
"sf2" => "http://foo.sourceforge.net", "sf2" => "http://foo.sourceforge.net",
"sf3" => "http://foo.sf.net/", "sf3" => "http://foo.sf.net/",
"sf4" => "http://foo.sourceforge.io/",
"waldo" => "http://www.gnu.org/waldo", "waldo" => "http://www.gnu.org/waldo",
} }