diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 13fd2462ff06b0059ec83f72b310aa3ef9a6ecdd..8988d25cc80675f85d65d39f8c6d53be43edcda5 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -1,6 +1,7 @@ require 'formula' require 'utils' require 'superenv' +require 'formula_cellar_checks' module Homebrew extend self def audit @@ -75,6 +76,8 @@ class FormulaText end class FormulaAuditor + include FormulaCellarChecks + attr_reader :f, :text, :problems BUILD_TIME_DEPS = %W[ @@ -565,6 +568,21 @@ class FormulaAuditor end + def audit_check_output warning_and_description + return unless warning_and_description + warning, _ = *warning_and_description + problem warning + end + + def audit_installed + audit_check_output(check_manpages) + audit_check_output(check_infopages) + audit_check_output(check_jars) + audit_check_output(check_non_libraries) + audit_check_output(check_non_executables(f.bin)) + audit_check_output(check_non_executables(f.sbin)) + end + def audit audit_file audit_specs @@ -574,6 +592,7 @@ class FormulaAuditor audit_patches audit_text audit_python + audit_installed end private diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index efaa146a6ce58e5ece3c45b57691da6dbd322a18..33bc97180b33558a9ed6b409e749129753c5b31a 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -449,13 +449,11 @@ class FormulaInstaller end def audit_bin - return unless f.bin.directory? print_check_output(check_PATH(f.bin)) unless f.keg_only? print_check_output(check_non_executables(f.bin)) end def audit_sbin - return unless f.sbin.directory? print_check_output(check_PATH(f.sbin)) unless f.keg_only? print_check_output(check_non_executables(f.sbin)) end