aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2012-06-17 17:58:49 -0500
committerJack Nagel2012-06-17 17:58:49 -0500
commit910e5013abb74faff6eb102f6bbc82366d828c9c (patch)
tree2f4089bf797b40a79e6c14767cead06403a09389
parent0a5894923e1b92ecbbcbff94b45e860666848e93 (diff)
downloadhomebrew-910e5013abb74faff6eb102f6bbc82366d828c9c.tar.bz2
audit: catch unnecessary 'ENV.foo' interpolation
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
-rwxr-xr-xLibrary/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 53f965243..4ca541a75 100755
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -53,7 +53,7 @@ def audit_formula_text name, text
end
# Check for string interpolation of single values.
- if text =~ /(system|inreplace|gsub!|change_make_var!) .* ['"]#\{(\w+)\}['"]/
+ if text =~ /(system|inreplace|gsub!|change_make_var!) .* ['"]#\{(\w+(\.\w+)?)\}['"]/
problems << " * Don't need to interpolate \"#{$2}\" with #{$1}"
end