<commit_before>require:
  - rubocop-performance
  - rubocop-rails
  - rubocop-rspec

AllCops:
  Exclude:
  - 'bin/*'
  - 'spec/dummy/bin/*'
  - 'spec/dummy/db/schema.rb'
  NewCops: enable
  TargetRubyVersion: 2.5

Rails:
  Enabled: true

# We have duplication due to extra logic in the Gemfile
Bundler/DuplicatedGem:
  Enabled: false

Layout/BeginEndAlignment:
  EnforcedStyleAlignWith: begin

# Place . on the previous line
Layout/DotPosition:
  EnforcedStyle: trailing

# Spaces in strings with line continuations go at the beginning of the line.
Layout/LineContinuationLeadingSpace:
  EnforcedStyle: leading

# Lenient line length that fits in pull requests
Layout/LineLength:
  Max: 92

Layout/MultilineMethodCallBraceLayout:
  EnforcedStyle: same_line

# Multi-line operations should be simply indented. Aligning them makes it even
# harder to keep a sane line length.
Layout/MultilineMethodCallIndentation:
  EnforcedStyle: indented

# Multi-line operations should be simply indented. Aligning them makes it even
# harder to keep a sane line length.
Layout/MultilineOperationIndentation:
  EnforcedStyle: indented

# Uniform block layout
Layout/SpaceBeforeBlockBraces:
  EnforcedStyleForEmptyBraces: space

# Assume the programmer knows how bracketed block syntax works
Lint/AmbiguousBlockAssociation:
  Enabled: false

# Allow if (foo = get_foo) style
Lint/AssignmentInCondition:
  AllowSafeAssignment: true

# Suppress BlockLength for some files:
# - Spec describe blocks can be any length
# - Routes blocks can be any length
# - FactoryBot factory blocks can be any length
# - Gem specification blocks can be any length
Metrics/BlockLength:
  Exclude:
    - 'publify_core.gemspec'
    - 'config/routes.rb'
    - 'lib/publify_core/testing_support/factories/*'
    - 'spec/**/*'

# Initial schema has a very large change method
Metrics/MethodLength:
  Exclude:
    - 'db/migrate/113_initial_schema.rb'

Performance/StartWith:
  AutoCorrect: true

Performance/EndWith:
  AutoCorrect: true

# Migrations should not use ApplicationRecord
Rails/ApplicationRecord:
  Exclude:
    - 'db/migrate/*'

# This cop has issues and is too database-specific
Rails/BulkChangeTable:
  Enabled: false

# The manifest and i18n tasks do not need environment
Rails/RakeEnvironment:
  Exclude:
    - 'lib/tasks/manifest.rake'
    - 'lib/tasks/i18n.rake'

# Migrations should not do validations in general?
Rails/SkipsModelValidations:
  Exclude:
    - 'db/migrate/*'

Capybara/FeatureMethods:
  Exclude:
    - 'spec/features/**_spec.rb'

# Allow the use of 'and' 'or' in control structures.
Style/AndOr:
  EnforcedStyle: conditionals

Style/ClassAndModuleChildren:<commit_msg>Fix cop namespace for Capybara/FeatureMethods<commit_after>require:
  - rubocop-performance
  - rubocop-rails
  - rubocop-rspec

AllCops:
  Exclude:
  - 'bin/*'
  - 'spec/dummy/bin/*'
  - 'spec/dummy/db/schema.rb'
  NewCops: enable
  TargetRubyVersion: 2.5

Rails:
  Enabled: true

# We have duplication due to extra logic in the Gemfile
Bundler/DuplicatedGem:
  Enabled: false

Layout/BeginEndAlignment:
  EnforcedStyleAlignWith: begin

# Place . on the previous line
Layout/DotPosition:
  EnforcedStyle: trailing

# Spaces in strings with line continuations go at the beginning of the line.
Layout/LineContinuationLeadingSpace:
  EnforcedStyle: leading

# Lenient line length that fits in pull requests
Layout/LineLength:
  Max: 92

Layout/MultilineMethodCallBraceLayout:
  EnforcedStyle: same_line

# Multi-line operations should be simply indented. Aligning them makes it even
# harder to keep a sane line length.
Layout/MultilineMethodCallIndentation:
  EnforcedStyle: indented

# Multi-line operations should be simply indented. Aligning them makes it even
# harder to keep a sane line length.
Layout/MultilineOperationIndentation:
  EnforcedStyle: indented

# Uniform block layout
Layout/SpaceBeforeBlockBraces:
  EnforcedStyleForEmptyBraces: space

# Assume the programmer knows how bracketed block syntax works
Lint/AmbiguousBlockAssociation:
  Enabled: false

# Allow if (foo = get_foo) style
Lint/AssignmentInCondition:
  AllowSafeAssignment: true

# Suppress BlockLength for some files:
# - Spec describe blocks can be any length
# - Routes blocks can be any length
# - FactoryBot factory blocks can be any length
# - Gem specification blocks can be any length
Metrics/BlockLength:
  Exclude:
    - 'publify_core.gemspec'
    - 'config/routes.rb'
    - 'lib/publify_core/testing_support/factories/*'
    - 'spec/**/*'

# Initial schema has a very large change method
Metrics/MethodLength:
  Exclude:
    - 'db/migrate/113_initial_schema.rb'

Performance/StartWith:
  AutoCorrect: true

Performance/EndWith:
  AutoCorrect: true

# Migrations should not use ApplicationRecord
Rails/ApplicationRecord:
  Exclude:
    - 'db/migrate/*'

# This cop has issues and is too database-specific
Rails/BulkChangeTable:
  Enabled: false

# The manifest and i18n tasks do not need environment
Rails/RakeEnvironment:
  Exclude:
    - 'lib/tasks/manifest.rake'
    - 'lib/tasks/i18n.rake'

# Migrations should not do validations in general?
Rails/SkipsModelValidations:
  Exclude:
    - 'db/migrate/*'

RSpec/Capybara/FeatureMethods:
  Exclude:
    - 'spec/features/**_spec.rb'

# Allow the use of 'and' 'or' in control structures.
Style/AndOr:
  EnforcedStyle: conditionals

Style/ClassAndModuleChildren:
{'fraction_non_alphanumeric': 0.0783289817232376, 'fraction_numerical': 0.004102946661693398, 'mean_word_length': 4.23219512195122, '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': '631340', 'n_tokens_mistral': 1735, 'n_tokens_neox': 1678, 'n_words': 505}