Skip to content

Commit 6ea889c

Browse files
Update scalafmt-core to 3.9.7 (#636)
1 parent d1ccef3 commit 6ea889c

File tree

16 files changed

+179
-176
lines changed

16 files changed

+179
-176
lines changed

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ ae7ede210c5b46ae1bc58a21b74f5d3e12937d43
66

77
# Scala Steward: Reformat with scalafmt 3.8.2
88
e951ceb447a24ccf320f7547524496006b4978a1
9+
10+
# Scala Steward: Reformat with scalafmt 3.9.7
11+
1e8d7ad5ccea6ea8bd05910a21071e585504e354

.scalafmt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "3.9.6"
1+
version = "3.9.7"
22
maxColumn = 120
33
align.preset = most
44
align.multiline = false

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ inThisBuild(
99
organization := "io.lambdaworks",
1010
organizationName := "LambdaWorks",
1111
startYear := Some(2022),
12-
developers := List(
12+
developers := List(
1313
Developer(
1414
"lambdaworks",
1515
"LambdaWorks' Team",

modules/example/src/main/scala/example/RepositoriesElasticsearch.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,23 @@ final case class RepositoriesElasticsearch(elasticsearch: Elasticsearch) {
3030
def findById(organization: String, id: String): Task[Option[GitHubRepo]] =
3131
for {
3232
routing <- routingOf(organization)
33-
res <- elasticsearch
33+
res <- elasticsearch
3434
.execute(ElasticRequest.getById(Index, DocumentId(id)).routing(routing))
3535
.documentAs[GitHubRepo]
3636
} yield res
3737

3838
def create(repository: GitHubRepo): Task[CreationOutcome] =
3939
for {
4040
routing <- routingOf(repository.organization)
41-
res <- elasticsearch.execute(
41+
res <- elasticsearch.execute(
4242
ElasticRequest.create(Index, DocumentId(repository.id), repository).routing(routing).refreshTrue
4343
)
4444
} yield res
4545

4646
def createAll(repositories: Chunk[GitHubRepo]): Task[Unit] =
4747
for {
4848
routing <- routingOf(organization)
49-
_ <- elasticsearch.execute(
49+
_ <- elasticsearch.execute(
5050
ElasticRequest
5151
.bulk(repositories.map { repository =>
5252
ElasticRequest.create[GitHubRepo](Index, DocumentId(repository.id), repository)
@@ -58,7 +58,7 @@ final case class RepositoriesElasticsearch(elasticsearch: Elasticsearch) {
5858
def upsert(id: String, repository: GitHubRepo): Task[Unit] =
5959
for {
6060
routing <- routingOf(repository.organization)
61-
_ <- elasticsearch.execute(
61+
_ <- elasticsearch.execute(
6262
ElasticRequest.upsert(Index, DocumentId(id), repository).routing(routing).refresh(value = true)
6363
)
6464
} yield ()

modules/integration/src/test/scala/zio/elasticsearch/HttpExecutorSpec.scala

Lines changed: 64 additions & 64 deletions
Large diffs are not rendered by default.

modules/library/src/main/scala/zio/elasticsearch/ElasticRequest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ object ElasticRequest {
738738
val highlightsJson: Json = highlights.fold(Obj())(h => Obj("highlight" -> h.toJson(None)))
739739
val searchAfterJson: Json = searchAfter.fold(Obj())(sa => Obj("search_after" -> sa))
740740
val sortJson: Json = if (sortBy.nonEmpty) Obj("sort" -> Arr(sortBy.map(_.toJson))) else Obj()
741-
val sourceJson: Json =
741+
val sourceJson: Json =
742742
(included, excluded) match {
743743
case (Chunk(), Chunk()) =>
744744
Obj()
@@ -825,7 +825,7 @@ object ElasticRequest {
825825
val highlightsJson: Json = highlights.fold(Obj())(h => Obj("highlight" -> h.toJson(None)))
826826
val searchAfterJson: Json = searchAfter.fold(Obj())(sa => Obj("search_after" -> sa))
827827
val sortJson: Json = sortBy.nonEmptyOrElse(Obj())(sb => Obj("sort" -> Arr(sb.map(_.toJson))))
828-
val sourceJson: Json =
828+
val sourceJson: Json =
829829
(included, excluded) match {
830830
case (Chunk(), Chunk()) =>
831831
Obj()

modules/library/src/main/scala/zio/elasticsearch/aggregation/Aggregations.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ private[elasticsearch] final case class Terms(
427427
}))
428428
}
429429

430-
val sizeJson = size.fold(Obj())(s => Obj("size" -> s.toJson))
430+
val sizeJson = size.fold(Obj())(s => Obj("size" -> s.toJson))
431431
val subAggsJson =
432432
self.subAggregations.nonEmptyOrElse(Obj())(sa => Obj("aggs" -> sa.map(_.toJson).reduce(_ merge _)))
433433

modules/library/src/main/scala/zio/elasticsearch/executor/HttpExecutor.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ private[elasticsearch] final class HttpExecutor private (esConfig: ElasticConfig
482482
body => {
483483
body.resultsWithHighlightsAndSort.toList match {
484484
case Nil => ZIO.succeed((Chunk.empty, None))
485-
case _ =>
485+
case _ =>
486486
body.pitId match {
487487
case Some(newPitId) =>
488488
body.lastSortField match {

modules/library/src/main/scala/zio/elasticsearch/result/Item.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ final case class Item(
5252
def innerHitAs[A](name: String)(implicit schema: Schema[A]): Either[DecodingException, Chunk[A]] =
5353
for {
5454
innerHitItems <- innerHit(name).toRight(DecodingException(s"Could not find inner hits with name $name"))
55-
innerHits <-
55+
innerHits <-
5656
Validation
5757
.validateAll(
5858
innerHitItems

modules/library/src/test/scala/zio/elasticsearch/ElasticAggregationSpec.scala

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ object ElasticAggregationSpec extends ZIOSpecDefault {
5959
)
6060
},
6161
test("bucketSort") {
62-
val aggregationWithFrom = bucketSortAggregation("aggregation").from(5)
63-
val aggregationWithSize = bucketSortAggregation("aggregation").size(5)
64-
val aggregationWithSort = bucketSortAggregation("aggregation").sort(ElasticSort.sortBy("aggregation2"))
62+
val aggregationWithFrom = bucketSortAggregation("aggregation").from(5)
63+
val aggregationWithSize = bucketSortAggregation("aggregation").size(5)
64+
val aggregationWithSort = bucketSortAggregation("aggregation").sort(ElasticSort.sortBy("aggregation2"))
6565
val aggregationWithAllParams =
6666
bucketSortAggregation("aggregation").sort(ElasticSort.sortBy("aggregation2")).from(5).size(7)
6767

@@ -128,11 +128,11 @@ object ElasticAggregationSpec extends ZIOSpecDefault {
128128
)
129129
},
130130
test("extendedStats") {
131-
val aggregation = extendedStatsAggregation("aggregation", "testField")
132-
val aggregationTs = extendedStatsAggregation("aggregation", TestSubDocument.intField)
133-
val aggregationTsRaw = extendedStatsAggregation("aggregation", TestSubDocument.intField.raw)
134-
val aggregationWithMissing = extendedStatsAggregation("aggregation", TestSubDocument.intField).missing(20.0)
135-
val aggregationWithSigma = extendedStatsAggregation("aggregation", TestSubDocument.intField).sigma(3.0)
131+
val aggregation = extendedStatsAggregation("aggregation", "testField")
132+
val aggregationTs = extendedStatsAggregation("aggregation", TestSubDocument.intField)
133+
val aggregationTsRaw = extendedStatsAggregation("aggregation", TestSubDocument.intField.raw)
134+
val aggregationWithMissing = extendedStatsAggregation("aggregation", TestSubDocument.intField).missing(20.0)
135+
val aggregationWithSigma = extendedStatsAggregation("aggregation", TestSubDocument.intField).sigma(3.0)
136136
val aggregationWithMissingAndSigma =
137137
extendedStatsAggregation("aggregation", TestSubDocument.intField).missing(20.0).sigma(3.0)
138138

@@ -151,8 +151,8 @@ object ElasticAggregationSpec extends ZIOSpecDefault {
151151
)
152152
},
153153
test("filter") {
154-
val query = term(TestDocument.stringField, "test")
155-
val aggregation = filterAggregation("aggregation", query)
154+
val query = term(TestDocument.stringField, "test")
155+
val aggregation = filterAggregation("aggregation", query)
156156
val aggregationWithSubAggregation =
157157
filterAggregation("aggregation", query).withSubAgg(minAggregation("subAggregation", TestDocument.intField))
158158
val aggregationWithMultipleSubAggregations = filterAggregation("aggregation", query)
@@ -284,9 +284,9 @@ object ElasticAggregationSpec extends ZIOSpecDefault {
284284
)
285285
},
286286
test("percentileRanks") {
287-
val aggregation = percentileRanksAggregation("aggregation", "testField", 5, 6)
288-
val aggregationTs = percentileRanksAggregation("aggregation", TestSubDocument.intField, 5, 6)
289-
val aggregationTsRaw = percentileRanksAggregation("aggregation", TestSubDocument.intField.raw, 5, 6)
287+
val aggregation = percentileRanksAggregation("aggregation", "testField", 5, 6)
288+
val aggregationTs = percentileRanksAggregation("aggregation", TestSubDocument.intField, 5, 6)
289+
val aggregationTsRaw = percentileRanksAggregation("aggregation", TestSubDocument.intField.raw, 5, 6)
290290
val aggregationWithMissing =
291291
percentileRanksAggregation("aggregation", TestSubDocument.intField, 5, 6).missing(20.0)
292292

@@ -310,10 +310,10 @@ object ElasticAggregationSpec extends ZIOSpecDefault {
310310
)
311311
},
312312
test("percentiles") {
313-
val aggregation = percentilesAggregation("aggregation", "testField")
314-
val aggregationTs = percentilesAggregation("aggregation", TestSubDocument.intField)
315-
val aggregationTsRaw = percentilesAggregation("aggregation", TestSubDocument.intField.raw)
316-
val aggregationWithMissing = percentilesAggregation("aggregation", TestSubDocument.intField).missing(20.0)
313+
val aggregation = percentilesAggregation("aggregation", "testField")
314+
val aggregationTs = percentilesAggregation("aggregation", TestSubDocument.intField)
315+
val aggregationTsRaw = percentilesAggregation("aggregation", TestSubDocument.intField.raw)
316+
val aggregationWithMissing = percentilesAggregation("aggregation", TestSubDocument.intField).missing(20.0)
317317
val aggregationWithPercents =
318318
percentilesAggregation("aggregation", TestSubDocument.intField).percents(75, 90, 99)
319319
val aggregationWithAllParams =
@@ -445,14 +445,14 @@ object ElasticAggregationSpec extends ZIOSpecDefault {
445445
)
446446
},
447447
test("terms") {
448-
val aggregation = termsAggregation("aggregation", "testField")
449-
val aggregationTs = termsAggregation("aggregation", TestSubDocument.stringField)
450-
val aggregationTsRaw = termsAggregation("aggregation", TestSubDocument.stringField.raw)
448+
val aggregation = termsAggregation("aggregation", "testField")
449+
val aggregationTs = termsAggregation("aggregation", TestSubDocument.stringField)
450+
val aggregationTsRaw = termsAggregation("aggregation", TestSubDocument.stringField.raw)
451451
val aggregationWithOrders =
452452
termsAggregation("aggregation", TestSubDocument.stringField).orderByKeyDesc
453453
.orderBy(AggregationOrder("test", Desc))
454454
.orderByCountAsc
455-
val aggregationWithSize = termsAggregation("aggregation", TestSubDocument.stringField).size(10)
455+
val aggregationWithSize = termsAggregation("aggregation", TestSubDocument.stringField).size(10)
456456
val aggregationWithAllParams =
457457
termsAggregation("aggregation", TestSubDocument.stringField.suffix("test")).orderByCountDesc.orderByKeyAsc
458458
.size(5)
@@ -538,8 +538,8 @@ object ElasticAggregationSpec extends ZIOSpecDefault {
538538
assert(aggregationTsRaw)(equalTo(ValueCount(name = "aggregation", field = "stringField.raw")))
539539
},
540540
test("weightedAvg") {
541-
val aggregation = weightedAvgAggregation("aggregation", "valueField", "weightField")
542-
val aggregationTs = weightedAvgAggregation("aggregation", TestDocument.stringField, TestDocument.intField)
541+
val aggregation = weightedAvgAggregation("aggregation", "valueField", "weightField")
542+
val aggregationTs = weightedAvgAggregation("aggregation", TestDocument.stringField, TestDocument.intField)
543543
val aggregationTsRaw =
544544
weightedAvgAggregation("aggregation", TestDocument.stringField.raw, TestDocument.intField.raw)
545545
val aggregationWithValueMissing =
@@ -713,9 +713,9 @@ object ElasticAggregationSpec extends ZIOSpecDefault {
713713
assert(aggregation2.toJson)(equalTo(expected2.toJson))
714714
},
715715
test("bucketSort") {
716-
val aggregationWithFrom = bucketSortAggregation("aggregation").from(5)
717-
val aggregationWithSize = bucketSortAggregation("aggregation").size(5)
718-
val aggregationWithSort = bucketSortAggregation("aggregation").sort(ElasticSort.sortBy("aggregation2"))
716+
val aggregationWithFrom = bucketSortAggregation("aggregation").from(5)
717+
val aggregationWithSize = bucketSortAggregation("aggregation").size(5)
718+
val aggregationWithSort = bucketSortAggregation("aggregation").sort(ElasticSort.sortBy("aggregation2"))
719719
val aggregationWithAllParams =
720720
bucketSortAggregation("aggregation").sort(ElasticSort.sortBy("aggregation2")).from(5).size(7)
721721

@@ -818,10 +818,10 @@ object ElasticAggregationSpec extends ZIOSpecDefault {
818818
assert(aggregationWithMissing.toJson)(equalTo(expectedWithMissing.toJson))
819819
},
820820
test("extendedStats") {
821-
val aggregation = extendedStatsAggregation("aggregation", "testField")
822-
val aggregationTs = extendedStatsAggregation("aggregation", TestSubDocument.intField)
823-
val aggregationWithMissing = extendedStatsAggregation("aggregation", TestSubDocument.intField).missing(20.0)
824-
val aggregationWithSigma = extendedStatsAggregation("aggregation", TestSubDocument.intField).sigma(3.0)
821+
val aggregation = extendedStatsAggregation("aggregation", "testField")
822+
val aggregationTs = extendedStatsAggregation("aggregation", TestSubDocument.intField)
823+
val aggregationWithMissing = extendedStatsAggregation("aggregation", TestSubDocument.intField).missing(20.0)
824+
val aggregationWithSigma = extendedStatsAggregation("aggregation", TestSubDocument.intField).sigma(3.0)
825825
val aggregationWithMissingAndSigma =
826826
extendedStatsAggregation("aggregation", TestSubDocument.intField).missing(20.0).sigma(3.0)
827827

@@ -891,8 +891,8 @@ object ElasticAggregationSpec extends ZIOSpecDefault {
891891
assert(aggregationWithMissingAndSigma.toJson)(equalTo(expectedWithMissingAndSigma.toJson))
892892
},
893893
test("filter") {
894-
val query = term(TestDocument.stringField, "test")
895-
val aggregation = filterAggregation("aggregation", query)
894+
val query = term(TestDocument.stringField, "test")
895+
val aggregation = filterAggregation("aggregation", query)
896896
val aggregationWithSubAggregation =
897897
filterAggregation("aggregation", query).withSubAgg(minAggregation("subAggregation", TestDocument.intField))
898898
val aggregationWithMultipleSubAggregations = filterAggregation("aggregation", query)
@@ -1146,8 +1146,8 @@ object ElasticAggregationSpec extends ZIOSpecDefault {
11461146
assert(aggregationWithSubAggregation.toJson)(equalTo(expectedWithSubAggregation.toJson))
11471147
},
11481148
test("percentileRanks") {
1149-
val aggregation = percentileRanksAggregation("aggregation", "testField", 5, 6)
1150-
val aggregationTs = percentileRanksAggregation("aggregation", TestSubDocument.intField, 5, 6)
1149+
val aggregation = percentileRanksAggregation("aggregation", "testField", 5, 6)
1150+
val aggregationTs = percentileRanksAggregation("aggregation", TestSubDocument.intField, 5, 6)
11511151
val aggregationWithMissing =
11521152
percentileRanksAggregation("aggregation", TestSubDocument.intField, 5, 6).missing(20.0)
11531153

@@ -1193,11 +1193,11 @@ object ElasticAggregationSpec extends ZIOSpecDefault {
11931193
assert(aggregationWithMissing.toJson)(equalTo(expectedWithMissing.toJson))
11941194
},
11951195
test("percentiles") {
1196-
val aggregation = percentilesAggregation("aggregation", "testField")
1197-
val aggregationTs = percentilesAggregation("aggregation", TestDocument.intField)
1196+
val aggregation = percentilesAggregation("aggregation", "testField")
1197+
val aggregationTs = percentilesAggregation("aggregation", TestDocument.intField)
11981198
val aggregationWithPercents =
11991199
percentilesAggregation("aggregation", TestDocument.intField).percents(75, 90, 99)
1200-
val aggregationWithMissing = percentilesAggregation("aggregation", TestDocument.intField).missing(20.0)
1200+
val aggregationWithMissing = percentilesAggregation("aggregation", TestDocument.intField).missing(20.0)
12011201
val aggregationWithAllParams =
12021202
percentilesAggregation("aggregation", TestDocument.intField).percents(75, 90, 99).missing(20.0)
12031203

@@ -1401,10 +1401,10 @@ object ElasticAggregationSpec extends ZIOSpecDefault {
14011401
assert(aggregationWithMissing.toJson)(equalTo(expectedWithMissing.toJson))
14021402
},
14031403
test("terms") {
1404-
val aggregation = termsAggregation("aggregation", "testField")
1405-
val aggregationTs = termsAggregation("aggregation", TestDocument.stringField)
1406-
val aggregationWithOrder = termsAggregation("aggregation", TestDocument.stringField).orderByKeyDesc
1407-
val aggregationWithSize = termsAggregation("aggregation", TestDocument.stringField).size(10)
1404+
val aggregation = termsAggregation("aggregation", "testField")
1405+
val aggregationTs = termsAggregation("aggregation", TestDocument.stringField)
1406+
val aggregationWithOrder = termsAggregation("aggregation", TestDocument.stringField).orderByKeyDesc
1407+
val aggregationWithSize = termsAggregation("aggregation", TestDocument.stringField).size(10)
14081408
val aggregationWithAllParams = termsAggregation("aggregation", TestDocument.stringField)
14091409
.orderBy(AggregationOrder("test", SortOrder.Asc))
14101410
.size(20)
@@ -1508,8 +1508,8 @@ object ElasticAggregationSpec extends ZIOSpecDefault {
15081508
assert(aggregationTs.toJson)(equalTo(expectedTs.toJson))
15091509
},
15101510
test("weightedAvg") {
1511-
val aggregation = weightedAvgAggregation("aggregation", "valueField", "weightField")
1512-
val aggregationTs = weightedAvgAggregation("aggregation", TestDocument.stringField, TestDocument.stringField)
1511+
val aggregation = weightedAvgAggregation("aggregation", "valueField", "weightField")
1512+
val aggregationTs = weightedAvgAggregation("aggregation", TestDocument.stringField, TestDocument.stringField)
15131513
val aggregationWithValueMissing =
15141514
weightedAvgAggregation("aggregation", TestDocument.stringField, TestDocument.intField).valueMissing(2.0)
15151515
val aggregationWithWeightMissing =

0 commit comments

Comments
 (0)