aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2010-08-09 09:11:01 -0700
committerAdam Vandenberg2010-08-09 09:11:28 -0700
commitcd5095467759fedc9d65ca0eabb739a35a77a7ef (patch)
tree84ab1f03ad9253d9769c0d2820461a01e2106462 /Library
parent2f3ce485f3702d2ccefd3483ed719e0b36533e6f (diff)
downloadbrew-cd5095467759fedc9d65ca0eabb739a35a77a7ef.tar.bz2
brew audit - flag use of DATA with no __END__
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/Contributions/examples/brew-audit.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/Library/Contributions/examples/brew-audit.rb b/Library/Contributions/examples/brew-audit.rb
index e4e7d14de..7733fdc4e 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 =~ /[ ]+$/