From 22d8380b053afea62d7b249b273fc6b97f2f0e3f Mon Sep 17 00:00:00 2001 From: chdiza Date: Tue, 23 Sep 2014 15:47:34 -0400 Subject: 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 Homebrew/homebrew#32568. Signed-off-by: Jack Nagel --- Library/Homebrew/cmd/audit.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Library') 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? -- cgit v1.2.3