<commit_before>require 'thor'
require 'zombie_scout/mission'

module ZombieScout
  class App < Thor
    desc "scout", "scout for zombie code in current directory"
    def scout(*globs)
      start_time = Time.now
      mission = Mission.new(globs)
      report = mission.scout
      report.each do |zombie|
        puts [zombie[:location], zombie[:name], zombie[:flog_score]] * "\t"
      end
      duration = Time.now - start_time
      puts "Scouted #{mission.defined_method_count} methods in #{mission.sources.size} files, in #{duration} seconds."
      puts "Found #{report.size} potential zombies."
    end
  end
end<commit_msg>In Scout report, sort by flog_score descending<commit_after>require 'thor'
require 'zombie_scout/mission'

module ZombieScout
  class App < Thor
    desc "scout", "scout for zombie code in current directory"
    def scout(*globs)
      start_time = Time.now
      mission = Mission.new(globs)
      report = mission.scout.sort_by { |z| -z[:flog_score] }
      report.each do |zombie|
        puts [zombie[:location], zombie[:name], zombie[:flog_score]] * "\t"
      end
      duration = Time.now - start_time
      puts "Scouted #{mission.defined_method_count} methods in #{mission.sources.size} files, in #{duration} seconds."
      puts "Found #{report.size} potential zombies."
    end
  end
end
{'fraction_non_alphanumeric': 0.11419984973703982, 'fraction_numerical': 0.0, 'mean_word_length': 3.282958199356913, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1744047', 'n_tokens_mistral': 432, 'n_tokens_neox': 425, 'n_words': 119}