diff --git a/.scalafmt.conf b/.scalafmt.conf index 36e2cb8a..f460f8d1 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "2.5.3" +version = "2.6.0" preset = defaultWithAlign diff --git a/modules/analysis/src/main/scala/docspell/analysis/split/TextSplitter.scala b/modules/analysis/src/main/scala/docspell/analysis/split/TextSplitter.scala index d4892dac..deebd448 100644 --- a/modules/analysis/src/main/scala/docspell/analysis/split/TextSplitter.scala +++ b/modules/analysis/src/main/scala/docspell/analysis/split/TextSplitter.scala @@ -3,7 +3,6 @@ package docspell.analysis.split import fs2.Stream /** Splits text into words. - * */ object TextSplitter { private[this] val trimChars = diff --git a/modules/common/src/main/scala/docspell/common/LenientUri.scala b/modules/common/src/main/scala/docspell/common/LenientUri.scala index f010764b..a3aa7151 100644 --- a/modules/common/src/main/scala/docspell/common/LenientUri.scala +++ b/modules/common/src/main/scala/docspell/common/LenientUri.scala @@ -221,13 +221,12 @@ object LenientUri { if (!s.contains("%")) s else s.foldLeft(("", ByteVector.empty)) { - case ((acc, res), c) => - if (acc.length == 2) ("", res ++ ByteVector.fromValidHex(acc.drop(1) + c)) - else if (acc.startsWith("%")) (acc :+ c, res) - else if (c == '%') ("%", res) - else (acc, res :+ c.toByte) - } - ._2 + case ((acc, res), c) => + if (acc.length == 2) ("", res ++ ByteVector.fromValidHex(acc.drop(1) + c)) + else if (acc.startsWith("%")) (acc :+ c, res) + else if (c == '%') ("%", res) + else (acc, res :+ c.toByte) + }._2 .decodeUtf8 .fold(throw _, identity) diff --git a/modules/joex/src/main/scala/docspell/joex/process/FindProposal.scala b/modules/joex/src/main/scala/docspell/joex/process/FindProposal.scala index 1f7e66b9..d9d629b8 100644 --- a/modules/joex/src/main/scala/docspell/joex/process/FindProposal.scala +++ b/modules/joex/src/main/scala/docspell/joex/process/FindProposal.scala @@ -13,7 +13,6 @@ import docspell.store.records._ /** Super simple approach to find corresponding meta data to an item * by looking up values from NER in the users address book. - * */ object FindProposal { diff --git a/modules/joex/src/main/scala/docspell/joex/process/SaveProposals.scala b/modules/joex/src/main/scala/docspell/joex/process/SaveProposals.scala index c9c74e11..47f7e2a7 100644 --- a/modules/joex/src/main/scala/docspell/joex/process/SaveProposals.scala +++ b/modules/joex/src/main/scala/docspell/joex/process/SaveProposals.scala @@ -7,7 +7,6 @@ import docspell.joex.scheduler.Task import docspell.store.records._ /** Saves the proposals in the database - * */ object SaveProposals { diff --git a/modules/restserver/src/main/scala/docspell/restserver/http4s/ResponseGenerator.scala b/modules/restserver/src/main/scala/docspell/restserver/http4s/ResponseGenerator.scala index 7ee3519a..06927d2b 100644 --- a/modules/restserver/src/main/scala/docspell/restserver/http4s/ResponseGenerator.scala +++ b/modules/restserver/src/main/scala/docspell/restserver/http4s/ResponseGenerator.scala @@ -15,10 +15,9 @@ trait ResponseGenerator[F[_]] { w1: EntityEncoder[F, B] ): F[Response[F]] = e.fold( - a => UnprocessableEntity(a), - b => Ok(b) - ) - .map(_.withHeaders(headers: _*)) + a => UnprocessableEntity(a), + b => Ok(b) + ).map(_.withHeaders(headers: _*)) } implicit final class OptionResponse[A](o: Option[A]) {