From cd5095467759fedc9d65ca0eabb739a35a77a7ef Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Mon, 9 Aug 2010 09:11:01 -0700 Subject: [PATCH] brew audit - flag use of DATA with no __END__ --- Library/Contributions/examples/brew-audit.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Library/Contributions/examples/brew-audit.rb b/Library/Contributions/examples/brew-audit.rb index e4e7d14dee..7733fdc4ec 100755 --- a/Library/Contributions/examples/brew-audit.rb +++ b/Library/Contributions/examples/brew-audit.rb @@ -55,6 +55,11 @@ ff.each do |f| problems << " * md5 is empty" end + # DATA with no __END__ + if (text =~ /\bDATA\b/) and not (text =~ /^\s*__END__\s*$/) + problems << " * 'DATA' was found, but no '__END__'" + end + # Don't complain about spaces in patches split_patch = (text.split("__END__")[0]).strip() if split_patch =~ /[ ]+$/