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