<commit_before>require 'find'

module AssetFinder
  module Javascript
    class Finder
      def self.execute
        [].tap do |paths|
          root_dir = File.join(Rails.root, 'app/assets/javascripts/')
          normalizer = Normalizer.new(root_dir, AssetFinder.configuration.javascript_patterns)

          Find.find(root_dir).each do |path|
            normalized_path = normalizer.normalize(path)
            next if normalized_path.nil?
            paths << normalized_path
          end
        end
      end
    end
  end
end<commit_msg>:+1: set normalize_index_file<commit_after>require 'find'

module AssetFinder
  module Javascript
    class Finder
      def self.execute
        [].tap do |paths|
          root_dir = File.join(Rails.root, 'app/assets/javascripts/')
          normalizer = Normalizer.new(
            root_dir,
            AssetFinder.configuration.javascript_patterns,
            normalize_index_file: AssetFinder.configuration.normalize_index_file
          )

          Find.find(root_dir).each do |path|
            normalized_path = normalizer.normalize(path)
            next if normalized_path.nil?
            paths << normalized_path
          end
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.07573289902280131, 'fraction_numerical': 0.0008143322475570033, 'mean_word_length': 2.1113924050632913, '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': '3208034', 'n_tokens_mistral': 354, 'n_tokens_neox': 346, 'n_words': 74}