<commit_before>PuppetLint.new_check(:duplicate_class_parameters) do
  def check
    class_indexes.each do |class_idx|
      seen = Hash.new(0)
      inside = nil

      # if there are no params there is nothing to do, return early.
      return if class_idx[:param_tokens].nil?

      class_idx[:param_tokens].each do |token|
        class_name = class_idx[:name_token].value

        if token.type == :VARIABLE
          next_type = token.next_code_token.type

          # handling for lines with an equals and a variable on the rhs
          if next_type == :EQUALS
            inside = true
          elsif next_type == :COMMA
            inside = false
          end

          # only proceed if we're at the end of a declaration.
          next if !inside
<commit_msg>Don't raise a warning if a RHS string contains a variable<commit_after>PuppetLint.new_check(:duplicate_class_parameters) do
  def check
    class_indexes.each do |class_idx|
      seen = Hash.new(0)
      inside = nil

      # if there are no params there is nothing to do, return early.
      return if class_idx[:param_tokens].nil?

      class_idx[:param_tokens].each do |token|
        class_name = class_idx[:name_token].value

        if token.type == :VARIABLE
          next_type = token.next_code_token.type

          # handling for lines with an equals and a variable on the rhs
          if next_type == :EQUALS
            inside = true

            two_away = token.next_code_token.next_code_token.type
            if two_away == :DQPRE
              inside = false
            end
          elsif next_type == :COMMA
            inside = false
          end

          # only proceed if we're at the end of a declaration.
          next if !inside

{'fraction_non_alphanumeric': 0.0673963133640553, 'fraction_numerical': 0.001152073732718894, 'mean_word_length': 2.058098591549296, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1212307', 'n_tokens_mistral': 503, 'n_tokens_neox': 487, 'n_words': 162}