require:
  - rubocop-rspec
  - rubocop-performance
  - rubocop-packaging

AllCops:
  TargetRubyVersion: 2.4
  Exclude:
    # These are auto-generated from a load of features that use aruba
    - 'tmp/**/*'
    # Generated by appraisal
    - 'gemfiles/*.gemfile'

# These two areas will frequently break this limit, so we ignore the limit
Metrics/BlockLength:
  Exclude:
    - './spec/**/*_spec.rb'
    - 'cucumber-rails.gemspec'

# This allows us to read the chmod action in a more reproducible way
Style/NumericLiteralPrefix:
  EnforcedOctalStyle: zero_only

# Enable new cops
Layout/EmptyLinesAroundAttributeAccessor:
  Enabled: true
Layout/SpaceAroundMethodCallOperator:
  Enabled: true
Lint/DeprecatedOpenSSLConstant:
  Enabled: true
Lint/MixedRegexpCaptureTypes:
  Enabled: true
Lint/RaiseException:
  Enabled: true
Lint/StructNewOverride:
  Enabled: true
Style/ExponentialNotation:
  Enabled: true
Style/HashEachMethods:
  Enabled: true
Style/HashTransformKeys:
  Enabled: true
Style/HashTransformValues:
  Enabled: true
Style/RedundantRegexpCharacterClass:
  Enabled: true
Style/RedundantRegexpEscape:
  Enabled: true
Style/SlicingWithRange:
  Enabled: true

## Cucumber Repo styles (Across implementations) ##

Layout/LineLength:
  Max: 200
  IgnoredPatterns:
    - '^Given'
    - '^When'
    - '^Then'

Style/Documentation:
  Enabled: false

Style/RegexpLiteral:
  EnforcedStyle: slashes
  AllowInnerSlashes: true

RSpec/MessageSpies:
  EnforcedStyle: receive

require:
  - rubocop-rspec
  - rubocop-performance
  - rubocop-packaging

AllCops:
  TargetRubyVersion: 2.4
  NewCops: enable
  Exclude:
    # These are auto-generated from a load of features that use aruba
    - 'tmp/**/*'
    # Generated by appraisal
    - 'gemfiles/*.gemfile'

# These two areas will frequently break this limit, so we ignore the limit
Metrics/BlockLength:
  Exclude:
    - './spec/**/*_spec.rb'
    - 'cucumber-rails.gemspec'

# This allows us to read the chmod action in a more reproducible way
Style/NumericLiteralPrefix:
  EnforcedOctalStyle: zero_only

## Cucumber Repo styles (Across implementations) ##

Layout/LineLength:
  Max: 200
  IgnoredPatterns:
    - '^Given'
    - '^When'
    - '^Then'

Style/Documentation:
  Enabled: false

Style/RegexpLiteral:
  EnforcedStyle: slashes
  AllowInnerSlashes: true

RSpec/MessageSpies:
  EnforcedStyle: receive

Enable new cops by default
Enable new cops by default
