From a51d2cde29018ef598e987b3329fb6937850cfe1 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sun, 4 Jan 2015 10:48:28 +0000 Subject: audit: also run `brew style` on `--strict`. Closes #35465. Signed-off-by: Mike McQuaid --- Library/Homebrew/cmd/audit.rb | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'Library') diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 8b2de4ba6..53a832230 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -8,6 +8,13 @@ module Homebrew formula_count = 0 problem_count = 0 + strict = ARGV.include? "--strict" + if strict && ARGV.formulae.any? + require "cmd/style" + ohai "brew style #{ARGV.formulae.join " "}" + style + end + ENV.activate_extensions! ENV.setup_build_environment @@ -17,13 +24,19 @@ module Homebrew ARGV.formulae end - strict = ARGV.include? "--strict" + output_header = !strict ff.each do |f| fa = FormulaAuditor.new(f, :strict => strict) fa.audit unless fa.problems.empty? + unless output_header + puts + ohai "audit problems" + output_header = true + end + formula_count += 1 problem_count += fa.problems.size puts "#{f.name}:", fa.problems.map { |p| " * #{p}" }, "" -- cgit v1.2.3