aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorMike McQuaid2014-12-27 14:01:43 +0000
committerMike McQuaid2014-12-27 16:31:43 +0000
commit5cd8f62865c6c700ca31042985b923147fc1b03e (patch)
treedc73e8bfc043d05f67f995b48b862ae87065d730 /Library/Homebrew/cmd
parentc82e48b90488c413681b301cac889d78a6e2e1cf (diff)
downloadbrew-5cd8f62865c6c700ca31042985b923147fc1b03e.tar.bz2
audit (strict): check for use double-quotes.
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/audit.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index bf478e2f5..88bddaf63 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -549,6 +549,12 @@ class FormulaAuditor
good_system = bad_system.gsub(" ", "\", \"")
problem "Use `system #{good_system}` instead of `system #{bad_system}` "
end
+
+ if line =~ /^[^#"]*('[^']*')/
+ bad_quotes = $1
+ good_quotes = bad_quotes.gsub "'", "\""
+ problem "use double-quotes for `#{good_quotes}` instead of `#{bad_quotes}`"
+ end
end
end