Skip to content

Commit 78d9fa5

Browse files
committed
Merge branch 'main' into refactor/update_cck_conformance
2 parents a9dea52 + 50c3705 commit 78d9fa5

37 files changed

Lines changed: 926 additions & 44 deletions

.rubocop_todo.yml

Lines changed: 17 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2025-03-14 09:41:32 UTC using RuboCop version 1.69.2.
3+
# on 2025-12-09 18:02:29 UTC using RuboCop version 1.71.2.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -11,6 +11,7 @@
1111
# TODO - [LH] -> Jul '24 - 369 files inspected, 661 offenses detected, 98 offenses autocorrectable
1212
# TODO - [LH] -> Jan '25 (Updated deps and v10 prep) - 369 files inspected, 704 offenses detected, 112 offenses autocorrectable
1313
# TODO - [LH] -> Mar '25 (v10 prep) - 370 files inspected, 721 offenses detected, 116 offenses autocorrectable
14+
# TODO - [LH] -> Dec '26 (query prep) - 378 files inspected, 729 offenses detected, 109 offenses autocorrectable
1415

1516
# Offense count: 1
1617
# This cop supports safe autocorrection (--autocorrect).
@@ -46,7 +47,7 @@ Lint/UselessMethodDefinition:
4647
Exclude:
4748
- 'lib/cucumber/glue/proto_world.rb'
4849

49-
# Offense count: 61
50+
# Offense count: 66
5051
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
5152
Metrics/AbcSize:
5253
Max: 127
@@ -57,17 +58,17 @@ Metrics/AbcSize:
5758
Metrics/BlockLength:
5859
Max: 52
5960

60-
# Offense count: 13
61+
# Offense count: 14
6162
# Configuration parameters: CountComments, CountAsOne.
6263
Metrics/ClassLength:
6364
Max: 515
6465

65-
# Offense count: 8
66+
# Offense count: 10
6667
# Configuration parameters: AllowedMethods, AllowedPatterns.
6768
Metrics/CyclomaticComplexity:
68-
Max: 12
69+
Max: 15
6970

70-
# Offense count: 76
71+
# Offense count: 83
7172
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
7273
Metrics/MethodLength:
7374
Max: 64
@@ -77,10 +78,10 @@ Metrics/MethodLength:
7778
Metrics/ModuleLength:
7879
Max: 804
7980

80-
# Offense count: 8
81+
# Offense count: 10
8182
# Configuration parameters: AllowedMethods, AllowedPatterns.
8283
Metrics/PerceivedComplexity:
83-
Max: 13
84+
Max: 15
8485

8586
# Offense count: 1
8687
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
@@ -146,7 +147,7 @@ RSpec/EmptyExampleGroup:
146147
- 'spec/cucumber/filters/activate_steps_spec.rb'
147148
- 'spec/cucumber/running_test_case_spec.rb'
148149

149-
# Offense count: 74
150+
# Offense count: 70
150151
# Configuration parameters: CountAsOne.
151152
RSpec/ExampleLength:
152153
Max: 58
@@ -178,12 +179,12 @@ RSpec/ExpectInHook:
178179
- 'spec/cucumber/multiline_argument/data_table_spec.rb'
179180
- 'spec/cucumber/runtime/meta_message_builder_spec.rb'
180181

181-
# Offense count: 13
182+
# Offense count: 14
182183
RSpec/ExpectOutput:
183184
Exclude:
184185
- 'spec/cucumber/formatter/interceptor_spec.rb'
185186

186-
# Offense count: 65
187+
# Offense count: 63
187188
# This cop supports safe autocorrection (--autocorrect).
188189
# Configuration parameters: EnforcedStyle.
189190
# SupportedStyles: implicit, each, example
@@ -197,7 +198,7 @@ RSpec/IndexedLet:
197198
- 'spec/cucumber/filters/retry_spec.rb'
198199
- 'spec/cucumber/glue/registry_and_more_spec.rb'
199200

200-
# Offense count: 36
201+
# Offense count: 37
201202
# Configuration parameters: AssignmentOnly.
202203
RSpec/InstanceVariable:
203204
Exclude:
@@ -211,36 +212,26 @@ RSpec/MatchArray:
211212
Exclude:
212213
- 'spec/cucumber/cli/configuration_spec.rb'
213214

214-
# Offense count: 5
215+
# Offense count: 4
215216
# Configuration parameters: EnforcedStyle.
216217
# SupportedStyles: have_received, receive
217218
RSpec/MessageSpies:
218219
Exclude:
219-
- 'spec/cucumber/deprecate_spec.rb'
220220
- 'spec/cucumber/formatter/io_http_buffer_spec.rb'
221221
- 'spec/cucumber/runtime/hooks_examples.rb'
222222

223-
# Offense count: 2
224-
# This cop supports safe autocorrection (--autocorrect).
225-
# Configuration parameters: EnforcedStyle.
226-
# SupportedStyles: hash, symbol
227-
RSpec/MetadataStyle:
228-
Exclude:
229-
- 'compatibility/cck_spec.rb'
230-
- 'spec/cucumber/project_initializer_spec.rb'
231-
232223
# Offense count: 15
233224
RSpec/MissingExampleGroupArgument:
234225
Exclude:
235226
- 'spec/cucumber/filters/activate_steps_spec.rb'
236227
- 'spec/cucumber/formatter/fail_fast_spec.rb'
237228
- 'spec/cucumber/formatter/rerun_spec.rb'
238229

239-
# Offense count: 58
230+
# Offense count: 60
240231
RSpec/MultipleExpectations:
241232
Max: 3
242233

243-
# Offense count: 38
234+
# Offense count: 39
244235
# Configuration parameters: AllowSubject.
245236
RSpec/MultipleMemoizedHelpers:
246237
Max: 10
@@ -300,24 +291,13 @@ RSpec/RepeatedExample:
300291
- 'spec/cucumber/formatter/rerun_spec.rb'
301292
- 'spec/cucumber/world/pending_spec.rb'
302293

303-
# Offense count: 2
304-
RSpec/RepeatedExampleGroupDescription:
305-
Exclude:
306-
- 'spec/cucumber/glue/proto_world_spec.rb'
307-
308294
# Offense count: 3
309295
# This cop supports safe autocorrection (--autocorrect).
310296
# Configuration parameters: AutoCorrect.
311297
RSpec/ScatteredLet:
312298
Exclude:
313299
- 'spec/cucumber/runtime/support_code_spec.rb'
314300

315-
# Offense count: 1
316-
# This cop supports safe autocorrection (--autocorrect).
317-
RSpec/SortMetadata:
318-
Exclude:
319-
- 'compatibility/cck_spec.rb'
320-
321301
# Offense count: 1
322302
# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata.
323303
# Include: **/*_spec.rb
@@ -357,12 +337,6 @@ RSpec/VerifiedDoubles:
357337
- 'spec/cucumber/runtime/support_code_spec.rb'
358338
- 'spec/cucumber/world/pending_spec.rb'
359339

360-
# Offense count: 1
361-
# This cop supports unsafe autocorrection (--autocorrect-all).
362-
Security/YAMLLoad:
363-
Exclude:
364-
- 'lib/cucumber/cli/profile_loader.rb'
365-
366340
# Offense count: 3
367341
Style/ClassVars:
368342
Exclude:
@@ -400,13 +374,12 @@ Style/RedundantFreeze:
400374
- 'lib/cucumber/runtime.rb'
401375
- 'lib/cucumber/term/ansicolor.rb'
402376

403-
# Offense count: 6
377+
# Offense count: 5
404378
# This cop supports safe autocorrection (--autocorrect).
405379
Style/StderrPuts:
406380
Exclude:
407381
- 'examples/i18n/Rakefile'
408382
- 'lib/cucumber/cli/main.rb'
409-
- 'lib/cucumber/deprecate.rb'
410383
- 'lib/cucumber/formatter/unicode.rb'
411384
- 'lib/cucumber/rake/task.rb'
412385
- 'spec/cucumber/formatter/interceptor_spec.rb'

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo
1111
## [Unreleased]
1212
### Added
1313
- Add timestamp to `Attachment` message
14+
- A first initial iteration of the new `cucumber-query` structure ([#1801](https://github.com/cucumber/cucumber-ruby/pull/1801) [luke-hill](https://github.com/luke-hill))
15+
16+
> This is currently not consumed anywhere, but will become the building blocks for the future of cucumber formatters
17+
> which we hope to begin migrating to in the start of 2026
1418
1519
## [10.2.0] - 2025-12-10
1620
### Changed

lib/cucumber/formatter/message_builder.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
require 'cucumber/formatter/query/test_case_started_by_test_case'
1010
require 'cucumber/formatter/query/test_run_started'
1111

12+
require 'cucumber/query'
13+
1214
module Cucumber
1315
module Formatter
1416
class MessageBuilder
@@ -39,6 +41,9 @@ def initialize(config)
3941
@current_test_run_started_id = nil
4042
@current_test_case_started_id = nil
4143
@current_test_step_id = nil
44+
45+
@repository = Cucumber::Repository.new
46+
@query = Cucumber::Query.new(@repository)
4247
end
4348

4449
def attach(src, media_type, filename)

0 commit comments

Comments
 (0)