From fca32ee7ccb0804473989e36475f3bf838b3867e Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 27 Dec 2014 12:38:58 +0000 Subject: [PATCH] audit: check options when in strict mode. --- Library/Homebrew/cmd/audit.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 07acb76e82..f8db07c94d 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -168,6 +168,15 @@ class FormulaAuditor end end + def audit_options + formula.options.each do |o| + next unless @strict + if o.name !~ /with(out)?-/ && o.name != "c++11" && o.name != "universal" + problem "Options should begin with with/without. Migrate '--#{o.name}' with `deprecated_option`." + end + end + end + def audit_urls homepage = formula.homepage @@ -553,6 +562,7 @@ class FormulaAuditor audit_urls audit_deps audit_conflicts + audit_options audit_patches audit_text text.without_patch.split("\n").each_with_index { |line, lineno| audit_line(line, lineno+1) }