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