Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 43 additions & 12 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,76 @@
inherit_from:
- .rubocop_todo.yml
- .rubocop_rspec_base.yml

AllCops:
Exclude:
# This code was taken from the backports gem. We don't want to mess with it.
- lib/rspec/core/backport_random.rb
- spec/rspec/core/bisect/shell_command_spec.rb
- spec/rspec/core/bisect/shell_runner_spec.rb
- 'tmp/**/*'

# This should go down over time.
Metrics/ClassLength:
Max: 330
Metrics/AbcSize:
Max: 40
Exclude:
- 'spec/**/*'

Encoding:
Metrics/BlockLength:
Max: 193
Exclude:
- lib/rspec/core/formatters/exception_presenter.rb
- 'spec/**/*'

# This should go down over time.
Metrics/AbcSize:
Max: 40
Metrics/ClassLength:
Max: 330

# This should go down over time.
Metrics/CyclomaticComplexity:
Max: 12
Exclude:
- 'spec/**/*'

# This should go down over time.
Metrics/LineLength:
Max: 130
Exclude:
- 'spec/**/*'

# This should go down over time.
Metrics/MethodLength:
Max: 37
Exclude:
- 'spec/**/*'

# This should go down over time.
Metrics/CyclomaticComplexity:
Max: 12
Metrics/ModuleLength:
Exclude:
- 'spec/**/*'

Metrics/PerceivedComplexity:
Max: 15
Exclude:
- 'spec/**/*'

Lint/HandleExceptions:
Exclude:
- lib/rspec/core/example.rb
- lib/rspec/core/mocking_adapters/mocha.rb
- lib/rspec/core/runner.rb
- lib/rspec/core/test_unit_assertions_adapter.rb
- script/rspec_with_simplecov
- spec/rspec/core/example_spec.rb

Lint/LiteralInInterpolation:
Enabled: false

Lint/NonLocalExitFromIterator:
Enabled: false

# Since we support Ruby 1.9-, 'encoding: utf-8' comments are meaningful.
Style/Encoding:
Enabled: false

# We don't care about single vs double qoutes.
Style/StringLiteralsInInterpolation:
Enabled: false
Expand Down Expand Up @@ -89,10 +114,14 @@ Style/RaiseArgs:
- lib/rspec/core/hooks.rb
- lib/rspec/core/option_parser.rb
- lib/rspec/core/pending.rb
- spec/rspec/core/formatters/base_text_formatter_spec.rb

Performance/RedundantBlockCall:
Exclude:
- lib/rspec/core/rake_task.rb
- benchmarks/call_v_yield.rb
- benchmarks/capture_block_vs_yield.rb
- benchmarks/to_proc_v_not_to_proc.rb

Lint/IneffectiveAccessModifier:
Exclude:
Expand All @@ -104,7 +133,9 @@ Performance/Caller:
# speed up can be substantial (previous optimization work I've done on
# RSpec involved caller optimization) but I haven't benchmarked this
# particular case to see if it's worth introducing version branching.
- 'lib/rspec/core/example_group.rb'
- lib/rspec/core/example_group.rb
- spec/support/formatter_support.rb

Metrics/BlockLength:
Max: 193
Layout/SpaceBeforeBlockBraces:
EnforcedStyle: space
EnforcedStyleForEmptyBraces: space
Loading