audit: match #{prefix}/libexec and prefix+'libexec'

These were being picked up as just "#{prefix}/lib" and prefix+'lib' due
to the eagerness of the regex. Reordering "lib" and "libexec" will take
care of it; I couldn't think of a more clever solution.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
Jack Nagel 2011-09-28 14:28:14 -05:00
parent 9bce115e9a
commit be9d91b2b8

View File

@ -50,7 +50,7 @@ def audit_formula_text name, text
end end
# Prefer formula path shortcuts in Pathname+ # Prefer formula path shortcuts in Pathname+
if text =~ %r{\(\s*(prefix\s*\+\s*(['"])(bin|include|lib|libexec|sbin|share))} if text =~ %r{\(\s*(prefix\s*\+\s*(['"])(bin|include|libexec|lib|sbin|share))}
problems << " * \"(#{$1}...#{$2})\" should be \"(#{$3}+...)\"" problems << " * \"(#{$1}...#{$2})\" should be \"(#{$3}+...)\""
end end
@ -59,7 +59,7 @@ def audit_formula_text name, text
end end
# Prefer formula path shortcuts in strings # Prefer formula path shortcuts in strings
if text =~ %r[(\#\{prefix\}/(bin|include|lib|libexec|sbin|share))] if text =~ %r[(\#\{prefix\}/(bin|include|libexec|lib|sbin|share))]
problems << " * \"#{$1}\" should be \"\#{#{$2}}\"" problems << " * \"#{$1}\" should be \"\#{#{$2}}\""
end end