Skip to content

Commit

Permalink
Update scalafmt-core to 3.7.17 (#1325)
Browse files Browse the repository at this point in the history
* Update scalafmt-core to 3.7.17

* Reformat with scalafmt 3.7.17

Executed command: scalafmt --non-interactive

* Add 'Reformat with scalafmt 3.7.17' to .git-blame-ignore-revs
  • Loading branch information
scala-steward authored May 15, 2024
1 parent e57895c commit 8e01907
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 92 deletions.
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Scala Steward: Reformat with scalafmt 3.7.17
65023c3a2a2db480a25916926efa665f3b919fc2
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "3.7.2"
version = "3.7.17"
runner.dialect = scala213
maxColumn = 120
align.preset = most
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ object AutomaticConfigTestUtils {
private val genCurrency: Gen[Any, Currency] = Gen.double(10.0, 20.0).map(Currency.apply)
private val genPrice: Gen[Any, Price] = Gen.oneOf(genPriceDescription, genCurrency)

private val genToken = Gen.const(Token("someToken"))
private val genPassword = Gen.const(Password("some passeword"))
private val genToken = Gen.const(Token("someToken"))
private val genPassword = Gen.const(Password("some passeword"))
private val genInstanceProfile = Gen.const(InstanceProfile)
private val genCredentials = Gen.oneOf(genToken, genPassword, genInstanceProfile)
private val genCredentials = Gen.oneOf(genToken, genPassword, genInstanceProfile)

private val genDbUrl = Gen.const(DbUrl("dburl"))

Expand Down Expand Up @@ -112,9 +112,9 @@ object AutomaticConfigTestUtils {
) ++ (aws.security match {
case Password(password) =>
Map("aws.security.type" -> "Password", "aws.security.value" -> password)
case Token(token) =>
case Token(token) =>
Map("aws.security.type" -> "Token", "aws.security.value" -> token)
case InstanceProfile =>
case InstanceProfile =>
Map("aws.security.type" -> "InstanceProfile")
}) ++ amount.map(double => ("amount", double.toString)).toList
} yield (default, anotherDefault) match {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ object TypesafeConfigErrorsSpec extends ZIOSpecDefault {
// assert(notWellFormedConfigResult.isLeft)(Assertion.isTrue)
// },
test("A variant error case with typesafe HOCON config and a manual description") {
val configNestedManual = {
val configNestedManual = {
val accountConfig =
(string("region") zip string("accountId")).to[Account]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,17 +124,17 @@ object TypesafeConfigListTest extends ZIOSpecDefault {
|""".stripMargin

final case class Details3(
ci: String,
vi: Either[Int, Either[Long, Either[Double, Either[Float, String]]]],
lst: List[Int],
vvv: Option[List[Int]]
)
ci: String,
vi: Either[Int, Either[Long, Either[Double, Either[Float, String]]]],
lst: List[Int],
vvv: Option[List[Int]]
)
final case class Details2(hi: String, bi: String, r: List[Details3])
final case class Details1(
table: String,
columns: List[String],
extraDetails: List[Details2]
)
table: String,
columns: List[String],
extraDetails: List[Details2]
)
final case class ExportDetails(exportDetails: List[Details1], database: Database)
final case class Port(va: String)
final case class Database(port: Port)
Expand All @@ -147,85 +147,106 @@ object TypesafeConfigListTest extends ZIOSpecDefault {

val expectedResult =
ExportDetails(
exportDetails = List(Details1(
table = "some_name",
columns = List("a", "b", "c", "d"),
extraDetails = List(Details2(
hi = "di",
bi = "ci",
r = List(Details3(
ci = "ki",
vi = Right(value = Right(value = Right(value = Right(value = "bi")))),
lst = List(1, 1, 1),
vvv = Some(Nil)
), Details3(
ci = "ki",
vi = Right(value = Right(value = Left(value = 1.0882121))),
lst = List(1, 2, 1),
vvv = None
), Details3(
ci = "ki",
vi = Left(value = 3),
lst = List(1, 3, 5),
vvv = Some(List(1, 2, 3))
))
), Details2(
hi = "di",
bi = "ci",
r = List(Details3(
ci = "ki",
vi = Right(value = Right(value = Right(value = Right(value = "bi")))),
lst = List(1, 1, 1),
vvv = Some(Nil)
), Details3(
ci = "ki",
vi = Right(value = Right(value = Left(value = 1.0882121))),
lst = List(1, 2, 1),
vvv = None
), Details3(
ci = "ki",
vi = Left(value = 3),
lst = List(1, 3, 5),
vvv = Some(List(1, 2, 3))
))
), Details2(
hi = "di",
bi = "ci",
r = Nil
))
), Details1(
table = "some_name1",
columns = Nil,
extraDetails = List(Details2(
hi = "di",
bi = "ci",
r = Nil
), Details2(
hi = "di",
bi = "ci",
r = Nil
), Details2(
hi = "di",
bi = "ci",
r = Nil
))
), Details1(
table = "some_name1",
columns = Nil,
extraDetails = Nil
), Details1(
table = "some_name2",
columns = Nil,
extraDetails = Nil
), Details1(
table = "some_name2",
columns = Nil,
extraDetails = Nil
)),
exportDetails = List(
Details1(
table = "some_name",
columns = List("a", "b", "c", "d"),
extraDetails = List(
Details2(
hi = "di",
bi = "ci",
r = List(
Details3(
ci = "ki",
vi = Right(value = Right(value = Right(value = Right(value = "bi")))),
lst = List(1, 1, 1),
vvv = Some(Nil)
),
Details3(
ci = "ki",
vi = Right(value = Right(value = Left(value = 1.0882121))),
lst = List(1, 2, 1),
vvv = None
),
Details3(
ci = "ki",
vi = Left(value = 3),
lst = List(1, 3, 5),
vvv = Some(List(1, 2, 3))
)
)
),
Details2(
hi = "di",
bi = "ci",
r = List(
Details3(
ci = "ki",
vi = Right(value = Right(value = Right(value = Right(value = "bi")))),
lst = List(1, 1, 1),
vvv = Some(Nil)
),
Details3(
ci = "ki",
vi = Right(value = Right(value = Left(value = 1.0882121))),
lst = List(1, 2, 1),
vvv = None
),
Details3(
ci = "ki",
vi = Left(value = 3),
lst = List(1, 3, 5),
vvv = Some(List(1, 2, 3))
)
)
),
Details2(
hi = "di",
bi = "ci",
r = Nil
)
)
),
Details1(
table = "some_name1",
columns = Nil,
extraDetails = List(
Details2(
hi = "di",
bi = "ci",
r = Nil
),
Details2(
hi = "di",
bi = "ci",
r = Nil
),
Details2(
hi = "di",
bi = "ci",
r = Nil
)
)
),
Details1(
table = "some_name1",
columns = Nil,
extraDetails = Nil
),
Details1(
table = "some_name2",
columns = Nil,
extraDetails = Nil
),
Details1(
table = "some_name2",
columns = Nil,
extraDetails = Nil
)
),
database = Database(port = Port(va = "ba"))
)


assertZIO(zioConfigWithKeysInKebabResult)(equalTo(expectedResult))
}
)
Expand Down

0 comments on commit 8e01907

Please sign in to comment.