diff options
| author | chdiza | 2014-09-23 15:47:34 -0400 |
|---|---|---|
| committer | Jack Nagel | 2014-09-23 15:19:13 -0500 |
| commit | 22d8380b053afea62d7b249b273fc6b97f2f0e3f (patch) | |
| tree | 3146addd06f961bac6fcaa6ecd6d8861c74d6e1e | |
| parent | d7dddc8f08d71d89aaa11eacba7ac4a7df9e9b99 (diff) | |
| download | brew-22d8380b053afea62d7b249b273fc6b97f2f0e3f.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 Homebrew/homebrew#32568.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
| -rw-r--r-- | Library/Homebrew/cmd/audit.rb | 2 |
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? |
