4
4
5
5
AllCops :
6
6
TargetRubyVersion : 2.5
7
+ DisabledByDefault : true
7
8
Exclude :
8
9
- bin/**/*
9
10
- test/dummy/bin/**/*
@@ -13,44 +14,8 @@ Performance:
13
14
Exclude :
14
15
- ' test/**/*'
15
16
16
- Rails :
17
- Enabled : true
18
-
19
- Layout/LineLength :
20
- Enabled : false
21
-
22
- Metrics/AbcSize :
23
- Max : 30
24
-
25
- Metrics/MethodLength :
26
- Max : 100
27
-
28
- Metrics/BlockLength :
29
- Max : 60
30
-
31
- Metrics/ClassLength :
32
- Enabled : false
33
-
34
- Metrics/ParameterLists :
35
- Enabled : false
36
-
37
- Style/IfUnlessModifier :
38
- Enabled : false
39
-
40
- Style/GuardClause :
41
- Enabled : false
42
-
43
- Style/Documentation :
44
- Enabled : false
45
-
46
- Style/ClassAndModuleChildren :
47
- Enabled : false
48
-
49
- Naming/AccessorMethodName :
50
- Enabled : false
51
-
52
- Naming/MemoizedInstanceVariableName :
53
- Enabled : false
17
+ # Metrics/AbcSize:
18
+ # Max: 30
54
19
55
20
# Prefer assert_not over assert !
56
21
Rails/AssertNot :
@@ -62,25 +27,23 @@ Rails/RefuteMethods:
62
27
Include :
63
28
- ' test/**/*'
64
29
65
- # Prefer &&/|| over and/or.
66
- Style/AndOr :
30
+ Rails/IndexBy :
67
31
Enabled : true
68
32
69
- # Do not use braces for hash literals when they are the last argument of a
70
- # method call.
71
- Style/HashEachMethods :
33
+ Rails/IndexWith :
72
34
Enabled : true
73
35
74
- Style/HashTransformKeys :
75
- Enabled : true
76
-
77
- Style/HashTransformValues :
36
+ # Prefer &&/|| over and/or.
37
+ Style/AndOr :
78
38
Enabled : true
79
39
80
40
# Align `when` with `case`.
81
41
Layout/CaseIndentation :
82
42
Enabled : true
83
43
44
+ Layout/ClosingHeredocIndentation :
45
+ Enabled : true
46
+
84
47
# Align comments with method definitions.
85
48
Layout/CommentIndentation :
86
49
Enabled : true
@@ -98,10 +61,10 @@ Layout/EndAlignment:
98
61
Layout/EmptyLineAfterMagicComment :
99
62
Enabled : true
100
63
101
- Layout/EmptyLinesAroundBlockBody :
64
+ Layout/EmptyLinesAroundAccessModifier :
102
65
Enabled : true
103
66
104
- Layout/EmptyLinesAroundAttributeAccessor :
67
+ Layout/EmptyLinesAroundBlockBody :
105
68
Enabled : true
106
69
107
70
# In a regular class definition, no empty lines around the body.
@@ -116,13 +79,13 @@ Layout/EmptyLinesAroundMethodBody:
116
79
Layout/EmptyLinesAroundModuleBody :
117
80
Enabled : true
118
81
119
- Layout/FirstArgumentIndentation :
120
- Enabled : true
121
-
122
82
# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
123
83
Style/HashSyntax :
124
84
Enabled : true
125
85
86
+ Layout/FirstArgumentIndentation :
87
+ Enabled : true
88
+
126
89
# Method definitions after `private` or `protected` isolated calls need one
127
90
# extra level of indentation.
128
91
Layout/IndentationConsistency :
@@ -151,10 +114,10 @@ Layout/SpaceAroundEqualsInParameterDefault:
151
114
Layout/SpaceAroundKeyword :
152
115
Enabled : true
153
116
154
- Layout/SpaceAroundOperators :
117
+ Layout/SpaceBeforeComma :
155
118
Enabled : true
156
119
157
- Layout/SpaceBeforeComma :
120
+ Layout/SpaceBeforeComment :
158
121
Enabled : true
159
122
160
123
Layout/SpaceBeforeFirstArg :
@@ -174,9 +137,6 @@ Style/FrozenStringLiteralComment:
174
137
Style/RedundantFreeze :
175
138
Enabled : true
176
139
177
- Style/AccessModifierDeclarations :
178
- Enabled : false
179
-
180
140
# Use `foo {}` not `foo{}`.
181
141
Layout/SpaceBeforeBlockBraces :
182
142
Enabled : true
@@ -202,24 +162,18 @@ Style/StringLiterals:
202
162
Layout/IndentationStyle :
203
163
Enabled : true
204
164
205
- # Blank lines should not have any spaces.
165
+ # Empty lines should not have any spaces.
206
166
Layout/TrailingEmptyLines :
207
167
Enabled : true
208
168
209
169
# No trailing whitespace.
210
170
Layout/TrailingWhitespace :
211
171
Enabled : true
212
172
213
- Layout/SpaceAroundMethodCallOperator :
214
- Enabled : true
215
-
216
173
# Use quotes for string literals when they are enough.
217
174
Style/RedundantPercentQ :
218
175
Enabled : true
219
176
220
- Lint/DeprecatedOpenSSLConstant :
221
- Enabled : true
222
-
223
177
Lint/AmbiguousOperator :
224
178
Enabled : true
225
179
@@ -248,19 +202,16 @@ Lint/UselessAssignment:
248
202
Lint/DeprecatedClassMethods :
249
203
Enabled : true
250
204
251
- Lint/AssignmentInCondition :
252
- Enabled : false
253
-
254
- Lint/RaiseException :
205
+ Lint/DeprecatedOpenSSLConstant :
255
206
Enabled : true
256
207
257
- Lint/StructNewOverride :
208
+ Style/ParenthesesAroundCondition :
258
209
Enabled : true
259
210
260
- Style/ExponentialNotation :
211
+ Style/HashTransformKeys :
261
212
Enabled : true
262
213
263
- Style/ParenthesesAroundCondition :
214
+ Style/HashTransformValues :
264
215
Enabled : true
265
216
266
217
Style/RedundantBegin :
@@ -274,16 +225,19 @@ Style/Semicolon:
274
225
Enabled : true
275
226
AllowAsExpressionSeparator : true
276
227
277
- Style/SlicingWithRange :
278
- Enabled : true
279
-
280
228
# Prefer Foo.method over Foo::method
281
229
Style/ColonMethodCall :
282
230
Enabled : true
283
231
284
232
Style/TrivialAccessors :
285
233
Enabled : true
286
234
235
+ Style/SlicingWithRange :
236
+ Enabled : true
237
+
238
+ Style/RedundantRegexpEscape :
239
+ Enabled : true
240
+
287
241
Performance/FlatMap :
288
242
Enabled : true
289
243
@@ -304,3 +258,9 @@ Performance/ReverseEach:
304
258
305
259
Performance/UnfreezeString :
306
260
Enabled : true
261
+
262
+ Performance/DeletePrefix :
263
+ Enabled : true
264
+
265
+ Performance/DeleteSuffix :
266
+ Enabled : true
0 commit comments