Skip to content

Commit 0efa3a7

Browse files
authored
Merge pull request #372 from cucumber/renovate/scalafmt-3.x
chore(deps): update dependency scalafmt to v3
2 parents 5b3727d + 41966a0 commit 0efa3a7

20 files changed

+330
-228
lines changed

Diff for: .scalafmt.conf

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
version = 2.7.5
1+
version = 3.8.1
22

33
preset=default
44

5-
runner.dialect = dotty
5+
runner.dialect=scala3

Diff for: cucumber-scala/src/main/scala-3/io/cucumber/scala/StepDsl.scala

+38-38
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ private[scala] trait StepDsl extends BaseScalaDsl {
6262
}
6363
}
6464

65-
def apply[T1, T2, T3, T4](f: (T1, T2, T3, T4) => Any)(
66-
using t1: Stepable[T1],
65+
def apply[T1, T2, T3, T4](f: (T1, T2, T3, T4) => Any)(using
66+
t1: Stepable[T1],
6767
t2: Stepable[T2],
6868
t3: Stepable[T3],
6969
t4: Stepable[T4]
@@ -81,8 +81,8 @@ private[scala] trait StepDsl extends BaseScalaDsl {
8181
}
8282
}
8383

84-
def apply[T1, T2, T3, T4, T5](f: (T1, T2, T3, T4, T5) => Any)(
85-
using t1: Stepable[T1],
84+
def apply[T1, T2, T3, T4, T5](f: (T1, T2, T3, T4, T5) => Any)(using
85+
t1: Stepable[T1],
8686
t2: Stepable[T2],
8787
t3: Stepable[T3],
8888
t4: Stepable[T4],
@@ -102,8 +102,8 @@ private[scala] trait StepDsl extends BaseScalaDsl {
102102
}
103103
}
104104

105-
def apply[T1, T2, T3, T4, T5, T6](f: (T1, T2, T3, T4, T5, T6) => Any)(
106-
using t1: Stepable[T1],
105+
def apply[T1, T2, T3, T4, T5, T6](f: (T1, T2, T3, T4, T5, T6) => Any)(using
106+
t1: Stepable[T1],
107107
t2: Stepable[T2],
108108
t3: Stepable[T3],
109109
t4: Stepable[T4],
@@ -134,8 +134,8 @@ private[scala] trait StepDsl extends BaseScalaDsl {
134134

135135
def apply[T1, T2, T3, T4, T5, T6, T7](
136136
f: (T1, T2, T3, T4, T5, T6, T7) => Any
137-
)(
138-
using t1: Stepable[T1],
137+
)(using
138+
t1: Stepable[T1],
139139
t2: Stepable[T2],
140140
t3: Stepable[T3],
141141
t4: Stepable[T4],
@@ -169,8 +169,8 @@ private[scala] trait StepDsl extends BaseScalaDsl {
169169

170170
def apply[T1, T2, T3, T4, T5, T6, T7, T8](
171171
f: (T1, T2, T3, T4, T5, T6, T7, T8) => Any
172-
)(
173-
using t1: Stepable[T1],
172+
)(using
173+
t1: Stepable[T1],
174174
t2: Stepable[T2],
175175
t3: Stepable[T3],
176176
t4: Stepable[T4],
@@ -207,8 +207,8 @@ private[scala] trait StepDsl extends BaseScalaDsl {
207207

208208
def apply[T1, T2, T3, T4, T5, T6, T7, T8, T9](
209209
f: (T1, T2, T3, T4, T5, T6, T7, T8, T9) => Any
210-
)(
211-
using t1: Stepable[T1],
210+
)(using
211+
t1: Stepable[T1],
212212
t2: Stepable[T2],
213213
t3: Stepable[T3],
214214
t4: Stepable[T4],
@@ -248,8 +248,8 @@ private[scala] trait StepDsl extends BaseScalaDsl {
248248

249249
def apply[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10](
250250
f: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) => Any
251-
)(
252-
using t1: Stepable[T1],
251+
)(using
252+
t1: Stepable[T1],
253253
t2: Stepable[T2],
254254
t3: Stepable[T3],
255255
t4: Stepable[T4],
@@ -292,8 +292,8 @@ private[scala] trait StepDsl extends BaseScalaDsl {
292292

293293
def apply[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11](
294294
f: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) => Any
295-
)(
296-
using t1: Stepable[T1],
295+
)(using
296+
t1: Stepable[T1],
297297
t2: Stepable[T2],
298298
t3: Stepable[T3],
299299
t4: Stepable[T4],
@@ -339,8 +339,8 @@ private[scala] trait StepDsl extends BaseScalaDsl {
339339

340340
def apply[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12](
341341
f: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) => Any
342-
)(
343-
using t1: Stepable[T1],
342+
)(using
343+
t1: Stepable[T1],
344344
t2: Stepable[T2],
345345
t3: Stepable[T3],
346346
t4: Stepable[T4],
@@ -389,8 +389,8 @@ private[scala] trait StepDsl extends BaseScalaDsl {
389389

390390
def apply[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](
391391
f: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) => Any
392-
)(
393-
using t1: Stepable[T1],
392+
)(using
393+
t1: Stepable[T1],
394394
t2: Stepable[T2],
395395
t3: Stepable[T3],
396396
t4: Stepable[T4],
@@ -442,8 +442,8 @@ private[scala] trait StepDsl extends BaseScalaDsl {
442442

443443
def apply[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](
444444
f: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) => Any
445-
)(
446-
using t1: Stepable[T1],
445+
)(using
446+
t1: Stepable[T1],
447447
t2: Stepable[T2],
448448
t3: Stepable[T3],
449449
t4: Stepable[T4],
@@ -514,8 +514,8 @@ private[scala] trait StepDsl extends BaseScalaDsl {
514514
T14,
515515
T15
516516
) => Any
517-
)(
518-
using t1: Stepable[T1],
517+
)(using
518+
t1: Stepable[T1],
519519
t2: Stepable[T2],
520520
t3: Stepable[T3],
521521
t4: Stepable[T4],
@@ -623,8 +623,8 @@ private[scala] trait StepDsl extends BaseScalaDsl {
623623
T15,
624624
T16
625625
) => Any
626-
)(
627-
using t1: Stepable[T1],
626+
)(using
627+
t1: Stepable[T1],
628628
t2: Stepable[T2],
629629
t3: Stepable[T3],
630630
t4: Stepable[T4],
@@ -738,8 +738,8 @@ private[scala] trait StepDsl extends BaseScalaDsl {
738738
T16,
739739
T17
740740
) => Any
741-
)(
742-
using t1: Stepable[T1],
741+
)(using
742+
t1: Stepable[T1],
743743
t2: Stepable[T2],
744744
t3: Stepable[T3],
745745
t4: Stepable[T4],
@@ -859,8 +859,8 @@ private[scala] trait StepDsl extends BaseScalaDsl {
859859
T17,
860860
T18
861861
) => Any
862-
)(
863-
using t1: Stepable[T1],
862+
)(using
863+
t1: Stepable[T1],
864864
t2: Stepable[T2],
865865
t3: Stepable[T3],
866866
t4: Stepable[T4],
@@ -986,8 +986,8 @@ private[scala] trait StepDsl extends BaseScalaDsl {
986986
T18,
987987
T19
988988
) => Any
989-
)(
990-
using t1: Stepable[T1],
989+
)(using
990+
t1: Stepable[T1],
991991
t2: Stepable[T2],
992992
t3: Stepable[T3],
993993
t4: Stepable[T4],
@@ -1119,8 +1119,8 @@ private[scala] trait StepDsl extends BaseScalaDsl {
11191119
T19,
11201120
T20
11211121
) => Any
1122-
)(
1123-
using t1: Stepable[T1],
1122+
)(using
1123+
t1: Stepable[T1],
11241124
t2: Stepable[T2],
11251125
t3: Stepable[T3],
11261126
t4: Stepable[T4],
@@ -1258,8 +1258,8 @@ private[scala] trait StepDsl extends BaseScalaDsl {
12581258
T20,
12591259
T21
12601260
) => Any
1261-
)(
1262-
using t1: Stepable[T1],
1261+
)(using
1262+
t1: Stepable[T1],
12631263
t2: Stepable[T2],
12641264
t3: Stepable[T3],
12651265
t4: Stepable[T4],
@@ -1403,8 +1403,8 @@ private[scala] trait StepDsl extends BaseScalaDsl {
14031403
T21,
14041404
T22
14051405
) => Any
1406-
)(
1407-
using t1: Stepable[T1],
1406+
)(using
1407+
t1: Stepable[T1],
14081408
t2: Stepable[T2],
14091409
t3: Stepable[T3],
14101410
t4: Stepable[T4],

Diff for: cucumber-scala/src/main/scala/io/cucumber/scala/AbstractDatatableElementTransformerDefinition.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ trait AbstractDatatableElementTransformerDefinition
6767
emptyPatterns.filter(emptyPattern => fromValue.contains(emptyPattern))
6868
val msg =
6969
s"After replacing ${conflict.headOption
70-
.getOrElse("")} and ${conflict.drop(1).headOption.getOrElse("")} with empty strings the datatable entry contains duplicate keys: $fromValue"
70+
.getOrElse("")} and ${conflict.drop(1).headOption.getOrElse("")} with empty strings the datatable entry contains duplicate keys: $fromValue"
7171
new IllegalArgumentException(msg)
7272
}
7373

Diff for: cucumber-scala/src/main/scala/io/cucumber/scala/AbstractGlueDefinition.scala

+3-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ trait AbstractGlueDefinition extends Located {
3030
Optional.of(sourceReference)
3131
}
3232

33-
/** Executes the block of code and handle failures in the way asked by Cucumber specification: that is throwing a CucumberInvocationTargetException.
33+
/** Executes the block of code and handle failures in the way asked by
34+
* Cucumber specification: that is throwing a
35+
* CucumberInvocationTargetException.
3436
*/
3537
protected def executeAsCucumber(block: => Unit): Unit = {
3638
Try(block).recoverWith { case ex =>

Diff for: cucumber-scala/src/main/scala/io/cucumber/scala/DataTableTypeDsl.scala

+5-6
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@ private[scala] trait DataTableTypeDsl extends BaseScalaDsl {
88
*/
99
def DataTableType: DataTableTypeBody = DataTableType(NO_REPLACEMENT)
1010

11-
/** Register a data table type with a replacement.
12-
* <p>
13-
* A data table can only represent absent and non-empty strings. By replacing
14-
* a known value (for example [empty]) a data table can also represent
15-
* empty strings.
11+
/** Register a data table type with a replacement. <p> A data table can only
12+
* represent absent and non-empty strings. By replacing a known value (for
13+
* example [empty]) a data table can also represent empty strings.
1614
*
17-
* @param replaceWithEmptyString a string that will be replaced with an empty string.
15+
* @param replaceWithEmptyString
16+
* a string that will be replaced with an empty string.
1817
*/
1918
def DataTableType(replaceWithEmptyString: String): DataTableTypeBody =
2019
DataTableType(Seq(replaceWithEmptyString))

Diff for: cucumber-scala/src/main/scala/io/cucumber/scala/DefaultTransformerDsl.scala

+24-18
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ private[scala] trait DefaultTransformerDsl extends BaseScalaDsl {
1010

1111
/** Register default parameter type transformer.
1212
*
13-
* @param body converts `String` argument to an instance of the `Type` argument
13+
* @param body
14+
* converts `String` argument to an instance of the `Type` argument
1415
*/
1516
def DefaultParameterTransformer(
1617
body: DefaultParameterTransformerBody
@@ -22,23 +23,24 @@ private[scala] trait DefaultTransformerDsl extends BaseScalaDsl {
2223

2324
/** Register default data table cell transformer.
2425
*
25-
* @param body converts `String` argument to an instance of the `Type` argument
26+
* @param body
27+
* converts `String` argument to an instance of the `Type` argument
2628
*/
2729
def DefaultDataTableCellTransformer(
2830
body: DefaultDataTableCellTransformerBody
2931
): Unit = {
3032
DefaultDataTableCellTransformer(NO_REPLACEMENT)(body)
3133
}
3234

33-
/** Register default data table cell transformer with a replacement.
34-
* <p>
35-
* A data table can only represent absent and non-empty strings. By replacing
36-
* a known value (for example [empty]) a data table can also represent
37-
* empty strings.
38-
* *
35+
/** Register default data table cell transformer with a replacement. <p> A
36+
* data table can only represent absent and non-empty strings. By replacing a
37+
* known value (for example [empty]) a data table can also represent empty
38+
* strings. *
3939
*
40-
* @param replaceWithEmptyString a string that will be replaced with an empty string.
41-
* @param body converts `String` argument to an instance of the `Type` argument
40+
* @param replaceWithEmptyString
41+
* a string that will be replaced with an empty string.
42+
* @param body
43+
* converts `String` argument to an instance of the `Type` argument
4244
*/
4345
def DefaultDataTableCellTransformer(
4446
replaceWithEmptyString: String
@@ -56,22 +58,26 @@ private[scala] trait DefaultTransformerDsl extends BaseScalaDsl {
5658

5759
/** Register default data table entry transformer.
5860
*
59-
* @param body converts `Map[String,String]` argument to an instance of the `Type` argument
61+
* @param body
62+
* converts `Map[String,String]` argument to an instance of the `Type`
63+
* argument
6064
*/
6165
def DefaultDataTableEntryTransformer(
6266
body: DefaultDataTableEntryTransformerBody
6367
): Unit = {
6468
DefaultDataTableEntryTransformer(NO_REPLACEMENT)(body)
6569
}
6670

67-
/** Register default data table cell transformer with a replacement.
68-
* <p>
69-
* A data table can only represent absent and non-empty strings. By replacing
70-
* a known value (for example [empty]) a data table can also represent
71-
* empty strings.
71+
/** Register default data table cell transformer with a replacement. <p> A
72+
* data table can only represent absent and non-empty strings. By replacing a
73+
* known value (for example [empty]) a data table can also represent empty
74+
* strings.
7275
*
73-
* @param replaceWithEmptyString a string that will be replaced with an empty string.
74-
* @param body converts `Map[String,String]` argument to an instance of the `Type` argument
76+
* @param replaceWithEmptyString
77+
* a string that will be replaced with an empty string.
78+
* @param body
79+
* converts `Map[String,String]` argument to an instance of the `Type`
80+
* argument
7581
*/
7682
def DefaultDataTableEntryTransformer(
7783
replaceWithEmptyString: String

Diff for: cucumber-scala/src/main/scala/io/cucumber/scala/DocStringTypeDsl.scala

+7-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ private[scala] trait DocStringTypeDsl extends BaseScalaDsl {
66

77
/** Register doc string type.
88
*
9-
* @param contentType Name of the content type.
10-
* @param body a function that creates an instance of <code>T</code>
11-
* from the doc string
12-
* @tparam T type to convert to
9+
* @param contentType
10+
* Name of the content type.
11+
* @param body
12+
* a function that creates an instance of <code>T</code> from the doc
13+
* string
14+
* @tparam T
15+
* type to convert to
1316
*/
1417
def DocStringType[T](
1518
contentType: String

Diff for: cucumber-scala/src/main/scala/io/cucumber/scala/GlueAdaptor.scala

+6-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@ import io.cucumber.core.backend.Glue
44

55
class GlueAdaptor(glue: Glue) {
66

7-
/** Load the step definitions and hooks from a ScalaDsl instance into the glue.
7+
/** Load the step definitions and hooks from a ScalaDsl instance into the
8+
* glue.
89
*
9-
* @param registry ScalaDsl instance registry
10-
* @param scenarioScoped true for class instances, false for object singletons
10+
* @param registry
11+
* ScalaDsl instance registry
12+
* @param scenarioScoped
13+
* true for class instances, false for object singletons
1114
*/
1215
def loadRegistry(
1316
registry: ScalaDslRegistry,

0 commit comments

Comments
 (0)