<commit_before>#: @hide_from_man_page
#:  * `readall` [tap]:
#:    Import all formulae in a tap (defaults to core tap).
#:
#:    This can be useful for debugging issues across all formulae
#:    when making significant changes to `formula.rb`,
#:    or to determine if any current formulae have Ruby issues.

require "readall"

module Homebrew
  module_function

  def readall
    if ARGV.include?("--syntax")
      ruby_files = []
      scan_files = %W[
        #{HOMEBREW_LIBRARY}/*.rb
        #{HOMEBREW_LIBRARY}/Homebrew/**/*.rb
      ]
      Dir.glob(scan_files).each do |rb|
        next if rb.include?("/vendor/")
        next if rb.include?("/cask/")
        ruby_files << rb
      end

      Homebrew.failed = true unless Readall.valid_ruby_syntax?(ruby_files)
    end

    options = { aliases: ARGV.include?("--aliases") }
    taps = if ARGV.named.empty?
      Tap
    else
      [Tap.fetch(ARGV.named.first)]
    end
    taps.each do |tap|
      Homebrew.failed = true unless Readall.valid_tap?(tap, options)
    end
  end
end<commit_msg>readall: allow readall-ing multiple taps at once<commit_after>#: @hide_from_man_page
#:  * `readall` [tap]:
#:    Import all formulae in a tap (defaults to core tap).
#:
#:    This can be useful for debugging issues across all formulae
#:    when making significant changes to `formula.rb`,
#:    or to determine if any current formulae have Ruby issues.

require "readall"

module Homebrew
  module_function

  def readall
    if ARGV.include?("--syntax")
      ruby_files = []
      scan_files = %W[
        #{HOMEBREW_LIBRARY}/*.rb
        #{HOMEBREW_LIBRARY}/Homebrew/**/*.rb
      ]
      Dir.glob(scan_files).each do |rb|
        next if rb.include?("/vendor/")
        next if rb.include?("/cask/")
        ruby_files << rb
      end

      Homebrew.failed = true unless Readall.valid_ruby_syntax?(ruby_files)
    end

    options = { aliases: ARGV.include?("--aliases") }
    taps = if ARGV.named.empty?
      Tap
    else
      ARGV.named.map { |t| Tap.fetch(t) }
    end
    taps.each do |tap|
      Homebrew.failed = true unless Readall.valid_tap?(tap, options)
    end
  end
end
{'fraction_non_alphanumeric': 0.12155212716222534, 'fraction_numerical': 0.0, 'mean_word_length': 2.5906040268456376, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6320756', 'n_tokens_mistral': 757, 'n_tokens_neox': 697, 'n_words': 191}