aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorchdiza2014-09-23 15:47:34 -0400
committerJack Nagel2014-09-23 15:19:13 -0500
commit879cb92562763f1ec60915c34972f04fe6b6ad67 (patch)
treea5783849a9111fafea014143d09ec00953eff419 /Library
parent12721f50ebbda4f908f7e5003344a433fcb1594f (diff)
downloadhomebrew-879cb92562763f1ec60915c34972f04fe6b6ad67.tar.bz2
audit: make `has_DATA?` ignore commented-out lines
Before this change, audit would detect commented-out lines containing the string 'DATA' as if there were no commenting. Then it could complain, e.g., problem "'DATA' was found, but no '__END__'", which would be a false alarm in that circumstance. Closes #32568. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/audit.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index 9a4b0ca0a..0cf20b75b 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -57,7 +57,7 @@ class FormulaText
end
def has_DATA?
- /\bDATA\b/ =~ @text
+ /^[^#]*\bDATA\b/ =~ @text
end
def has_END?