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>
This commit is contained in:
parent
d7dddc8f08
commit
22d8380b05
@ -57,7 +57,7 @@ class FormulaText
|
|||||||
end
|
end
|
||||||
|
|
||||||
def has_DATA?
|
def has_DATA?
|
||||||
/\bDATA\b/ =~ @text
|
/^[^#]*\bDATA\b/ =~ @text
|
||||||
end
|
end
|
||||||
|
|
||||||
def has_END?
|
def has_END?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user