<commit_before>
class StartPoint

  def initialize(start_points, path, display_name = nil, image_name = nil)
    @start_points = start_points
    @path = path
    @display_name = display_name
    @image_name = image_name
  end

  attr_reader :path

  def parent
    @start_points
  end

  def create_kata_manifest(id = unique_id, now = time_now)
    manifest = {
                       'id' => id,
                  'created' => now,
               'image_name' => image_name,
             'display_name' => display_name,
       'filename_extension' => filename_extension,
          'progress_regexs' => progress_regexs,
      'highlight_filenames' => highlight_filenames,
       'lowlight_filenames' => lowlight_filenames,
          'red_amber_green' => red_amber_green,
                 'language' => name,
                 'tab_size' => tab_size
    }
    manifest['visible_files'] = visible_files
    manifest['visible_files']['output'] = ''
    manifest
  end

  # required manifest properties

  def display_name
    # See comments below
    @display_name ||= manifest_property
  end

  def image_name
    # See comments below
    @image_name ||= manifest_property
  end

  def red_amber_green
    manifest_property
  end

  def visible_filenames
    manifest_property
  end

  def visible_files
    Hash[visible_filenames.collect { |filename|
      [filename, disk[path].read(filename)]
    }]
  end

  # optional manifest properties

  def filename_extension
    manifest_property || ''
  end

  def highlight_filenames
    manifest_property || []
  end

  def progress_regexs
    manifest_property || []
  end

  def tab_size
    manifest_property || 4
  end

  # not manifest properties

  def lowlight_filenames
    # See comments below
    if highlight_filenames.empty?
      ['cyber-dojo.sh', 'makefile', 'Makefile', 'unity.license.txt']
    else
      visible_filenames - highlight_filenames
    end
  end

  def name
    # as stored in the kata's manifest<commit_msg>[ci skip] add comment on start-point progress_regexs property flaw<commit_after>
class StartPoint

  def initialize(start_points, path, display_name = nil, image_name = nil)
    @start_points = start_points
    @path = path
    @display_name = display_name
    @image_name = image_name
  end

  attr_reader :path

  def parent
    @start_points
  end

  def create_kata_manifest(id = unique_id, now = time_now)
    manifest = {
                       'id' => id,
                  'created' => now,
               'image_name' => image_name,
             'display_name' => display_name,
       'filename_extension' => filename_extension,
          'progress_regexs' => progress_regexs,
      'highlight_filenames' => highlight_filenames,
       'lowlight_filenames' => lowlight_filenames,
          'red_amber_green' => red_amber_green,
                 'language' => name,
                 'tab_size' => tab_size
    }
    manifest['visible_files'] = visible_files
    manifest['visible_files']['output'] = ''
    manifest
  end

  # required manifest properties

  def display_name
    # See comments below
    @display_name ||= manifest_property
  end

  def image_name
    # See comments below
    @image_name ||= manifest_property
  end

  def red_amber_green
    manifest_property
  end

  def visible_filenames
    manifest_property
  end

  def visible_files
    Hash[visible_filenames.collect { |filename|
      [filename, disk[path].read(filename)]
    }]
  end

  # optional manifest properties

  def filename_extension
    manifest_property || ''
  end

  def highlight_filenames
    manifest_property || []
  end

  def progress_regexs
    # Issue: [] is not a valid progress_regex. It needs two regexs.
    # This affects zipper.zip_tag()
    manifest_property || []
  end

  def tab_size
    manifest_property || 4
  end

  # not manifest properties

  def lowlight_filenames
    # See comments below
    if highlight_filenames.empty?
      ['cyber-dojo.sh', 'makefile', 'Makefile', 'unity.license.txt']
    else
      visible_filenames - highlight_filenames
    end
  end

  def name
    # as stored in the kata's manifest
{'fraction_non_alphanumeric': 0.0822615869934482, 'fraction_numerical': 0.000485319097306479, 'mean_word_length': 2.6968609865470854, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 25, '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': '2727184', 'n_tokens_mistral': 1272, 'n_tokens_neox': 1222, 'n_words': 298}