<commit_before>class Review < ActiveRecord::Base
  include TranslatedErrors
  extend SymbolField

  STATUSES = %i[ no_response declined accepted started submitted ]
  REMINDABLE_STATUSES = %i[ no_response accepted started ]
  RELATIONSHIPS = %i[ peer line_manager direct_report supplier customer ]

  SECTION_1_RATING_FIELDS = (1 .. 4).map { |i| :"rating_#{i}" }
  SECTION_2_RATING_FIELDS = (5 .. 11).map { |i| :"rating_#{i}" }
  RATING_FIELDS = SECTION_1_RATING_FIELDS + SECTION_2_RATING_FIELDS

  REQUIRED_FIELDS =
    SECTION_1_RATING_FIELDS + SECTION_2_RATING_FIELDS +
    %i[ leadership_comments how_we_work_comments ]

  REQUIRED_FIELDS.each do |field|
    validates field, presence: true, if: ->(a) { a.status == :submitted }
  end
<commit_msg>Changes ranges in `review.rb` to make rubocop happy<commit_after>class Review < ActiveRecord::Base
  include TranslatedErrors
  extend SymbolField

  STATUSES = %i[ no_response declined accepted started submitted ]
  REMINDABLE_STATUSES = %i[ no_response accepted started ]
  RELATIONSHIPS = %i[ peer line_manager direct_report supplier customer ]

  SECTION_1_RATING_FIELDS = (1..4).map { |i| :"rating_#{i}" }
  SECTION_2_RATING_FIELDS = (5..11).map { |i| :"rating_#{i}" }
  RATING_FIELDS = SECTION_1_RATING_FIELDS + SECTION_2_RATING_FIELDS

  REQUIRED_FIELDS =
    SECTION_1_RATING_FIELDS + SECTION_2_RATING_FIELDS +
    %i[ leadership_comments how_we_work_comments ]

  REQUIRED_FIELDS.each do |field|
    validates field, presence: true, if: ->(a) { a.status == :submitted }
  end

{'fraction_non_alphanumeric': 0.099609375, 'fraction_numerical': 0.014322916666666666, 'mean_word_length': 4.888888888888889, 'pattern_counts': {'":': 0, '<': 5, '<?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': '726680', 'n_tokens_mistral': 598, 'n_tokens_neox': 561, 'n_words': 119}