AllCops:
  TargetRubyVersion: 3.2
  NewCops: enable
  SuggestExtensions: false
  Include:
    - '**/*.rb'
    - '**/*.rake'
    - '**/Rakefile'
    - '**/Guardfile'
    - '**/*.ru'
    - '**/Gemfile'
  Exclude:
    - 'db/**/*'
    - 'config/**/*'
    - 'script/**/*'
    - 'bin/**/*'
inherit_from:
  ./rubocop_lint.yml

require:
  - rf/stylez
  - rubocop-rspec
  - rubocop-performance
  - get_env/cops

# Custom cops
Lint/NoENV:
  Enabled: true
Lint/NoHTTParty:
  Enabled: true
Lint/Obscure:
  Enabled: true
Lint/NoGrapeAPI:
  Enabled: true
Lint/UsePositiveInt32Validator:
  Enabled: true
Lint/NoJSON:
  Enabled: true
Lint/NoVCRRecording:
  Enabled: true
  Include:
    - spec/**/*

# Good style cops
Layout/EmptyLineBetweenDefs:
  Enabled: true
  EmptyLineBetweenClassDefs: false
Layout/LineLength:
  Enabled: true
  Max: 120
  AllowHeredoc: true
  AllowURI: true
Layout/ArgumentAlignment:
  Enabled: true
  EnforcedStyle: with_fixed_indentation
Layout/DotPosition:
  Enabled: true
  EnforcedStyle: leading
Layout/MultilineMethodCallIndentation:
  Enabled: true
  EnforcedStyle: indented

RSpec/NotToNot:
  Enabled: true
  EnforcedStyle: to_not
RSpec/PredicateMatcher:
  Enabled: false

Style/Documentation:
  Enabled: true
  Exclude:
    - 'db/migrate/*.rb'
Style/FrozenStringLiteralComment:
  Enabled: true
  EnforcedStyle: always
Style/NumericLiterals:
  Enabled: false
Style/StringLiterals:
  Description: 'Checks if uses of quotes match the configured preference.'
  StyleGuide: '#consistent-string-literals'
  Enabled: true
  VersionAdded: '0.9'
  VersionChanged: '0.36'
  EnforcedStyle: double_quotes
  SupportedStyles:
    - single_quotes
    - double_quotes
  # If `true`, strings which span multiple lines using `\` for continuation must
  # use the same type of quotes on each line.
  ConsistentQuotesInMultiline: true
Style/TrailingCommaInArguments:
  Enabled: true
  EnforcedStyleForMultiline: no_comma
Style/TrailingCommaInArrayLiteral:
  Enabled: true
  EnforcedStyleForMultiline: consistent_comma
Style/TrailingCommaInHashLiteral:
  Enabled: true
  EnforcedStyleForMultiline: consistent_comma
Style/StringLiteralsInInterpolation:
  Enabled: true
  EnforcedStyle: double_quotes

# Dumb lint cops
Lint/AmbiguousOperator:
  Enabled: false
Lint/NonLocalExitFromIterator:
  Enabled: false
Lint/AmbiguousRegexpLiteral:
  Enabled: false

Metrics/ClassLength:
  Enabled: false
Metrics/MethodLength:
  Enabled: false
Metrics/AbcSize:
  Enabled: false
Metrics/PerceivedComplexity:
  Enabled: false
Metrics/CyclomaticComplexity:
  Enabled: false
Metrics/BlockLength:
  Enabled: false
Metrics/ModuleLength:
  Enabled: false
Metrics/ParameterLists:
  Enabled: false

Naming/AccessorMethodName:
  Enabled: false
Naming/PredicateName:
  Enabled: false
Naming/HeredocDelimiterNaming:
  Enabled: false
Naming/RescuedExceptionsVariableName:
  Enabled: false
Naming/VariableNumber:
  Enabled: false

RSpec/MultipleExpectations:
  Enabled: false
RSpec/NamedSubject:
  Enabled: false
RSpec/ExampleLength:
  Enabled: false
RSpec/MessageSpies:
  Enabled: false
RSpec/StubbedMock:
  Enabled: false
RSpec/IndexedLet:
  Enabled: false
RSpec/LetSetup:
  Enabled: false
RSpec/ExpectChange:
  Enabled: false
RSpec/ContextWording:
  Enabled: false
RSpec/NestedGroups:
  Enabled: false
RSpec/MetadataStyle:
  Enabled: false
RSpec/MultipleMemoizedHelpers:
  Enabled: false
RSpec/BeEq:
  Enabled: false
RSpec/AnyInstance:
  Enabled: false

Style/DocumentationMethod:
  Enabled: false
Style/SafeNavigation:
  Enabled: false
Style/PercentLiteralDelimiters:
  Enabled: false
Style/SymbolArray:
  Enabled: false
Style/ClassAndModuleChildren:
  Enabled: false
Style/GuardClause:
  Enabled: false
Style/HashAsLastArrayItem:
  Enabled: false
Style/WordArray:
  Enabled: false
Style/FormatString:
  Enabled: false
Style/FormatStringToken:
  Enabled: false
Style/MapToHash:
  Enabled: false
Style/TrailingUnderscoreVariable:
  Enabled: false