@@ -224,15 +224,32 @@ There are three main reasons you should do this:
224
224
List("").foldLeft[Int](0, _ + _.length)
225
225
226
226
For complex DSLs, or with type-names that are long, it can be difficult
227
- to fit the entire signature on one line. In those cases, align the
228
- open-paren of the parameter lists, one list per line (i.e. if you can't
229
- put them all on one line, put one each per line):
227
+ to fit the entire signature on one line. For those cases there are several
228
+ different styles in use:
229
+
230
+ 1 . Split the parameter lists, one parameter per line with
231
+ [ trailing commas] ( https://docs.scala-lang.org/sips/trailing-commas.html#motivation )
232
+ and parentheses being on separate lines adding to visual separation between
233
+ the lists:
234
+
235
+ protected def forResource(
236
+ resourceInfo: Any,
237
+ )(
238
+ f: (JsonNode) => Any,
239
+ )(implicit
240
+ urlCreator: URLCreator,
241
+ configurer: OAuthConfiguration,
242
+ ): Any = {
243
+ ...
244
+ }
230
245
231
- protected def forResource(resourceInfo: Any)
232
- (f: (JsonNode) => Any)
233
- (implicit urlCreator: URLCreator, configurer: OAuthConfiguration): Any = {
234
- ...
235
- }
246
+ 2 . Or align the open-paren of the parameter lists, one list per line:
247
+
248
+ protected def forResource(resourceInfo: Any)
249
+ (f: (JsonNode) => Any)
250
+ (implicit urlCreator: URLCreator, configurer: OAuthConfiguration): Any = {
251
+ ...
252
+ }
236
253
237
254
#### Higher-Order Functions
238
255
0 commit comments