forked from rspec/rspec-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
110 lines (85 loc) · 2.53 KB
/
.rubocop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
inherit_from:
- .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
# This should go down over time.
Metrics/ClassLength:
Max: 330
Encoding:
Exclude:
- lib/rspec/core/formatters/exception_presenter.rb
# This should go down over time.
Metrics/AbcSize:
Max: 40
# This should go down over time.
Metrics/LineLength:
Max: 130
# This should go down over time.
Metrics/MethodLength:
Max: 37
# This should go down over time.
Metrics/CyclomaticComplexity:
Max: 12
Metrics/PerceivedComplexity:
Max: 15
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
Lint/LiteralInInterpolation:
Enabled: false
Lint/NonLocalExitFromIterator:
Enabled: false
# We don't care about single vs double qoutes.
Style/StringLiteralsInInterpolation:
Enabled: false
Style/SymbolProc:
Enabled: false
Layout/SpaceAroundOperators:
AllowForAlignment: true
Layout/AccessModifierIndentation:
Enabled: false
Style/RegexpLiteral:
Enabled: false
# This could change depending of the style used
Layout/MultilineOperationIndentation:
Enabled: false
Style/BarePercentLiterals:
Enabled: false
# Exclude the default spec_helper to make it easier to uncomment out
# default settings (for both users and the Cucumber suite).
Style/BlockComments:
Exclude:
- lib/rspec/core/project_initializer/spec/spec_helper.rb
# Not sure what to do with this rule yet.
Style/ClassAndModuleChildren:
Exclude:
- lib/rspec/core/formatters.rb
- lib/rspec/core/notifications.rb
- lib/rspec/core/option_parser.rb
- lib/rspec/core/reporter.rb
Style/RaiseArgs:
Exclude:
- lib/rspec/core/configuration.rb
- lib/rspec/core/hooks.rb
- lib/rspec/core/option_parser.rb
- lib/rspec/core/pending.rb
Performance/RedundantBlockCall:
Exclude:
- lib/rspec/core/rake_task.rb
Lint/IneffectiveAccessModifier:
Exclude:
- lib/rspec/core/memoized_helpers.rb # Fixing this file was too much of a diff
Performance/Caller:
Exclude:
# The suggested fix for this cop only works on more recent rubies. The
# 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'
Metrics/BlockLength:
Max: 193