4
4
# This file contains defaults for RSpec projects. Individual projects
5
5
# can customize by inheriting this file and overriding particular settings.
6
6
7
- AccessModifierIndentation :
7
+ Layout/ AccessModifierIndentation :
8
8
Enabled : false
9
9
10
10
# "Use alias_method instead of alias"
11
11
# We're fine with `alias`.
12
- Alias :
12
+ Style/ Alias :
13
13
Enabled : false
14
14
15
- AlignParameters :
16
- EnforcedStyle : with_first_parameter
17
-
18
15
# "Avoid the use of the case equality operator ==="
19
16
# We prefer using `Class#===` over `Object#is_a?` because `Class#===`
20
17
# is less likely to be monkey patched than `is_a?` on a user object.
21
- CaseEquality :
18
+ Style/ CaseEquality :
22
19
Enabled : false
23
20
24
21
# Warns when the class is excessively long.
25
- ClassLength :
22
+ Metrics/ ClassLength :
26
23
Max : 100
27
24
28
- CollectionMethods :
25
+ Style/ CollectionMethods :
29
26
PreferredMethods :
30
27
reduce : ' inject'
31
28
32
29
# Over time we'd like to get this down, but this is what we're at now.
33
- CyclomaticComplexity :
30
+ Metrics/ CyclomaticComplexity :
34
31
Max : 10
35
32
36
33
# We use YARD to enforce documentation. It works better than rubocop's
37
34
# enforcement...rubocop complains about the places we re-open
38
35
# `RSpec::Expectations` and `RSpec::Matchers` w/o having doc commments.
39
- Documentation :
36
+ Style/ Documentation :
40
37
Enabled : false
41
38
42
39
# We still support 1.8.7 which requires trailing dots
43
- DotPosition :
40
+ Layout/ DotPosition :
44
41
EnforcedStyle : trailing
45
42
46
- DoubleNegation :
43
+ Style/ DoubleNegation :
47
44
Enabled : false
48
45
49
46
# each_with_object is unavailable on 1.8.7 so we have to disable this one.
50
- EachWithObject :
47
+ Style/ EachWithObject :
51
48
Enabled : false
52
49
53
- FormatString :
50
+ Style/ FormatString :
54
51
EnforcedStyle : percent
55
52
56
53
# As long as we support ruby 1.8.7 we have to use hash rockets.
57
- HashSyntax :
54
+ Style/ HashSyntax :
58
55
EnforcedStyle : hash_rockets
59
56
60
57
# We can't use the new lambda syntax, since we still support 1.8.7.
61
- Lambda :
58
+ Style/ Lambda :
62
59
Enabled : false
63
60
64
61
# Over time we'd like to get this down, but this is what we're at now.
65
- LineLength :
62
+ Layout/ LineLength :
66
63
Max : 100
67
64
68
65
# Over time we'd like to get this down, but this is what we're at now.
69
- MethodLength :
66
+ Metrics/ MethodLength :
70
67
Max : 15
71
68
72
69
# Who cares what we call the argument for binary operator methods?
73
- BinaryOperatorParameterName :
70
+ Naming/ BinaryOperatorParameterName :
74
71
Enabled : false
75
72
76
- PercentLiteralDelimiters :
73
+ Style/ PercentLiteralDelimiters :
77
74
PreferredDelimiters :
78
75
' % ' : () # double-quoted string
79
76
' %i ' : ' []' # array of symbols
@@ -87,41 +84,44 @@ PercentLiteralDelimiters:
87
84
88
85
# We have too many special cases where we allow generator methods or prefer a
89
86
# prefixed predicate due to it's improved readability.
90
- PredicateName :
87
+ Naming/ PredicateName :
91
88
Enabled : false
92
89
93
90
# On 1.8 `proc` is `lambda`, so we use `Proc.new` to ensure we get real procs on all supported versions.
94
91
# http://batsov.com/articles/2014/02/04/the-elements-of-style-in-ruby-number-12-proc-vs-proc-dot-new/
95
- Proc :
92
+ Style/ Proc :
96
93
Enabled : false
97
94
98
95
# Exceptions should be rescued with `Support::AllExceptionsExceptOnesWeMustNotRescue`
99
- RescueException :
96
+ Lint/ RescueException :
100
97
Enabled : true
101
98
102
99
# We haven't adopted the `fail` to signal exceptions vs `raise` for re-raises convention.
103
- SignalException :
100
+ Style/ SignalException :
104
101
Enabled : false
105
102
106
103
# We've tended to use no space, so it's less of a change to stick with that.
107
- SpaceAroundEqualsInParameterDefault :
104
+ Layout/ SpaceAroundEqualsInParameterDefault :
108
105
EnforcedStyle : no_space
109
106
110
107
# We don't care about single vs double qoutes.
111
- StringLiterals :
108
+ Style/ StringLiterals :
112
109
Enabled : false
113
110
114
111
# This rule favors constant names from the English standard library which we don't load.
115
112
Style/SpecialGlobalVars :
116
113
Enabled : false
117
114
118
- Style/TrailingCommaInLiteral :
115
+ Style/TrailingCommaInArrayLiteral :
116
+ Enabled : false
117
+
118
+ Style/TrailingCommaInHashLiteral :
119
119
Enabled : false
120
120
121
121
Style/TrailingCommaInArguments :
122
122
Enabled : false
123
123
124
- TrivialAccessors :
124
+ Style/ TrivialAccessors :
125
125
AllowDSLWriters : true
126
126
AllowPredicates : true
127
127
ExactNameMatch : true
@@ -135,6 +135,15 @@ Layout/EmptyLineBetweenDefs:
135
135
Layout/FirstParameterIndentation :
136
136
Enabled : false
137
137
138
+ Layout/ParameterAlignment :
139
+ EnforcedStyle : with_first_parameter
140
+
141
+ Layout/SpaceInsideBlockBraces :
142
+ Enabled : false
143
+
144
+ Layout/SpaceInsideParens :
145
+ Enabled : false
146
+
138
147
Naming/ConstantName :
139
148
Enabled : false
140
149
@@ -162,7 +171,10 @@ Style/IfUnlessModifier:
162
171
Style/IfUnlessModifierOfIfUnless :
163
172
Enabled : false
164
173
165
- Style/MethodMissing :
174
+ Lint/MissingSuper :
175
+ Enabled : false
176
+
177
+ Style/MissingRespondToMissing :
166
178
Enabled : false
167
179
168
180
Style/MixinUsage :
@@ -243,24 +255,19 @@ Style/StderrPuts:
243
255
Style/TernaryParentheses :
244
256
Enabled : false
245
257
246
- # This could likely be enabled, but it had a false positive on rspec-mocks
247
- # (suggested change was not behaviour preserving) so I don't trust it.
248
- Performance/HashEachMethods :
249
- Enabled : false
250
-
251
258
Naming/HeredocDelimiterNaming :
252
259
Enabled : false
253
260
254
- Layout/EmptyLineAfterMagicComment :
261
+ Layout/AssignmentIndentation :
255
262
Enabled : false
256
263
257
- Layout/IndentArray :
264
+ Layout/EmptyLineAfterMagicComment :
258
265
Enabled : false
259
266
260
- Layout/IndentAssignment :
267
+ Layout/FirstArrayElementIndentation :
261
268
Enabled : false
262
269
263
- Layout/IndentHeredoc :
270
+ Layout/HeredocIndentation :
264
271
Enabled : false
265
272
266
273
Layout/SpaceInsidePercentLiteralDelimiters :
0 commit comments