gitlab-labkit 0.36.1 → 0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.rubocop_todo.yml CHANGED
@@ -1,52 +1,93 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2021-04-18 00:00:00 UTC using RuboCop version 0.93.1.
3
+ # on 2025-05-05 15:54:30 UTC using RuboCop version 1.68.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
- # Offense count: 51
10
- # Cop supports --auto-correct.
11
- CodeReuse/ActiveRecord:
9
+ # Offense count: 3
10
+ Cop/AvoidReturnFromBlocks:
12
11
  Exclude:
13
- - 'spec/labkit/correlation/grpc/client_interceptor_spec.rb'
14
- - 'spec/labkit/correlation/grpc/server_interceptor_spec.rb'
15
- - 'spec/labkit/middleware/rack_spec.rb'
16
- - 'spec/labkit/middleware/sidekiq/client_spec.rb'
17
- - 'spec/labkit/middleware/sidekiq/context/server_spec.rb'
18
- - 'spec/labkit/middleware/sidekiq/server_spec.rb'
19
- - 'spec/labkit/middleware/sidekiq/tracing/client_spec.rb'
20
- - 'spec/labkit/middleware/sidekiq/tracing/server_spec.rb'
21
- - 'spec/labkit/tracing/factory_spec.rb'
22
- - 'spec/labkit/tracing/grpc/client_interceptor_spec.rb'
23
- - 'spec/labkit/tracing/grpc/server_interceptor_spec.rb'
24
- - 'spec/labkit/tracing_spec.rb'
25
- - 'spec/support/tracing/shared_examples.rb'
12
+ - 'lib/labkit/excon_publisher.rb'
13
+ - 'lib/labkit/httpclient_publisher.rb'
14
+ - 'lib/labkit/net_http_publisher.rb'
26
15
 
27
- # Offense count: 1
16
+ # Offense count: 23
17
+ # This cop supports safe autocorrection (--autocorrect).
18
+ Fips/OpenSSL:
19
+ Exclude:
20
+ - 'lib/labkit/fips.rb'
21
+ - 'spec/labkit/fips_spec.rb'
22
+
23
+ # Offense count: 4
24
+ Fips/SHA1:
25
+ Exclude:
26
+ - 'spec/labkit/fips_spec.rb'
27
+
28
+ # Offense count: 8
29
+ # This cop supports safe autocorrection (--autocorrect).
28
30
  # Configuration parameters: Include.
29
31
  # Include: **/*.gemspec
32
+ Gemspec/AddRuntimeDependency:
33
+ Exclude:
34
+ - 'gitlab-labkit.gemspec'
35
+
36
+ # Offense count: 1
37
+ # This cop supports safe autocorrection (--autocorrect).
38
+ # Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
39
+ # Include: **/*.gemspec
40
+ Gemspec/OrderedDependencies:
41
+ Exclude:
42
+ - 'gitlab-labkit.gemspec'
43
+
44
+ # Offense count: 1
45
+ # Configuration parameters: Severity, Include.
46
+ # Include: **/*.gemspec
30
47
  Gemspec/RequiredRubyVersion:
31
48
  Exclude:
32
49
  - 'gitlab-labkit.gemspec'
33
50
 
34
51
  # Offense count: 1
35
- # Cop supports --auto-correct.
36
- # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
37
- # SupportedHashRocketStyles: key, separator, table
38
- # SupportedColonStyles: key, separator, table
39
- # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
40
- Layout/HashAlignment:
52
+ # This cop supports unsafe autocorrection (--autocorrect-all).
53
+ # Configuration parameters: Categories, ExpectedOrder.
54
+ # ExpectedOrder: module_inclusion, constants, public_class_methods, initializer, public_methods, protected_methods, private_methods
55
+ Layout/ClassStructure:
41
56
  Exclude:
42
- - 'spec/labkit/context_spec.rb'
57
+ - 'lib/labkit/tracing/rack_middleware.rb'
58
+
59
+ # Offense count: 1
60
+ # This cop supports safe autocorrection (--autocorrect).
61
+ Layout/EmptyLineAfterMagicComment:
62
+ Exclude:
63
+ - 'lib/labkit/logging/json_logger.rb'
43
64
 
44
65
  # Offense count: 1
66
+ # This cop supports safe autocorrection (--autocorrect).
67
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
68
+ # SupportedStyles: aligned, indented
69
+ Layout/MultilineOperationIndentation:
70
+ Exclude:
71
+ - 'lib/labkit/logging/json_logger.rb'
72
+
73
+ # Offense count: 10
45
74
  Lint/BinaryOperatorWithIdenticalOperands:
46
75
  Exclude:
76
+ - 'spec/labkit/tracing/rails/action_view/render_collection_instrumenter_spec.rb'
77
+ - 'spec/labkit/tracing/rails/action_view/render_partial_instrumenter_spec.rb'
78
+ - 'spec/labkit/tracing/rails/active_support/cache_read_instrumenter_spec.rb'
47
79
  - 'spec/labkit/tracing/redis/redis_interceptor_helper_spec.rb'
80
+ - 'spec/logging/sanitizer_spec.rb'
81
+
82
+ # Offense count: 1
83
+ # This cop supports unsafe autocorrection (--autocorrect-all).
84
+ Lint/BooleanSymbol:
85
+ Exclude:
86
+ - 'spec/labkit/context_spec.rb'
48
87
 
49
88
  # Offense count: 4
89
+ # Configuration parameters: AllowedMethods.
90
+ # AllowedMethods: enums
50
91
  Lint/ConstantDefinitionInBlock:
51
92
  Exclude:
52
93
  - 'spec/labkit/middleware/sidekiq/client_spec.rb'
@@ -54,52 +95,146 @@ Lint/ConstantDefinitionInBlock:
54
95
  - 'spec/labkit/middleware/sidekiq/context/server_spec.rb'
55
96
  - 'spec/labkit/middleware/sidekiq/server_spec.rb'
56
97
 
98
+ # Offense count: 4
99
+ # Configuration parameters: AllowComments, AllowEmptyLambdas.
100
+ Lint/EmptyBlock:
101
+ Exclude:
102
+ - 'spec/labkit/tracing/rack_middleware_spec.rb'
103
+ - 'spec/labkit/tracing_spec.rb'
104
+ - 'spec/support/grpc_service/test_service_impl.rb'
105
+
106
+ # Offense count: 2
107
+ # This cop supports safe autocorrection (--autocorrect).
108
+ Lint/RedundantCopDisableDirective:
109
+ Exclude:
110
+ - 'spec/labkit/context_spec.rb'
111
+ - 'spec/labkit/middleware/sidekiq/context/server_spec.rb'
112
+
57
113
  # Offense count: 1
58
- # Cop supports --auto-correct.
114
+ # This cop supports unsafe autocorrection (--autocorrect-all).
59
115
  # Configuration parameters: AllowedMethods.
60
- # AllowedMethods: instance_of?, kind_of?, is_a?, eql?, respond_to?, equal?
116
+ # AllowedMethods: instance_of?, kind_of?, is_a?, eql?, respond_to?, equal?, presence, present?
61
117
  Lint/RedundantSafeNavigation:
62
118
  Exclude:
63
119
  - 'lib/labkit/tracing.rb'
64
120
 
65
121
  # Offense count: 1
66
- # Cop supports --auto-correct.
122
+ # This cop supports safe autocorrection (--autocorrect).
123
+ # Configuration parameters: AllowedMethods.
124
+ # AllowedMethods: present?, blank?, presence, try, try!
125
+ Lint/SafeNavigationConsistency:
126
+ Exclude:
127
+ - 'lib/labkit/tracing.rb'
128
+
129
+ # Offense count: 11
130
+ # This cop supports safe autocorrection (--autocorrect).
131
+ # Configuration parameters: EnforcedStyle.
132
+ # SupportedStyles: strict, consistent
133
+ Lint/SymbolConversion:
134
+ Exclude:
135
+ - 'lib/labkit/tracing/tracing_utils.rb'
136
+ - 'spec/labkit/logging/json_logger_spec.rb'
137
+ - 'spec/support/tracing/shared_examples.rb'
138
+
139
+ # Offense count: 1
140
+ # Configuration parameters: Methods.
141
+ Lint/UnexpectedBlockArity:
142
+ Exclude:
143
+ - 'tools/update-changelog.rb'
144
+
145
+ # Offense count: 41
146
+ # This cop supports safe autocorrection (--autocorrect).
147
+ # Configuration parameters: AutoCorrect, AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods.
148
+ Lint/UnusedMethodArgument:
149
+ Exclude:
150
+ - 'lib/labkit/correlation/grpc/client_interceptor.rb'
151
+ - 'lib/labkit/correlation/grpc/server_interceptor.rb'
152
+ - 'lib/labkit/fips.rb'
153
+ - 'lib/labkit/logging/grpc/server_interceptor.rb'
154
+ - 'lib/labkit/logging/json_logger.rb'
155
+ - 'lib/labkit/tracing/grpc/client_interceptor.rb'
156
+ - 'lib/labkit/tracing/grpc/server_interceptor.rb'
157
+ - 'lib/labkit/tracing/rails/active_support/cache_delete_instrumenter.rb'
158
+ - 'lib/labkit/tracing/rails/active_support/cache_fetch_hit_instrumenter.rb'
159
+ - 'lib/labkit/tracing/rails/active_support/cache_generate_instrumenter.rb'
160
+ - 'lib/labkit/tracing/rails/active_support/cache_read_instrumenter.rb'
161
+ - 'lib/labkit/tracing/rails/active_support/cache_write_instrumenter.rb'
162
+
163
+ # Offense count: 8
164
+ # This cop supports safe autocorrection (--autocorrect).
165
+ # Configuration parameters: EnforcedStyle, BlockForwardingName.
166
+ # SupportedStyles: anonymous, explicit
167
+ Naming/BlockForwarding:
168
+ Exclude:
169
+ - 'lib/labkit/correlation/grpc/client_interceptor.rb'
170
+ - 'lib/labkit/correlation/grpc/server_interceptor.rb'
171
+ - 'lib/labkit/fips.rb'
172
+ - 'lib/labkit/httpclient_publisher.rb'
173
+ - 'lib/labkit/net_http_publisher.rb'
174
+ - 'lib/labkit/tracing.rb'
175
+
176
+ # Offense count: 1
177
+ # This cop supports safe autocorrection (--autocorrect).
67
178
  # Configuration parameters: PreferredName.
68
179
  Naming/RescuedExceptionsVariableName:
69
180
  Exclude:
70
181
  - 'lib/labkit/logging/grpc/server_interceptor.rb'
71
182
 
72
- # Offense count: 2
183
+ # Offense count: 1
184
+ # This cop supports safe autocorrection (--autocorrect).
185
+ # Configuration parameters: EnabledForFlattenWithoutParams.
186
+ Performance/FlatMap:
187
+ Exclude:
188
+ - 'tools/update-changelog.rb'
189
+
190
+ # Offense count: 1
73
191
  Performance/MethodObjectAsBlock:
74
192
  Exclude:
75
193
  - 'lib/labkit/context.rb'
76
194
 
77
195
  # Offense count: 1
78
- # Configuration parameters: Prefixes.
196
+ # This cop supports unsafe autocorrection (--autocorrect-all).
197
+ RSpec/BeEq:
198
+ Exclude:
199
+ - 'spec/labkit/middleware/sidekiq/context/client_spec.rb'
200
+
201
+ # Offense count: 8
202
+ # This cop supports safe autocorrection (--autocorrect).
203
+ # Configuration parameters: EnforcedStyle.
204
+ # SupportedStyles: be, be_nil
205
+ RSpec/BeNil:
206
+ Exclude:
207
+ - 'spec/labkit/tracing/rails/action_view_spec.rb'
208
+
209
+ # Offense count: 3
210
+ # Configuration parameters: Prefixes, AllowedPatterns.
79
211
  # Prefixes: when, with, without
80
212
  RSpec/ContextWording:
81
213
  Exclude:
214
+ - 'spec/labkit/logging/json_logger_spec.rb'
82
215
  - 'spec/labkit/middleware/sidekiq/server_spec.rb'
83
216
 
84
217
  # Offense count: 3
85
- # Cop supports --auto-correct.
86
- # Configuration parameters: SkipBlocks, EnforcedStyle.
218
+ # This cop supports unsafe autocorrection (--autocorrect-all).
219
+ # Configuration parameters: SkipBlocks, EnforcedStyle, OnlyStaticConstants.
87
220
  # SupportedStyles: described_class, explicit
88
221
  RSpec/DescribedClass:
89
222
  Exclude:
90
223
  - 'spec/labkit/tracing_spec.rb'
91
224
 
92
- # Offense count: 2
93
- # Configuration parameters: CustomTransform, IgnoreMethods, SpecSuffixOnly.
94
- RSpec/FilePath:
225
+ # Offense count: 10
226
+ # This cop supports safe autocorrection (--autocorrect).
227
+ # Configuration parameters: CustomTransform, IgnoredWords, DisallowedExamples.
228
+ # DisallowedExamples: works
229
+ RSpec/ExampleWording:
95
230
  Exclude:
96
- - 'spec/labkit/httpclient_publisher_spec.rb'
97
- - 'spec/logging/sanitizer_spec.rb'
231
+ - 'spec/labkit/tracing/redis/redis_interceptor_helper_spec.rb'
232
+ - 'spec/labkit/tracing_spec.rb'
98
233
 
99
234
  # Offense count: 3
100
- # Cop supports --auto-correct.
235
+ # This cop supports safe autocorrection (--autocorrect).
101
236
  # Configuration parameters: EnforcedStyle.
102
- # SupportedStyles: single_line_only, single_statement_only, disallow
237
+ # SupportedStyles: single_line_only, single_statement_only, disallow, require_implicit
103
238
  RSpec/ImplicitSubject:
104
239
  Exclude:
105
240
  - 'spec/labkit/correlation/correlation_id_spec.rb'
@@ -113,67 +248,129 @@ RSpec/LeakyConstantDeclaration:
113
248
  - 'spec/labkit/middleware/sidekiq/server_spec.rb'
114
249
 
115
250
  # Offense count: 2
116
- # Cop supports --auto-correct.
251
+ # This cop supports safe autocorrection (--autocorrect).
252
+ # Configuration parameters: AutoCorrect.
117
253
  RSpec/LetBeforeExamples:
118
254
  Exclude:
119
255
  - 'spec/labkit/tracing_spec.rb'
120
256
 
121
- # Offense count: 18
257
+ # Offense count: 20
122
258
  # Configuration parameters: AllowSubject.
123
259
  RSpec/MultipleMemoizedHelpers:
124
260
  Max: 7
125
261
 
262
+ # Offense count: 24
263
+ # Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
264
+ # SupportedStyles: always, named_only
265
+ RSpec/NamedSubject:
266
+ Exclude:
267
+ - 'spec/labkit/logging/json_logger_spec.rb'
268
+ - 'spec/labkit/middleware/sidekiq/tracing/client_spec.rb'
269
+ - 'spec/labkit/middleware/sidekiq/tracing/server_spec.rb'
270
+ - 'spec/labkit/tracing/rack_middleware_spec.rb'
271
+
272
+ # Offense count: 1
273
+ RSpec/RemoveConst:
274
+ Exclude:
275
+ - 'spec/labkit/fips_spec.rb'
276
+
126
277
  # Offense count: 15
127
- # Cop supports --auto-correct.
278
+ # This cop supports safe autocorrection (--autocorrect).
279
+ # Configuration parameters: AutoCorrect.
128
280
  RSpec/ScatteredLet:
129
281
  Exclude:
130
282
  - 'spec/labkit/excon_publisher_spec.rb'
131
283
  - 'spec/labkit/httpclient_publisher_spec.rb'
132
284
  - 'spec/labkit/net_http_publisher_spec.rb'
133
285
 
286
+ # Offense count: 2
287
+ # Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata.
288
+ # Include: **/*_spec.rb
289
+ RSpec/SpecFilePathFormat:
290
+ Exclude:
291
+ - 'spec/labkit/httpclient_publisher_spec.rb'
292
+ - 'spec/logging/sanitizer_spec.rb'
293
+
294
+ # Offense count: 4
295
+ # This cop supports unsafe autocorrection (--autocorrect-all).
296
+ # Configuration parameters: EnforcedStyle.
297
+ # SupportedStyles: constant, string
298
+ RSpec/VerifiedDoubleReference:
299
+ Exclude:
300
+ - 'spec/labkit/tracing/redis/redis_interceptor_helper_spec.rb'
301
+
302
+ # Offense count: 12
303
+ # Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
304
+ RSpec/VerifiedDoubles:
305
+ Exclude:
306
+ - 'spec/labkit/middleware/rack_spec.rb'
307
+ - 'spec/labkit/middleware/sidekiq/client_spec.rb'
308
+ - 'spec/labkit/middleware/sidekiq/server_spec.rb'
309
+ - 'spec/labkit/middleware/sidekiq/tracing/client_spec.rb'
310
+ - 'spec/labkit/tracing/factory_spec.rb'
311
+ - 'spec/labkit/tracing/rails/action_view_spec.rb'
312
+ - 'spec/labkit/tracing_spec.rb'
313
+ - 'spec/support/tracing/shared_examples.rb'
314
+
134
315
  # Offense count: 1
135
- # Cop supports --auto-correct.
316
+ # This cop supports safe autocorrection (--autocorrect).
317
+ # Configuration parameters: EnforcedStyle.
318
+ # SupportedStyles: slashes, arguments
319
+ Rails/FilePath:
320
+ Exclude:
321
+ - 'lib/labkit/tracing/rails/action_view.rb'
322
+
323
+ # Offense count: 1
324
+ # This cop supports unsafe autocorrection (--autocorrect-all).
136
325
  Rails/NegateInclude:
137
326
  Exclude:
138
327
  - 'spec/labkit/correlation/grpc/client_interceptor_spec.rb'
139
328
 
140
- # Offense count: 3
141
- # Cop supports --auto-correct.
329
+ # Offense count: 1
330
+ # This cop supports unsafe autocorrection (--autocorrect-all).
142
331
  # Configuration parameters: Include.
143
332
  # Include: **/Rakefile, **/*.rake
144
333
  Rails/RakeEnvironment:
145
334
  Exclude:
146
- - 'lib/capistrano/tasks/**/*.rake'
147
335
  - 'Rakefile'
148
336
 
337
+ # Offense count: 3
338
+ # This cop supports unsafe autocorrection (--autocorrect-all).
339
+ # Configuration parameters: EnforcedStyle.
340
+ # SupportedStyles: strict, flexible
341
+ Rails/TimeZone:
342
+ Exclude:
343
+ - 'lib/labkit/logging/grpc/server_interceptor.rb'
344
+ - 'spec/labkit/logging/json_logger_spec.rb'
345
+
346
+ # Offense count: 4
347
+ # This cop supports safe autocorrection (--autocorrect).
348
+ # Configuration parameters: AllowOnlyRestArgument, UseAnonymousForwarding, RedundantRestArgumentNames, RedundantKeywordRestArgumentNames, RedundantBlockArgumentNames.
349
+ # RedundantRestArgumentNames: args, arguments
350
+ # RedundantKeywordRestArgumentNames: kwargs, options, opts
351
+ # RedundantBlockArgumentNames: blk, block, proc
352
+ Style/ArgumentsForwarding:
353
+ Exclude:
354
+ - 'lib/labkit/correlation/grpc/server_interceptor.rb'
355
+ - 'lib/labkit/tracing.rb'
356
+
149
357
  # Offense count: 1
150
358
  # Configuration parameters: AllowedChars.
359
+ # AllowedChars: ©
151
360
  Style/AsciiComments:
152
361
  Exclude:
153
362
  - 'spec/support/grpc_service/test_service_impl.rb'
154
363
 
155
- # Offense count: 1
156
- # Cop supports --auto-correct.
157
- Style/CaseLikeIf:
158
- Exclude:
159
- - 'lib/labkit/excon_publisher.rb'
160
-
161
- # Offense count: 23
162
- # Cop supports --auto-correct.
163
- Style/ExplicitBlockArgument:
364
+ # Offense count: 3
365
+ # This cop supports safe autocorrection (--autocorrect).
366
+ # Configuration parameters: AllowedVars.
367
+ Style/FetchEnvVar:
164
368
  Exclude:
165
- - 'lib/labkit/correlation/grpc/server_interceptor.rb'
166
- - 'lib/labkit/logging/grpc/server_interceptor.rb'
167
- - 'lib/labkit/middleware/sidekiq/client.rb'
168
- - 'lib/labkit/middleware/sidekiq/context/server.rb'
169
- - 'lib/labkit/middleware/sidekiq/server.rb'
170
- - 'lib/labkit/middleware/sidekiq/tracing/server.rb'
171
- - 'lib/labkit/tracing/grpc/client_interceptor.rb'
172
- - 'lib/labkit/tracing/grpc/server_interceptor.rb'
173
- - 'lib/labkit/tracing/redis/redis_interceptor_helper.rb'
369
+ - 'lib/labkit/tracing.rb'
370
+ - 'spec/helpers/stub_env.rb'
174
371
 
175
372
  # Offense count: 8
176
- # Cop supports --auto-correct.
373
+ # This cop supports unsafe autocorrection (--autocorrect-all).
177
374
  # Configuration parameters: EnforcedStyle.
178
375
  # SupportedStyles: always, always_true, never
179
376
  Style/FrozenStringLiteralComment:
@@ -188,51 +385,176 @@ Style/FrozenStringLiteralComment:
188
385
  - 'tools/update-changelog.rb'
189
386
 
190
387
  # Offense count: 2
191
- # Cop supports --auto-correct.
388
+ # This cop supports unsafe autocorrection (--autocorrect-all).
192
389
  Style/GlobalStdStream:
193
390
  Exclude:
194
391
  - 'lib/labkit/tracing/jaeger_factory.rb'
195
392
 
196
- # Offense count: 3
197
- # Cop supports --auto-correct.
198
- # Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
393
+ # Offense count: 1
394
+ # This cop supports safe autocorrection (--autocorrect).
395
+ # Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
396
+ Style/GuardClause:
397
+ Exclude:
398
+ - 'lib/labkit/logging/json_logger.rb'
399
+
400
+ # Offense count: 34
401
+ # This cop supports safe autocorrection (--autocorrect).
402
+ # Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
199
403
  # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
404
+ # SupportedShorthandSyntax: always, never, either, consistent, either_consistent
200
405
  Style/HashSyntax:
406
+ Exclude:
407
+ - 'Rakefile'
408
+ - 'lib/labkit/tracing/tracing_utils.rb'
409
+ - 'spec/labkit/tracing/rack_middleware_spec.rb'
410
+ - 'spec/labkit/tracing/redis/redis_interceptor_helper_spec.rb'
411
+ - 'spec/support/grpc_service/test_pb.rb'
412
+ - 'spec/support/tracing/shared_examples.rb'
413
+
414
+ # Offense count: 1
415
+ # This cop supports safe autocorrection (--autocorrect).
416
+ Style/IfUnlessModifier:
417
+ Exclude:
418
+ - 'lib/labkit/tracing/jaeger_factory.rb'
419
+
420
+ # Offense count: 35
421
+ # This cop supports safe autocorrection (--autocorrect).
422
+ # Configuration parameters: EnforcedStyle.
423
+ # SupportedStyles: line_count_dependent, lambda, literal
424
+ Style/Lambda:
201
425
  Exclude:
202
426
  - 'spec/labkit/excon_publisher_spec.rb'
427
+ - 'spec/labkit/httpclient_publisher_spec.rb'
428
+ - 'spec/labkit/net_http_publisher_spec.rb'
429
+
430
+ # Offense count: 1
431
+ # This cop supports unsafe autocorrection (--autocorrect-all).
432
+ Style/LineEndConcatenation:
433
+ Exclude:
434
+ - 'lib/labkit/logging/json_logger.rb'
203
435
 
204
436
  # Offense count: 16
205
- # Cop supports --auto-correct.
437
+ # This cop supports safe autocorrection (--autocorrect).
206
438
  # Configuration parameters: PreferredDelimiters.
207
439
  Style/PercentLiteralDelimiters:
208
440
  Exclude:
209
441
  - 'spec/labkit/tracing/redis/redis_interceptor_helper_spec.rb'
210
442
 
211
- # Offense count: 2
212
- # Cop supports --auto-correct.
443
+ # Offense count: 22
444
+ # This cop supports safe autocorrection (--autocorrect).
445
+ # Configuration parameters: EnforcedStyle.
446
+ # SupportedStyles: same_as_string_literals, single_quotes, double_quotes
447
+ Style/QuotedSymbols:
448
+ Exclude:
449
+ - 'lib/labkit/tracing/tracing_utils.rb'
450
+ - 'spec/labkit/context_spec.rb'
451
+ - 'spec/labkit/logging/json_logger_spec.rb'
452
+ - 'spec/labkit/middleware/sidekiq/context/server_spec.rb'
453
+ - 'spec/labkit/tracing/rack_middleware_spec.rb'
454
+ - 'spec/support/tracing/shared_examples.rb'
455
+
456
+ # Offense count: 1
457
+ # This cop supports safe autocorrection (--autocorrect).
213
458
  Style/RedundantBegin:
214
459
  Exclude:
215
- - 'Rakefile'
216
460
  - 'spec/labkit/net_http_publisher_spec.rb'
217
461
 
462
+ # Offense count: 3
463
+ # This cop supports safe autocorrection (--autocorrect).
464
+ Style/RedundantConstantBase:
465
+ Exclude:
466
+ - 'spec/labkit/logging/grpc/server_interceptor_spec.rb'
467
+
468
+ # Offense count: 3
469
+ # This cop supports safe autocorrection (--autocorrect).
470
+ Style/RedundantCurrentDirectoryInPath:
471
+ Exclude:
472
+ - 'spec/support/grpc_service.rb'
473
+
474
+ # Offense count: 3
475
+ # This cop supports safe autocorrection (--autocorrect).
476
+ Style/RedundantFreeze:
477
+ Exclude:
478
+ - 'lib/labkit/logging/sanitizer.rb'
479
+ - 'lib/labkit/tracing/redis/redis_interceptor_helper.rb'
480
+
218
481
  # Offense count: 1
219
- # Cop supports --auto-correct.
482
+ # This cop supports safe autocorrection (--autocorrect).
220
483
  Style/RedundantRegexpEscape:
221
484
  Exclude:
222
485
  - 'lib/labkit/logging/sanitizer.rb'
223
486
 
224
487
  # Offense count: 1
225
- # Cop supports --auto-correct.
488
+ # This cop supports safe autocorrection (--autocorrect).
489
+ # Configuration parameters: AllowMultipleReturnValues.
490
+ Style/RedundantReturn:
491
+ Exclude:
492
+ - 'lib/labkit/tracing/jaeger_factory.rb'
493
+
494
+ # Offense count: 3
495
+ # This cop supports unsafe autocorrection (--autocorrect-all).
496
+ # Configuration parameters: Mode.
226
497
  Style/StringConcatenation:
227
498
  Exclude:
499
+ - 'lib/labkit/logging/json_logger.rb'
500
+ - 'lib/labkit/tracing/jaeger_factory.rb'
228
501
  - 'lib/labkit/tracing/redis/redis_interceptor_helper.rb'
229
502
 
230
- # Offense count: 28
231
- # Cop supports --auto-correct.
503
+ # Offense count: 6
504
+ # This cop supports safe autocorrection (--autocorrect).
505
+ # Configuration parameters: EnforcedStyle.
506
+ # SupportedStyles: single_quotes, double_quotes
507
+ Style/StringLiteralsInInterpolation:
508
+ Exclude:
509
+ - 'lib/labkit/logging/json_logger.rb'
510
+ - 'lib/labkit/tracing/grpc/server_interceptor.rb'
511
+ - 'lib/labkit/tracing/jaeger_factory.rb'
512
+ - 'spec/labkit/logging/json_logger_spec.rb'
513
+ - 'tools/update-changelog.rb'
514
+
515
+ # Offense count: 10
516
+ # This cop supports safe autocorrection (--autocorrect).
517
+ Style/SymbolLiteral:
518
+ Exclude:
519
+ - 'lib/labkit/tracing/tracing_utils.rb'
520
+ - 'spec/support/tracing/shared_examples.rb'
521
+
522
+ # Offense count: 39
523
+ # This cop supports safe autocorrection (--autocorrect).
524
+ # Configuration parameters: EnforcedStyleForMultiline.
525
+ # SupportedStylesForMultiline: comma, consistent_comma, no_comma
526
+ Style/TrailingCommaInArguments:
527
+ Enabled: false
528
+
529
+ # Offense count: 107
530
+ # This cop supports safe autocorrection (--autocorrect).
232
531
  # Configuration parameters: EnforcedStyleForMultiline.
233
532
  # SupportedStylesForMultiline: comma, consistent_comma, no_comma
234
533
  Style/TrailingCommaInArrayLiteral:
235
534
  Exclude:
535
+ - 'lib/labkit/logging/json_logger.rb'
536
+ - 'lib/labkit/tracing/external_http.rb'
537
+ - 'lib/labkit/tracing/rails/action_view/subscriber.rb'
538
+ - 'lib/labkit/tracing/rails/active_support/subscriber.rb'
539
+ - 'spec/labkit/context_spec.rb'
236
540
  - 'spec/labkit/excon_publisher_spec.rb'
237
541
  - 'spec/labkit/httpclient_publisher_spec.rb'
238
542
  - 'spec/labkit/net_http_publisher_spec.rb'
543
+ - 'spec/labkit/tracing/rails/active_support/cache_delete_instrumenter_spec.rb'
544
+ - 'spec/labkit/tracing/rails/active_support/cache_fetch_hit_instrumenter_spec.rb'
545
+ - 'spec/labkit/tracing/rails/active_support/cache_generate_instrumenter_spec.rb'
546
+ - 'spec/labkit/tracing/rails/active_support/cache_write_instrumenter_spec.rb'
547
+
548
+ # Offense count: 84
549
+ # This cop supports safe autocorrection (--autocorrect).
550
+ # Configuration parameters: EnforcedStyleForMultiline.
551
+ # SupportedStylesForMultiline: comma, consistent_comma, no_comma
552
+ Style/TrailingCommaInHashLiteral:
553
+ Enabled: false
554
+
555
+ # Offense count: 68
556
+ # This cop supports safe autocorrection (--autocorrect).
557
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
558
+ # URISchemes: http, https
559
+ Layout/LineLength:
560
+ Max: 294
data/.tool-versions CHANGED
@@ -1 +1,3 @@
1
- ruby 3.1.4 3.2.2
1
+ ruby 3.4.4
2
+ shfmt 3.11.0
3
+ shellcheck 0.10.0
data/.yamllint.yaml ADDED
@@ -0,0 +1,11 @@
1
+ # See https://yamllint.readthedocs.io/en/stable/configuration.html#extending-the-default-configuration
2
+ # for configuration documentation
3
+ extends: default
4
+
5
+ ignore: |
6
+ .copier-*.yml
7
+
8
+ rules:
9
+ document-start: disable
10
+ line-length: disable
11
+ indentation: enable
data/CODEOWNERS ADDED
@@ -0,0 +1,4 @@
1
+ # CODEOWNERS is used to lookup assignees for
2
+ # Renovate Bot dependency change Merge Requests.
3
+ # https://docs.renovatebot.com/configuration-options/#assigneesfromcodeowners
4
+ * @reprazent @andrewn @mkaeppler @ayufan @hmerscher
data/CONTRIBUTING.md CHANGED
@@ -1,9 +1,9 @@
1
1
  ## Developer Certificate of Origin and License
2
2
 
3
- By contributing to GitLab B.V., you accept and agree to the following terms and
4
- conditions for your present and future contributions submitted to GitLab B.V.
5
- Except for the license granted herein to GitLab B.V. and recipients of software
6
- distributed by GitLab B.V., you reserve all right, title, and interest in and to
3
+ By contributing to GitLab Inc., you accept and agree to the following terms and
4
+ conditions for your present and future contributions submitted to GitLab Inc.
5
+ Except for the license granted herein to GitLab Inc. and recipients of software
6
+ distributed by GitLab Inc., you reserve all right, title, and interest in and to
7
7
  your Contributions.
8
8
 
9
9
  All contributions are subject to the Developer Certificate of Origin and license set out at [docs.gitlab.com/ce/legal/developer_certificate_of_origin](https://docs.gitlab.com/ce/legal/developer_certificate_of_origin).
data/Dangerfile CHANGED
@@ -2,4 +2,10 @@
2
2
 
3
3
  require 'gitlab-dangerfiles'
4
4
 
5
- Gitlab::Dangerfiles.for_project(self, 'labkit-ruby', &:import_defaults)
5
+ Gitlab::Dangerfiles.for_project(self) do |gitlab_dangerfiles|
6
+ gitlab_dangerfiles.import_plugins
7
+
8
+ # we don't want commit messages and changelog as we use sematic commit messages
9
+ # for those
10
+ gitlab_dangerfiles.import_dangerfiles(except: %w[changelog commit_messages])
11
+ end