From f505f9f356f8c9a5b9b5116af0ad5bad7d8a31a9 Mon Sep 17 00:00:00 2001 From: satorg Date: Wed, 17 Nov 2021 20:52:50 -0800 Subject: [PATCH 1/2] fix .scalafmt.conf --- .scalafmt.conf | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index f403ba8b20..e6e8c03422 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -10,4 +10,16 @@ docstrings = JavaDoc newlines.afterCurlyLambda = preserve docstrings.style = keep docstrings.oneline = unfold -project.excludeFilters = [ "core/src/main/scala-3.x" ] + +runner.dialect = scala213source3 +fileOverride { + "glob:**/*.sbt" { + runner.dialect = sbt1 + } + "glob:**/src/{main,test}/scala-2.12/**" { + runner.dialect = scala212source3 + } + "glob:**/src/{main,test}/scala-3.x/**" { + runner.dialect = scala3 + } +} From 4f248a3e0d27dd6b9dd5459f4dd5298a07ff43e1 Mon Sep 17 00:00:00 2001 From: satorg Date: Wed, 17 Nov 2021 20:53:17 -0800 Subject: [PATCH 2/2] apply +prePR command --- .../main/scala-3.x/src/main/scala/cats/syntax/MonadOps.scala | 2 +- free/src/main/scala-3.x/cats/free/FreeFoldStep.scala | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/scala-3.x/src/main/scala/cats/syntax/MonadOps.scala b/core/src/main/scala-3.x/src/main/scala/cats/syntax/MonadOps.scala index ba4f2a4313..8f445403ea 100644 --- a/core/src/main/scala-3.x/src/main/scala/cats/syntax/MonadOps.scala +++ b/core/src/main/scala-3.x/src/main/scala/cats/syntax/MonadOps.scala @@ -1,6 +1,6 @@ package cats.syntax -import cats.{Monad, Alternative} +import cats.{Alternative, Monad} final class MonadOps[F[_], A](private val fa: F[A]) extends AnyVal { def whileM[G[_]](using M: Monad[F], G: Alternative[G])(p: F[Boolean]): F[G[A]] = M.whileM(p)(fa) diff --git a/free/src/main/scala-3.x/cats/free/FreeFoldStep.scala b/free/src/main/scala-3.x/cats/free/FreeFoldStep.scala index f6fa75e7ab..a5211f58c3 100644 --- a/free/src/main/scala-3.x/cats/free/FreeFoldStep.scala +++ b/free/src/main/scala-3.x/cats/free/FreeFoldStep.scala @@ -1,7 +1,7 @@ package cats.free import Free.{FlatMapped, Pure, Suspend} -import cats.{Foldable, Eval} +import cats.{Eval, Foldable} private[free] trait FreeFoldStep[S[_], A] { @@ -38,4 +38,4 @@ private[free] trait FreeFoldStep[S[_], A] { fa => F.foldRight(fa, lb)(f), [X] => (sx: S[X], g: X => Free[S, A]) => F.foldRight(sx, lb)((a, lbb) => foldRight(g(a), lbb)(f)) ) -} \ No newline at end of file +}