<commit_before>module Microspec
  class Runner
    def requires
      @_requires ||= []
    end

    def includes
      @_includes ||= []
    end

    def excludes
      @_excludes ||= []
    end

    def filenames
      Dir[*includes] - Dir[*excludes] - requires
    end

    def perform
      requires.each do |filename|
        require File.join Dir.pwd, filename
      end

      filenames.each do |filename|
        scope = Scope.new filename do
          eval File.read filename
        end

        scope.perform
      end
    end
  end
end
<commit_msg>Pass filename and use it to report errors<commit_after>module Microspec
  class Runner
    def requires
      @_requires ||= []
    end

    def includes
      @_includes ||= []
    end

    def excludes
      @_excludes ||= []
    end

    def filenames
      Dir[*includes] - Dir[*excludes] - requires
    end

    def perform
      requires.each do |filename|
        require File.join Dir.pwd, filename
      end

      filenames.each do |filename|
        scope = Scope.new filename do
          eval File.read(filename), nil, filename
        end

        scope.perform
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.07560137457044673, 'fraction_numerical': 0.0, 'mean_word_length': 1.7672209026128265, 'pattern_counts': {'":': 0, '<': 3, '<?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': '202511', 'n_tokens_mistral': 361, 'n_tokens_neox': 334, 'n_words': 104}