# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2022-10-25 12:04:09 UTC using RuboCop version 1.28.2.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 2
# This cop supports safe auto-correction (--auto-correct).
# Configuration parameters: EnforcedStyleAlignWith, Severity.
# SupportedStylesAlignWith: start_of_line, begin
Layout/BeginEndAlignment:
  Exclude:
    - 'lib/generators/rspec/scaffold/scaffold_generator.rb'
    - 'lib/rspec/rails/tasks/rspec.rake'

# Offense count: 2
# This cop supports safe auto-correction (--auto-correct).
# Configuration parameters: AllowAliasSyntax, AllowedMethods.
# AllowedMethods: alias_method, public, protected, private
Layout/EmptyLinesAroundAttributeAccessor:
  Exclude:
    - 'lib/rspec/rails/adapters.rb'
    - 'spec/rspec/rails/matchers/be_valid_spec.rb'

# Offense count: 4
# This cop supports safe auto-correction (--auto-correct).
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
# SupportedHashRocketStyles: key, separator, table
# SupportedColonStyles: key, separator, table
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
Layout/HashAlignment:
  Exclude:
    - 'rspec-rails.gemspec'

# Offense count: 34
# This cop supports safe auto-correction (--auto-correct).
# Configuration parameters: .
# SupportedStyles: space, no_space
Layout/SpaceAroundEqualsInParameterDefault:
  EnforcedStyle: space

# Offense count: 27
# Configuration parameters: IgnoredMethods.
Lint/AmbiguousBlockAssociation:
  Exclude:
    - 'spec/rspec/rails/matchers/action_cable/have_broadcasted_to_spec.rb'
    - 'spec/rspec/rails/matchers/active_job_spec.rb'
    - 'spec/rspec/rails/matchers/be_a_new_spec.rb'
    - 'spec/rspec/rails/matchers/have_enqueued_mail_spec.rb'
    - 'spec/rspec/rails/setup_and_teardown_adapter_spec.rb'
    - 'spec/rspec/rails/view_rendering_spec.rb'
    - 'spec/rspec/rails/view_spec_methods_spec.rb'

# Offense count: 1
# This cop supports safe auto-correction (--auto-correct).
Lint/AmbiguousOperator:
  Exclude:
    - 'Rakefile'

# Offense count: 5
# This cop supports safe auto-correction (--auto-correct).
Lint/AmbiguousRegexpLiteral:
  Exclude:
    - 'features/step_definitions/additional_cli_steps.rb'

# Offense count: 3
# Configuration parameters: AllowSafeAssignment.
Lint/AssignmentInCondition:
  Exclude:
    - 'lib/rspec/rails/adapters.rb'
    - 'lib/rspec/rails/tasks/rspec.rake'

# Offense count: 15
# Configuration parameters: AllowedMethods.
# AllowedMethods: enums
Lint/ConstantDefinitionInBlock:
  Exclude:
    - 'example_app_generator/spec/support/default_preview_path'
    - 'example_app_generator/spec/verify_custom_renderers_spec.rb'
    - 'example_app_generator/spec/verify_mailer_preview_path_spec.rb'
    - 'spec/rspec/rails/example/helper_example_group_spec.rb'
    - 'spec/rspec/rails/example/mailer_example_group_spec.rb'
    - 'spec/rspec/rails/example/view_example_group_spec.rb'
    - 'spec/rspec/rails/matchers/be_valid_spec.rb'
    - 'spec/rspec/rails/view_rendering_spec.rb'
    - 'spec/rspec/rails/view_spec_methods_spec.rb'

# Offense count: 1
Lint/DuplicateMethods:
  Exclude:
    - 'example_app_generator/no_active_record/app/models/in_memory/model.rb'

# Offense count: 2
Lint/EmptyExpression:
  Exclude:
    - 'lib/rspec/rails/adapters.rb'

# Offense count: 1
# This cop supports unsafe auto-correction (--auto-correct-all).
Lint/NonDeterministicRequireOrder:
  Exclude:
    - 'spec/spec_helper.rb'

# Offense count: 6
# Configuration parameters: AllowComments, AllowNil.
Lint/SuppressedException:
  Exclude:
    - 'example_app_generator/generate_stuff.rb'
    - 'example_app_generator/spec/support/default_preview_path'
    - 'lib/rspec/rails/vendor/capybara.rb'

# Offense count: 2
# Configuration parameters: AllowedPatterns, IgnoredPatterns.
# AllowedPatterns: (?-mix:(exactly|at_least|at_most)\(\d+\)\.times)
Lint/UnreachableLoop:
  Exclude:
    - 'spec/rspec/rails/fixture_file_upload_support_spec.rb'
    - 'spec/rspec/rails/fixture_support_spec.rb'

# Offense count: 12
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
Metrics/AbcSize:
  Max: 71

# Offense count: 2
# Configuration parameters: CountKeywordArgs.
Metrics/ParameterLists:
  MaxOptionalParameters: 5
  Max: 6

# Offense count: 3
# Configuration parameters: IgnoredMethods.
Metrics/PerceivedComplexity:
  Max: 15

# Offense count: 1
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
# CheckDefinitionPathHierarchyRoots: lib, spec, test, src
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
Naming/FileName:
  Exclude:
    - 'lib/rspec-rails.rb'

# Offense count: 7
# Configuration parameters: EnforcedStyleForLeadingUnderscores.
# SupportedStylesForLeadingUnderscores: disallowed, required, optional
Naming/MemoizedInstanceVariableName:
  Exclude:
    - 'example_app_generator/generate_stuff.rb'
    - 'example_app_generator/no_active_record/app/models/in_memory/model.rb'
    - 'lib/generators/rspec.rb'
    - 'lib/rspec/rails/matchers/have_http_status.rb'
    - 'spec/rspec/rails/matchers/action_cable/have_broadcasted_to_spec.rb'
    - 'spec/rspec/rails/matchers/active_job_spec.rb'

# Offense count: 6
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
# AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to
Naming/MethodParameterName:
  Exclude:
    - 'benchmarks/before_block_capture_block_vs_yield.rb'
    - 'lib/rspec/rails/example/routing_example_group.rb'
    - 'spec/rspec/rails/example/controller_example_group_spec.rb'

# Offense count: 4
# This cop supports safe auto-correction (--auto-correct).
# Configuration parameters: PreferredName.
Naming/RescuedExceptionsVariableName:
  Exclude:
    - 'lib/rspec/rails/matchers/base_matcher.rb'
    - 'lib/rspec/rails/matchers/have_http_status.rb'

# Offense count: 2
# This cop supports safe auto-correction (--auto-correct).
Style/BisectedAttrAccessor:
  Exclude:
    - 'lib/rspec/rails/view_rendering.rb'

# Offense count: 18
# This cop supports safe auto-correction (--auto-correct).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: nested, compact
Style/ClassAndModuleChildren:
  Enabled: false

# Offense count: 5
# This cop supports safe auto-correction (--auto-correct).
Style/CommentedKeyword:
  Exclude:
    - 'spec/rspec/rails/example/view_example_group_spec.rb'

# Offense count: 6
# This cop supports safe auto-correction (--auto-correct).
Style/ExplicitBlockArgument:
  Exclude:
    - 'benchmarks/before_block_capture_block_vs_yield.rb'
    - 'features/support/env.rb'
    - 'spec/sanity_check_spec.rb'

# Offense count: 154
# This cop supports safe auto-correction (--auto-correct).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: always, always_true, never
Style/FrozenStringLiteralComment:
  Enabled: false

# Offense count: 3
# Configuration parameters: AllowedVariables.
Style/GlobalVars:
  Exclude:
    - 'spec/support/shared_examples.rb'

# Offense count: 2
# Configuration parameters: MinBranchesCount.
Style/HashLikeCase:
  Exclude:
    - 'lib/rspec/rails/matchers/action_cable/have_broadcasted_to.rb'
    - 'lib/rspec/rails/matchers/active_job.rb'

# Offense count: 4
# This cop supports safe auto-correction (--auto-correct).
# Configuration parameters: EnforcedOctalStyle.
# SupportedOctalStyles: zero_with_o, zero_only
Style/NumericLiteralPrefix:
  Exclude:
    - 'example_app_generator/generate_action_mailer_specs.rb'
    - 'example_app_generator/generate_app.rb'
    - 'spec/sanity_check_spec.rb'

# Offense count: 2
# Configuration parameters: AllowedMethods.
# AllowedMethods: respond_to_missing?
Style/OptionalBooleanParameter:
  Exclude:
    - 'example_app_generator/spec/verify_custom_renderers_spec.rb'
    - 'lib/rspec/rails/view_rendering.rb'

# Offense count: 23
# This cop supports safe auto-correction (--auto-correct).
# Configuration parameters: AllowIfMethodIsEmpty.
Style/SingleLineMethods:
  Exclude:
    - 'spec/rspec/rails/example/controller_example_group_spec.rb'
    - 'spec/rspec/rails/matchers/active_job_spec.rb'
    - 'spec/rspec/rails/matchers/be_a_new_spec.rb'
    - 'spec/rspec/rails/matchers/has_spec.rb'
    - 'spec/rspec/rails/matchers/have_enqueued_mail_spec.rb'
    - 'spec/rspec/rails/matchers/have_rendered_spec.rb'
    - 'spec/rspec/rails/setup_and_teardown_adapter_spec.rb'

# Offense count: 1
# This cop supports safe auto-correction (--auto-correct).
# Configuration parameters: AllowModifier.
Style/SoleNestedConditional:
  Exclude:
    - 'lib/rspec/rails/tasks/rspec.rake'

# Offense count: 4
# This cop supports unsafe auto-correction (--auto-correct-all).
# Configuration parameters: Mode.
Style/StringConcatenation:
  Exclude:
    - 'lib/rspec/rails/configuration.rb'
    - 'lib/rspec/rails/example/controller_example_group.rb'
    - 'lib/rspec/rails/example/view_example_group.rb'
    - 'spec/support/shared_examples.rb'
