diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index b47984d968..07acb76e82 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -17,8 +17,10 @@ module Homebrew ARGV.formulae end + strict = ARGV.include? "--strict" + ff.each do |f| - fa = FormulaAuditor.new f + fa = FormulaAuditor.new(f, :strict => strict) fa.audit unless fa.problems.empty? @@ -76,8 +78,9 @@ class FormulaAuditor swig ] - def initialize(formula) + def initialize(formula, options={}) @formula = formula + @strict = !!options[:strict] @problems = [] @text = FormulaText.new(formula.path) @specs = %w{stable devel head}.map { |s| formula.send(s) }.compact