<commit_before>inherit_from: .rubocop_todo.yml
require:
  - ./test/safe_navigation_cop.rb
  - rubocop-performance
  - rubocop-rails
  - rubocop-minitest

AllCops:
  Exclude:
    - config/initializers/forbidden_yaml.rb
    - app/helpers/dynamic_errors_helper.rb
    - !ruby/regexp /(vendor|bundle|bin|db|tmp)\/.*/
  DisplayCopNames: true
  DisplayStyleGuide: true
  TargetRubyVersion: 3.1
  NewCops: enable

Rails:
  Enabled: true

# TODO: Enable on rubocop 0.67.3
Rails/ActiveRecordOverride:
  Enabled: false

Rails/SkipsModelValidations:
  Enabled: false

Rails/LexicallyScopedActionFilter:
  Enabled: false

Rails/RefuteMethods:
  Enabled: false

Rails/HelperInstanceVariable:
  Enabled: false

Rails/FilePath:
  Enabled: false

Rails/RakeEnvironment:
  Exclude:
    - lib/tasks/gen_erd.rake
    - lib/tasks/elasticsearch.rake

Rails/UnknownEnv:
  Environments:
    - production
    - development
    - staging
    - test

Rails/UniqueValidationWithoutIndex:
  Enabled: false

Layout/ArgumentAlignment:
  Enabled: false

Metrics/AbcSize:
  Max: 42 # TODO: Lower to 15
  Exclude:
    - test/functional/api/v1/owners_controller_test.rb

Metrics/BlockLength:
  Exclude:
    - test/**/*.rb

Metrics/ClassLength:
  Max: 350 # TODO: Lower to 100
  Exclude:
    - test/**/*.rb

Metrics/CyclomaticComplexity:
  Max: 9 # TODO: Lower to 6

Layout/LineLength:
  Max: 150

Metrics/MethodLength:
  Max: 30 # TODO: Lower to 10

Metrics/ModuleLength:
  Exclude:
    - lib/patterns.rb
    - app/models/concerns/rubygem_searchable.rb
    - app/helpers/rubygems_helper.rb

Metrics/PerceivedComplexity:
  Max: 10 # TODO: Lower to 7

# TODO: Enable on rubocop 0.67.3
Naming/RescuedExceptionsVariableName:
  Exclude:
    - app/jobs/notifier.rb

Performance/RedundantMerge:
  Enabled: false

Layout/ParameterAlignment:
  EnforcedStyle: with_fixed_indentation
<commit_msg>Re-enable some cops in RuboCop<commit_after>inherit_from: .rubocop_todo.yml
require:
  - ./test/safe_navigation_cop.rb
  - rubocop-performance
  - rubocop-rails
  - rubocop-minitest

AllCops:
  Exclude:
    - config/initializers/forbidden_yaml.rb
    - app/helpers/dynamic_errors_helper.rb
    - !ruby/regexp /(vendor|bundle|bin|db|tmp)\/.*/
  DisplayCopNames: true
  DisplayStyleGuide: true
  TargetRubyVersion: 3.1
  NewCops: enable

Rails:
  Enabled: true

Rails/SkipsModelValidations:
  Enabled: false

Rails/LexicallyScopedActionFilter:
  Enabled: false

Rails/RefuteMethods:
  Enabled: false

Rails/HelperInstanceVariable:
  Enabled: false

Rails/FilePath:
  Enabled: false

Rails/RakeEnvironment:
  Exclude:
    - lib/tasks/gen_erd.rake
    - lib/tasks/elasticsearch.rake

Rails/UnknownEnv:
  Environments:
    - production
    - development
    - staging
    - test

Rails/UniqueValidationWithoutIndex:
  Enabled: false

Layout/ArgumentAlignment:
  Enabled: false

Metrics/AbcSize:
  Max: 42 # TODO: Lower to 15
  Exclude:
    - test/functional/api/v1/owners_controller_test.rb

Metrics/BlockLength:
  Exclude:
    - test/**/*.rb

Metrics/ClassLength:
  Max: 350 # TODO: Lower to 100
  Exclude:
    - test/**/*.rb

Metrics/CyclomaticComplexity:
  Max: 9 # TODO: Lower to 6

Layout/LineLength:
  Max: 150

Metrics/MethodLength:
  Max: 30 # TODO: Lower to 10

Metrics/ModuleLength:
  Exclude:
    - lib/patterns.rb
    - app/models/concerns/rubygem_searchable.rb
    - app/helpers/rubygems_helper.rb

Metrics/PerceivedComplexity:
  Max: 10 # TODO: Lower to 7

Performance/RedundantMerge:
  Enabled: false

Layout/ParameterAlignment:
  EnforcedStyle: with_fixed_indentation

{'fraction_non_alphanumeric': 0.09773371104815864, 'fraction_numerical': 0.01643059490084986, 'mean_word_length': 3.5679172056921087, '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': '7265277', 'n_tokens_mistral': 1340, 'n_tokens_neox': 1251, 'n_words': 242}