From 38a28285a6fdbeadbd6d7cc189af253fb446ee85 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sun, 17 Jun 2012 17:58:49 -0500 Subject: audit: catch unnecessary 'ENV.foo' interpolation Signed-off-by: Jack Nagel --- Library/Homebrew/cmd/audit.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3