<commit_before>require 'simplecov'
#require 'simplecov-json'
#SimpleCov.formatters = [
#  SimpleCov::Formatter::HTMLFormatter,
#  SimpleCov::Formatter::JSONFormatter,
#]

SimpleCov.start do

  home = ENV['CYBER_DOJO_HOME']
  modyule = ARGV[0]                          # eg 'app_lib'
  slashed_modyule = modyule.sub('_','/')     # eg 'app/lib'

  add_group('test/'+modyule) { |src|
    src.filename.start_with?("#{home}/test/#{modyule}/")
  }
  add_group(slashed_modyule) { |src|
    src.filename.start_with?("#{home}/#{slashed_modyule}/")
  }
end

cov_root = File.expand_path('..', File.dirname(__FILE__))
SimpleCov.root cov_root # what to cover
SimpleCov.coverage_dir ENV['COVERAGE_DIR'] # where coverage reports are written

#- - - - - - - - - - - - - - - - - - - - - - -
#filters.clear
#add_group('debug') { |src| puts "coverage:#{src.filename}"; false }<commit_msg>deleted commented code I was mulling on<commit_after>require 'simplecov'

SimpleCov.start do

  home = ENV['CYBER_DOJO_HOME']
  modyule = ARGV[0]                          # eg 'app_lib'
  slashed_modyule = modyule.sub('_','/')     # eg 'app/lib'

  add_group('test/'+modyule) { |src|
    src.filename.start_with?("#{home}/test/#{modyule}/")
  }
  add_group(slashed_modyule) { |src|
    src.filename.start_with?("#{home}/#{slashed_modyule}/")
  }
end

cov_root = File.expand_path('..', File.dirname(__FILE__))
SimpleCov.root cov_root # what to cover
SimpleCov.coverage_dir ENV['COVERAGE_DIR'] # where coverage reports are written

#- - - - - - - - - - - - - - - - - - - - - - -
#filters.clear
#add_group('debug') { |src| puts "coverage:#{src.filename}"; false }
{'fraction_non_alphanumeric': 0.18661755678330263, 'fraction_numerical': 0.0012277470841006752, 'mean_word_length': 3.300791556728232, '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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1420723', 'n_tokens_mistral': 629, 'n_tokens_neox': 625, 'n_words': 95}