Skip to content

Commit 6816089

Browse files
committed
Scalafmt
1 parent 2575359 commit 6816089

4 files changed

Lines changed: 38 additions & 27 deletions

File tree

build.sbt

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ lazy val model =
3131
.crossType(CrossType.Pure)
3232
.in(file("model"))
3333
.settings(
34-
moduleName := "clue-model",
34+
moduleName := "clue-model",
3535
libraryDependencies ++=
3636
Settings.Libraries.Cats.value ++
3737
Settings.Libraries.CatsTestkit.value ++
@@ -43,7 +43,7 @@ lazy val model =
4343
Settings.Libraries.Monocle.value ++
4444
Settings.Libraries.MonocleLaw.value ++
4545
Settings.Libraries.MUnit.value,
46-
Test / classLoaderLayeringStrategy := ClassLoaderLayeringStrategy.Flat // Needed for circe's codec tests
46+
Test / classLoaderLayeringStrategy := ClassLoaderLayeringStrategy.Flat // Needed for circe's codec tests
4747
)
4848

4949
lazy val core =
@@ -52,9 +52,9 @@ lazy val core =
5252
.in(file("core"))
5353
.enablePlugins(BuildInfoPlugin)
5454
.settings(
55-
moduleName := "clue-core",
56-
buildInfoPackage := "clue",
57-
buildInfoKeys := Seq[BuildInfoKey](name, version),
55+
moduleName := "clue-core",
56+
buildInfoPackage := "clue",
57+
buildInfoKeys := Seq[BuildInfoKey](name, version),
5858
libraryDependencies ++=
5959
Settings.Libraries.Cats.value ++
6060
Settings.Libraries.CatsEffect.value ++
@@ -71,8 +71,8 @@ lazy val scalaJS =
7171
.in(file("scalajs"))
7272
.enablePlugins(ScalaJSPlugin)
7373
.settings(
74-
moduleName := "clue-scalajs",
75-
coverageEnabled := false,
74+
moduleName := "clue-scalajs",
75+
coverageEnabled := false,
7676
libraryDependencies ++=
7777
Settings.Libraries.ScalaJsDom.value ++
7878
Settings.Libraries.ScalaJsMacrotaskExecutor.value
@@ -84,7 +84,7 @@ lazy val http4s =
8484
.crossType(CrossType.Pure)
8585
.in(file("http4s"))
8686
.settings(
87-
moduleName := "clue-http4s",
87+
moduleName := "clue-http4s",
8888
libraryDependencies ++=
8989
Settings.Libraries.Http4sCirce.value ++
9090
Settings.Libraries.Http4sClient.value ++
@@ -197,23 +197,23 @@ lazy val sbtPlugin =
197197
.in(file("sbt-plugin"))
198198
.enablePlugins(SbtPlugin, BuildInfoPlugin)
199199
.settings(
200-
moduleName := "sbt-clue",
201-
crossScalaVersions := List("2.12.20"),
202-
scalacOptions := Nil,
200+
moduleName := "sbt-clue",
201+
crossScalaVersions := List("2.12.20"),
202+
scalacOptions := Nil,
203203
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % V.scalafixVersion),
204204
addSbtPlugin("org.portable-scala" % "sbt-platform-deps" % "1.0.2"),
205205
addSbtPlugin("org.portable-scala" % "sbt-crossproject" % "1.3.2"),
206-
buildInfoPackage := "clue.sbt",
207-
buildInfoKeys := Seq[BuildInfoKey](
206+
buildInfoPackage := "clue.sbt",
207+
buildInfoKeys := Seq[BuildInfoKey](
208208
version,
209209
organization,
210210
"rulesModule" -> (genRules / moduleName).value,
211211
"coreModule" -> (core.jvm / moduleName).value
212212
),
213213
buildInfoOptions += BuildInfoOption.PackagePrivate,
214-
Test / test :=
214+
Test / test :=
215215
scripted.toTask("").value,
216-
scripted := scripted
216+
scripted := scripted
217217
.dependsOn(
218218
genRules / publishLocal,
219219
model.jvm / publishLocal,
@@ -225,5 +225,5 @@ lazy val sbtPlugin =
225225
"-Dplugin.version=" + version.value,
226226
"-Dscala.version=" + (core.jvm / scalaVersion).value
227227
),
228-
scriptedBufferLog := false,
228+
scriptedBufferLog := false
229229
)

http4s/src/main/scala/clue/http4s/Http4sHttpClient.scala

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ import org.http4s.client.Client
1515
import org.typelevel.log4cats.Logger
1616

1717
object Http4sHttpClient {
18-
def of[F[_]: {MonadThrow as F, Http4sHttpBackend as B, Logger as L}, S](uri: Uri, name: String = "", headers: Headers = Headers.empty): F[Http4sHttpClient[F, S]] = {
18+
def of[F[_]: {MonadThrow as F, Http4sHttpBackend as B, Logger as L}, S](
19+
uri: Uri,
20+
name: String = "",
21+
headers: Headers = Headers.empty
22+
): F[Http4sHttpClient[F, S]] = {
1923
val logPrefix = s"clue.FetchClientWithPars[${if (name.isEmpty) uri else name}]"
2024

2125
val internalLogger = L.withModifiedString(s => s"$logPrefix $s")
@@ -26,9 +30,9 @@ object Http4sHttpClient {
2630
}
2731

2832
def of[F[_]: {Concurrent as F, Logger as L}, S](
29-
uri: Uri,
30-
client: Client[F],
31-
name: String,
33+
uri: Uri,
34+
client: Client[F],
35+
name: String,
3236
headers: Headers
3337
): F[Http4sHttpClient[F, S]] = {
3438
val logPrefix = s"clue.FetchClientWithPars[${if (name.isEmpty) uri else name}]"
@@ -45,7 +49,11 @@ object Http4sHttpClient {
4549
def of[F[_]: Concurrent: Logger, S](uri: Uri, client: Client[F]): F[Http4sHttpClient[F, S]] =
4650
of[F, S](uri, client, "", Headers.empty)
4751

48-
def of[F[_]: Concurrent: Logger, S](uri: Uri, client: Client[F], name: String): F[Http4sHttpClient[F, S]] =
52+
def of[F[_]: Concurrent: Logger, S](
53+
uri: Uri,
54+
client: Client[F],
55+
name: String
56+
): F[Http4sHttpClient[F, S]] =
4957
of[F, S](uri, client, name, Headers.empty)
5058

5159
}

natchez/src/main/scala/clue/natchez/NatchezMiddleware.scala

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,10 @@ object http4s:
143143

144144
@scala.annotation.targetName("tracedWithFetchClient")
145145
def tracedWith(
146-
spanOptions: natchez.Span.Options,
147-
additionalAttributesF: (clue.model.GraphQLQuery, Option[io.circe.JsonObject]) => F[Seq[(String, natchez.TraceValue)]]
146+
spanOptions: natchez.Span.Options,
147+
additionalAttributesF: (clue.model.GraphQLQuery, Option[io.circe.JsonObject]) => F[
148+
Seq[(String, natchez.TraceValue)]
149+
]
148150
)(using
149151
cats.effect.MonadCancelThrow[F],
150152
natchez.Trace[F],
@@ -164,8 +166,10 @@ object http4s:
164166

165167
@scala.annotation.targetName("tracedWithStreamingClient")
166168
def tracedWith(
167-
spanOptions: natchez.Span.Options,
168-
additionalAttributesF: (clue.model.GraphQLQuery, Option[io.circe.JsonObject]) => F[Seq[(String, natchez.TraceValue)]]
169+
spanOptions: natchez.Span.Options,
170+
additionalAttributesF: (clue.model.GraphQLQuery, Option[io.circe.JsonObject]) => F[
171+
Seq[(String, natchez.TraceValue)]
172+
]
169173
)(using
170174
cats.effect.MonadCancelThrow[F],
171175
natchez.Trace[F],

otel4s/src/main/scala/clue/otel4s/Otel4sMiddleware.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,5 +224,4 @@ class Otel4sStreamingClient[F[_]: Tracer: MonadCancelThrow, S](
224224
(exitCase match
225225
case Resource.ExitCase.Errored(e) =>
226226
span.setStatus(StatusCode.Error, Option(e.getMessage).getOrElse(e.toString))
227-
case _ => Applicative[F].unit
228-
)
227+
case _ => Applicative[F].unit)

0 commit comments

Comments
 (0)