aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorMike McQuaid2015-01-04 10:48:28 +0000
committerMike McQuaid2015-01-04 11:05:34 +0000
commita51d2cde29018ef598e987b3329fb6937850cfe1 (patch)
treefe837e1aa9f1e90652170967e9750360024ec54f /Library/Homebrew/cmd
parent341700ddab601f4404109902b7e33b08cd0a7d14 (diff)
downloadhomebrew-a51d2cde29018ef598e987b3329fb6937850cfe1.tar.bz2
audit: also run `brew style` on `--strict`.
Closes #35465. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/audit.rb15
1 files changed, 14 insertions, 1 deletions
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}" }, ""