audit: add strict mode, argument.

This commit is contained in:
Mike McQuaid 2014-12-27 12:38:04 +00:00
parent a1ba5a5da6
commit 24f183dd12

View File

@ -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