From 98dcfcfe2ea6e53e3310b8e9fbfed0201f3f2ba0 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Wed, 15 Feb 2012 22:10:03 -0600 Subject: [PATCH] audit: only look for empty checksums once Signed-off-by: Jack Nagel --- Library/Homebrew/cmd/audit.rb | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 99dc3a979a..e967f14c4b 100755 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -75,18 +75,10 @@ def audit_formula_text name, text end # Empty checksums - if text =~ /md5\s+(''|"")/ + if text =~ /(md5|sha1|sha256)\s+(''|"")/ problems << " * md5 is empty" end - if text =~ /sha1\s+(''|"")/ - problems << " * sha1 is empty" - end - - if text =~ /sha256\s+(''|"")/ - problems << " * sha256 is empty" - end - # Checksum sanity check if text =~ /md5\s+['"](.+)['"]/ and $1 != '#{md5}' and $1 !~ /[a-f0-9]{32}/ problems << " * md5 contains invalid or incorrect number of characters"