diff options
| -rwxr-xr-x | Library/Homebrew/cmd/audit.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index b4cc01bf0..3cc294c70 100755 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -233,12 +233,23 @@ def audit_formula_instance f return problems end +def audit_formula_caveats f + problems = [] + + if f.caveats.to_s =~ /^\s*\$\s+/ + problems << " * caveats should not use '$' prompts in multiline commands." + end if strict? + + return problems +end + module Homebrew extend self def audit ff.each do |f| problems = [] problems += audit_formula_instance f problems += audit_formula_urls f + problems += audit_formula_caveats f perms = File.stat(f.path).mode if perms.to_s(8) != "100644" |
