1
1
# This configuration was generated by
2
2
# `rubocop --auto-gen-config`
3
- # on 2022-01-02 10:41:35 UTC using RuboCop version 1.23 .0.
3
+ # on 2022-12-21 16:30:41 UTC using RuboCop version 1.41 .0.
4
4
# The point is for the user to remove these configuration records
5
5
# one by one as the offenses are removed from the code base.
6
6
# Note that changes in the inspected code, or installation of new
7
7
# versions of RuboCop, may require this file to be generated again.
8
8
9
9
# Offense count: 1
10
- # Cop supports --auto-correct.
11
- # Configuration parameters: Include.
10
+ # This cop supports safe autocorrection (--autocorrect).
11
+ # Configuration parameters: Severity, Include.
12
+ # Include: **/*.gemspec
13
+ Gemspec/DeprecatedAttributeAssignment :
14
+ Exclude :
15
+ - ' grape.gemspec'
16
+
17
+ # Offense count: 1
18
+ # This cop supports safe autocorrection (--autocorrect).
19
+ # Configuration parameters: Severity, Include.
12
20
# Include: **/*.gemspec
13
21
Gemspec/RequireMFA :
14
22
Exclude :
15
23
- ' grape.gemspec'
16
24
17
25
# Offense count: 1
18
- # Configuration parameters: IgnoredMethods.
26
+ # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
19
27
Lint/AmbiguousBlockAssociation :
20
28
Exclude :
21
29
- ' spec/grape/dsl/routing_spec.rb'
@@ -47,40 +55,39 @@ Lint/EmptyClass:
47
55
- ' spec/grape/entity_spec.rb'
48
56
- ' spec/grape/middleware/stack_spec.rb'
49
57
50
- # Offense count: 7
58
+ # Offense count: 6
51
59
Lint/MissingSuper :
52
60
Exclude :
53
61
- ' lib/grape/api/instance.rb'
54
- - ' lib/grape/exceptions/base.rb'
55
62
- ' lib/grape/exceptions/validation_array_errors.rb'
56
63
- ' lib/grape/namespace.rb'
57
64
- ' lib/grape/path.rb'
58
65
- ' lib/grape/router/pattern.rb'
59
66
- ' lib/grape/validations/validators/base.rb'
60
67
61
- # Offense count: 43
62
- # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
68
+ # Offense count: 41
69
+ # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, CountRepeatedAttributes.
63
70
Metrics/AbcSize :
64
71
Max : 43
65
72
66
- # Offense count: 6
67
- # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
68
- # IgnoredMethods : refine
73
+ # Offense count: 1
74
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods, inherit_mode .
75
+ # AllowedMethods : refine
69
76
Metrics/BlockLength :
70
- Max : 182
77
+ Max : 27
71
78
72
79
# Offense count: 9
73
80
# Configuration parameters: CountComments, CountAsOne.
74
81
Metrics/ClassLength :
75
- Max : 298
82
+ Max : 295
76
83
77
- # Offense count: 30
78
- # Configuration parameters: IgnoredMethods.
84
+ # Offense count: 28
85
+ # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
79
86
Metrics/CyclomaticComplexity :
80
87
Max : 15
81
88
82
89
# Offense count: 68
83
- # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
90
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
84
91
Metrics/MethodLength :
85
92
Max : 32
86
93
@@ -94,8 +101,8 @@ Metrics/ModuleLength:
94
101
Metrics/ParameterLists :
95
102
MaxOptionalParameters : 4
96
103
97
- # Offense count: 27
98
- # Configuration parameters: IgnoredMethods.
104
+ # Offense count: 25
105
+ # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
99
106
Metrics/PerceivedComplexity :
100
107
Max : 15
101
108
@@ -111,7 +118,7 @@ Naming/MemoizedInstanceVariableName:
111
118
112
119
# Offense count: 5
113
120
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
114
- # AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to
121
+ # AllowedNames: as, at, by, cc, db, id, if , in, io, ip, of, on, os, pp, to
115
122
Naming/MethodParameterName :
116
123
Exclude :
117
124
- ' lib/grape/endpoint.rb'
@@ -120,7 +127,7 @@ Naming/MethodParameterName:
120
127
- ' spec/grape/api_spec.rb'
121
128
122
129
# Offense count: 18
123
- # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers.
130
+ # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns .
124
131
# SupportedStyles: snake_case, normalcase, non_integer
125
132
# AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339
126
133
Naming/VariableNumber :
@@ -147,8 +154,18 @@ RSpec/AnyInstance:
147
154
- ' spec/grape/api_spec.rb'
148
155
- ' spec/grape/middleware/base_spec.rb'
149
156
150
- # Offense count: 332
151
- # Configuration parameters: Prefixes.
157
+ # Offense count: 5
158
+ # This cop supports safe autocorrection (--autocorrect).
159
+ # Configuration parameters: EnforcedStyle.
160
+ # SupportedStyles: be_a, be_kind_of
161
+ RSpec/ClassCheck :
162
+ Exclude :
163
+ - ' spec/grape/api_spec.rb'
164
+ - ' spec/grape/endpoint_spec.rb'
165
+ - ' spec/grape/middleware/base_spec.rb'
166
+
167
+ # Offense count: 345
168
+ # Configuration parameters: Prefixes, AllowedPatterns.
152
169
# Prefixes: when, with, without
153
170
RSpec/ContextWording :
154
171
Enabled : false
@@ -167,19 +184,29 @@ RSpec/DescribeClass:
167
184
- ' spec/grape/validations/instance_behaivour_spec.rb'
168
185
169
186
# Offense count: 3
187
+ # This cop supports unsafe autocorrection (--autocorrect-all).
170
188
RSpec/EmptyExampleGroup :
171
189
Exclude :
172
190
- ' spec/grape/api_spec.rb'
173
191
- ' spec/grape/dsl/configuration_spec.rb'
174
192
- ' spec/grape/validations/attributes_iterator_spec.rb'
175
193
176
- # Offense count: 499
194
+ # Offense count: 507
177
195
# Configuration parameters: CountAsOne.
178
196
RSpec/ExampleLength :
179
197
Max : 57
180
198
199
+ # Offense count: 2
200
+ # This cop supports safe autocorrection (--autocorrect).
201
+ # Configuration parameters: CustomTransform, IgnoredWords, DisallowedExamples.
202
+ # DisallowedExamples: works
203
+ RSpec/ExampleWording :
204
+ Exclude :
205
+ - ' spec/grape/integration/global_namespace_function_spec.rb'
206
+ - ' spec/grape/validations_spec.rb'
207
+
181
208
# Offense count: 7
182
- # Cop supports --auto-correct .
209
+ # This cop supports safe autocorrection (--autocorrect) .
183
210
RSpec/ExpectActual :
184
211
Exclude :
185
212
- ' spec/routing/**/*'
@@ -192,7 +219,7 @@ RSpec/ExpectInHook:
192
219
- ' spec/grape/api_spec.rb'
193
220
- ' spec/grape/validations/validators/values_spec.rb'
194
221
195
- # Offense count: 41
222
+ # Offense count: 43
196
223
# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
197
224
# Include: **/*_spec*rb*, **/spec/**/*
198
225
RSpec/FilePath :
@@ -233,7 +260,7 @@ RSpec/MessageChain:
233
260
Exclude :
234
261
- ' spec/grape/middleware/formatter_spec.rb'
235
262
236
- # Offense count: 135
263
+ # Offense count: 138
237
264
# Configuration parameters: .
238
265
# SupportedStyles: have_received, receive
239
266
RSpec/MessageSpies :
@@ -244,24 +271,42 @@ RSpec/MissingExampleGroupArgument:
244
271
Exclude :
245
272
- ' spec/grape/middleware/exception_spec.rb'
246
273
247
- # Offense count: 755
274
+ # Offense count: 766
248
275
RSpec/MultipleExpectations :
249
276
Max : 16
250
277
251
- # Offense count: 32
278
+ # Offense count: 38
252
279
# Configuration parameters: AllowSubject.
253
280
RSpec/MultipleMemoizedHelpers :
254
281
Max : 10
255
282
256
- # Offense count: 2116
257
- # Configuration parameters: IgnoreSharedExamples.
283
+ # Offense count: 2145
284
+ # Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
285
+ # SupportedStyles: always, named_only
258
286
RSpec/NamedSubject :
259
287
Enabled : false
260
288
261
- # Offense count: 161
289
+ # Offense count: 171
290
+ # Configuration parameters: AllowedGroups.
262
291
RSpec/NestedGroups :
263
292
Max : 6
264
293
294
+ # Offense count: 18
295
+ # Configuration parameters: AllowedPatterns.
296
+ # AllowedPatterns: ^expect_, ^assert_
297
+ RSpec/NoExpectationExample :
298
+ Exclude :
299
+ - ' spec/grape/api_remount_spec.rb'
300
+ - ' spec/grape/api_spec.rb'
301
+ - ' spec/grape/entity_spec.rb'
302
+ - ' spec/grape/validations_spec.rb'
303
+
304
+ # Offense count: 6
305
+ # This cop supports unsafe autocorrection (--autocorrect-all).
306
+ RSpec/Rails/HaveHttpStatus :
307
+ Exclude :
308
+ - ' spec/grape/api_spec.rb'
309
+
265
310
# Offense count: 12
266
311
RSpec/RepeatedDescription :
267
312
Exclude :
@@ -343,11 +388,28 @@ Style/CombinableLoops:
343
388
- ' spec/grape/endpoint_spec.rb'
344
389
345
390
# Offense count: 2
346
- # Configuration parameters: MaxUnannotatedPlaceholdersAllowed, IgnoredMethods.
391
+ # This cop supports safe autocorrection (--autocorrect).
392
+ # Configuration parameters: MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns, IgnoredMethods.
347
393
# SupportedStyles: annotated, template, unannotated
348
394
Style/FormatStringToken :
349
395
EnforcedStyle : template
350
396
397
+ # Offense count: 1
398
+ # This cop supports safe autocorrection (--autocorrect).
399
+ # Configuration parameters: EnforcedStyle, DirectiveCapitalization, ValueCapitalization.
400
+ # SupportedStyles: snake_case, kebab_case
401
+ # SupportedCapitalizations: lowercase, uppercase
402
+ Style/MagicCommentFormat :
403
+ Exclude :
404
+ - ' lib/grape/util/cache.rb'
405
+
406
+ # Offense count: 3
407
+ # This cop supports unsafe autocorrection (--autocorrect-all).
408
+ Style/MapToHash :
409
+ Exclude :
410
+ - ' lib/grape/dsl/request_response.rb'
411
+ - ' spec/grape/endpoint_spec.rb'
412
+
351
413
# Offense count: 12
352
414
# Configuration parameters: AllowedMethods.
353
415
# AllowedMethods: respond_to_missing?
@@ -365,9 +427,40 @@ Style/OptionalBooleanParameter:
365
427
- ' lib/grape/validations/types/primitive_coercer.rb'
366
428
- ' lib/grape/validations/types/set_coercer.rb'
367
429
368
- # Offense count: 144
369
- # Cop supports --auto-correct.
370
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
430
+ # Offense count: 28
431
+ # This cop supports safe autocorrection (--autocorrect).
432
+ Style/RedundantConstantBase :
433
+ Exclude :
434
+ - ' spec/grape/api/invalid_format_spec.rb'
435
+ - ' spec/grape/api_spec.rb'
436
+ - ' spec/grape/dsl/logger_spec.rb'
437
+ - ' spec/grape/endpoint/declared_spec.rb'
438
+ - ' spec/grape/endpoint_spec.rb'
439
+ - ' spec/grape/middleware/formatter_spec.rb'
440
+ - ' spec/grape/validations/validators/coerce_spec.rb'
441
+ - ' spec/grape/validations/validators/default_spec.rb'
442
+ - ' spec/integration/multi_json/json_spec.rb'
443
+ - ' spec/integration/multi_xml/xml_spec.rb'
444
+
445
+ # Offense count: 2
446
+ # This cop supports unsafe autocorrection (--autocorrect-all).
447
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
448
+ # AllowedMethods: present?, blank?, presence, try, try!
449
+ Style/SafeNavigation :
450
+ Exclude :
451
+ - ' lib/grape/endpoint.rb'
452
+
453
+ # Offense count: 3
454
+ # This cop supports unsafe autocorrection (--autocorrect-all).
455
+ Style/SlicingWithRange :
456
+ Exclude :
457
+ - ' lib/grape/dsl/inside_route.rb'
458
+ - ' lib/grape/request.rb'
459
+ - ' lib/grape/router/attribute_translator.rb'
460
+
461
+ # Offense count: 168
462
+ # This cop supports safe autocorrection (--autocorrect).
463
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, IgnoredPatterns.
371
464
# URISchemes: http, https
372
465
Layout/LineLength :
373
466
Max : 215
0 commit comments