<commit_before>require 'fileutils'
module TodoTracker

  class Search
    #put initializer-> file types + folders to cover + folders to escape

    def self.find_all_todos
      todo_list = []

      #Iterate through all the folders
      Dir["*/**/*.rb"].each do |file|
        if file != __FILE__
          open(file) do |f|
            index = 1
            f.each_line do |line|
              if line.include?("#TODO")
                t = TodoTracker::Todo.new(index, file, ((line.strip)[6..-1]))
                todo_list << t
              end
              index = index + 1
            end
          end
        end
      end
      todo_list
    end

  end
end<commit_msg>Modifying search logic to track todo's<commit_after>require 'fileutils'
module TodoTracker

  class Search
    #put initializer-> file types + folders to cover + folders to escape

    def self.find_all_todos
      todo_list = []

      #Iterate through all the folders
      TodoTracker.search_path.each do |file|

        if File.file?(file) && file != __FILE__
          open(file) do |f|
            index = 1
            f.each_line do |line|
              if line.include?("#TODO")
                line = line.strip!
                t = TodoTracker::Todo.new(index, file, (line[(line.index('#TODO')+6)..-1]))
                todo_list << t
              end
              index = index + 1
            end
          end
        end
      end
      todo_list
    end

  end
end
{'fraction_non_alphanumeric': 0.09712722298221614, 'fraction_numerical': 0.005471956224350205, 'mean_word_length': 1.5224137931034483, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '7463561', 'n_tokens_mistral': 447, 'n_tokens_neox': 427, 'n_words': 123}