diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 0000000..b644745 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,2 @@ +# Scala Steward: Reformat with scalafmt 3.8.5 +d0f09a86ecbb19a55cbdf2913cf0eb6e69c57c34 diff --git a/.scalafmt.conf b/.scalafmt.conf index fc08cbb..854f17a 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.8.1" +version = "3.8.5" runner.dialect = "scala3" diff --git a/apps/operations/src/test/scala/movies/writers/CustomerRowWriter.scala b/apps/operations/src/test/scala/movies/writers/CustomerRowWriter.scala index a05fc47..d08788f 100644 --- a/apps/operations/src/test/scala/movies/writers/CustomerRowWriter.scala +++ b/apps/operations/src/test/scala/movies/writers/CustomerRowWriter.scala @@ -17,25 +17,26 @@ final class CustomerRowWriter(testTransactor: MySqlTestTransactor) with RowWriter[CustomerRow]: override def add(rows: List[CustomerRow]): IO[Unit] = super.add( rows, - row => s"""INSERT INTO customer ( - | customer_id, - | store_id, - | first_name, - | last_name, - | email, - | address_id, - | active, - | create_date - |) VALUES ( - | ${row.customer_id}, - | ${row.store_id}, - | '${row.first_name}', - | '${row.last_name}', - | '${row.email}', - | ${row.address_id}, - | ${if row.active then 1 else 0}, - | '${row.create_date.format(dateTimeFormatter)}' - |)""".stripMargin, + row => + s"""INSERT INTO customer ( + | customer_id, + | store_id, + | first_name, + | last_name, + | email, + | address_id, + | active, + | create_date + |) VALUES ( + | ${row.customer_id}, + | ${row.store_id}, + | '${row.first_name}', + | '${row.last_name}', + | '${row.email}', + | ${row.address_id}, + | ${if row.active then 1 else 0}, + | '${row.create_date.format(dateTimeFormatter)}' + |)""".stripMargin, ) object CustomerRowWriter: diff --git a/apps/operations/src/test/scala/movies/writers/FilmRowWriter.scala b/apps/operations/src/test/scala/movies/writers/FilmRowWriter.scala index bba58f4..5a5e39a 100644 --- a/apps/operations/src/test/scala/movies/writers/FilmRowWriter.scala +++ b/apps/operations/src/test/scala/movies/writers/FilmRowWriter.scala @@ -17,33 +17,34 @@ final class FilmRowWriter(testTransactor: MySqlTestTransactor) with RowWriter[FilmRow]: override def add(rows: List[FilmRow]): IO[Unit] = super.add( rows, - row => s"""INSERT INTO film ( - | film_id, - | title, - | description, - | release_year, - | language_id, - | original_language_id, - | rental_duration, - | rental_rate, - | length, - | replacement_cost, - | rating, - | special_features - |) VALUES ( - | ${row.film_id}, - | '${row.title}', - | ${row.description.fold("NULL")(x => s"'$x'")}, - | ${row.release_year}, - | ${row.language_id}, - | ${row.original_language_id.getOrElse("NULL")}, - | ${row.rental_duration}, - | '${row.rental_rate}', - | ${row.length.getOrElse("NULL")}, - | '${row.replacement_cost}', - | '${row.rating.name}', - | ${row.special_features.fold("NULL")(x => s"'$x'")} - |)""".stripMargin, + row => + s"""INSERT INTO film ( + | film_id, + | title, + | description, + | release_year, + | language_id, + | original_language_id, + | rental_duration, + | rental_rate, + | length, + | replacement_cost, + | rating, + | special_features + |) VALUES ( + | ${row.film_id}, + | '${row.title}', + | ${row.description.fold("NULL")(x => s"'$x'")}, + | ${row.release_year}, + | ${row.language_id}, + | ${row.original_language_id.getOrElse("NULL")}, + | ${row.rental_duration}, + | '${row.rental_rate}', + | ${row.length.getOrElse("NULL")}, + | '${row.replacement_cost}', + | '${row.rating.name}', + | ${row.special_features.fold("NULL")(x => s"'$x'")} + |)""".stripMargin, ) object FilmRowWriter: diff --git a/apps/operations/src/test/scala/movies/writers/RentalRowWriter.scala b/apps/operations/src/test/scala/movies/writers/RentalRowWriter.scala index b935124..80970f0 100644 --- a/apps/operations/src/test/scala/movies/writers/RentalRowWriter.scala +++ b/apps/operations/src/test/scala/movies/writers/RentalRowWriter.scala @@ -15,21 +15,22 @@ final class RentalRowWriter(testTransactor: MySqlTestTransactor) with RowWriter[RentalRow]: override def add(rows: List[RentalRow]): IO[Unit] = super.add( rows, - row => s"""INSERT INTO rental ( - | rental_id, - | rental_date, - | inventory_id, - | customer_id, - | return_date, - | staff_id - |) VALUES ( - | ${row.rental_id}, - | '${row.rental_date.format(dateTimeFormatter)}', - | ${row.inventory_id}, - | ${row.customer_id}, - | ${row.return_date.fold("NULL")(x => s"'${x.format(dateTimeFormatter)}'")}, - | ${row.staff_id} - |)""".stripMargin, + row => + s"""INSERT INTO rental ( + | rental_id, + | rental_date, + | inventory_id, + | customer_id, + | return_date, + | staff_id + |) VALUES ( + | ${row.rental_id}, + | '${row.rental_date.format(dateTimeFormatter)}', + | ${row.inventory_id}, + | ${row.customer_id}, + | ${row.return_date.fold("NULL")(x => s"'${x.format(dateTimeFormatter)}'")}, + | ${row.staff_id} + |)""".stripMargin, ) object RentalRowWriter: diff --git a/apps/operations/src/test/scala/movies/writers/StaffRowWriter.scala b/apps/operations/src/test/scala/movies/writers/StaffRowWriter.scala index f00c942..30e0d08 100644 --- a/apps/operations/src/test/scala/movies/writers/StaffRowWriter.scala +++ b/apps/operations/src/test/scala/movies/writers/StaffRowWriter.scala @@ -15,30 +15,31 @@ final class StaffRowWriter(testTransactor: MySqlTestTransactor) with RowWriter[StaffRow]: override def add(rows: List[StaffRow]): IO[Unit] = super.add( rows, - row => s"""INSERT INTO staff ( - | staff_id, - | first_name, - | last_name, - | address_id, - | picture, - | email, - | store_id, - | active, - | username, - | password - |) VALUES ( - | ${row.staff_id}, - | '${row.first_name}', - | '${row.last_name}', - | ${row.address_id}, - | null, - | '${row.email}', - | ${row.store_id}, - | ${if row.active then 1 else 0}, - | '${row.username}', - | '${row.password}' - |) - |""".stripMargin, + row => + s"""INSERT INTO staff ( + | staff_id, + | first_name, + | last_name, + | address_id, + | picture, + | email, + | store_id, + | active, + | username, + | password + |) VALUES ( + | ${row.staff_id}, + | '${row.first_name}', + | '${row.last_name}', + | ${row.address_id}, + | null, + | '${row.email}', + | ${row.store_id}, + | ${if row.active then 1 else 0}, + | '${row.username}', + | '${row.password}' + |) + |""".stripMargin, ) object StaffRowWriter: diff --git a/libs/commons/src/main/scala/Log4sLogger.scala b/libs/commons/src/main/scala/Log4sLogger.scala index 28dde3b..df30f9a 100644 --- a/libs/commons/src/main/scala/Log4sLogger.scala +++ b/libs/commons/src/main/scala/Log4sLogger.scala @@ -14,18 +14,15 @@ object Log4sLogger: @inline override def isDebugEnabled: IO[Boolean] = IO.pure(logLevel match case Debug | Trace => true - case _ => false, - ) + case _ => false) @inline override def isInfoEnabled: IO[Boolean] = IO.pure(logLevel match case Debug | Trace | Info => true - case _ => false, - ) + case _ => false) @inline override def isWarnEnabled: IO[Boolean] = IO.pure(logLevel match case Debug | Trace | Info | Warn => true - case _ => false, - ) + case _ => false) @inline override def isErrorEnabled: IO[Boolean] = IO.pure(true)