Skip to content

Commit 4e151a5

Browse files
committed
Scalafmt
1 parent 2575359 commit 4e151a5

6 files changed

Lines changed: 49 additions & 37 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
strategy:
2929
matrix:
3030
os: [ubuntu-22.04]
31-
scala: [3]
31+
scala: [3.8.3]
3232
java: [temurin@17]
3333
project: [rootJS, rootJVM]
3434
runs-on: ${{ matrix.os }}
@@ -90,7 +90,7 @@ jobs:
9090
publish:
9191
name: Publish Artifacts
9292
needs: [build]
93-
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master')
93+
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v'))
9494
strategy:
9595
matrix:
9696
os: [ubuntu-22.04]

.mergify.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ pull_request_rules:
1313
- body~=labels:.*early-semver-patch
1414
- body~=labels:.*early-semver-minor
1515
- 'title=flake.lock: Update'
16-
- status-success=Test (ubuntu-22.04, 3, temurin@17, rootJS)
17-
- status-success=Test (ubuntu-22.04, 3, temurin@17, rootJVM)
16+
- status-success=Test (ubuntu-22.04, 3.8.3, temurin@17, rootJS)
17+
- status-success=Test (ubuntu-22.04, 3.8.3, temurin@17, rootJVM)
1818
actions:
1919
merge: {}
2020
- name: Label core PRs

build.sbt

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
lazy val V = _root_.scalafix.sbt.BuildInfo
22

3-
ThisBuild / tlBaseVersion := "0.51"
4-
ThisBuild / tlCiReleaseBranches := Seq("master")
5-
ThisBuild / tlJdkRelease := Some(17)
6-
ThisBuild / githubWorkflowJavaVersions := Seq("17").map(JavaSpec.temurin(_))
7-
ThisBuild / scalaVersion := "3.8.3"
8-
Global / onChangedBuildSource := ReloadOnSourceChanges
3+
ThisBuild / tlBaseVersion := "0.51"
4+
ThisBuild / tlJdkRelease := Some(17)
5+
ThisBuild / githubWorkflowJavaVersions := Seq("17").map(JavaSpec.temurin(_))
6+
ThisBuild / scalaVersion := "3.8.3"
7+
ThisBuild / crossScalaVersions := Seq("3.8.3")
8+
ThisBuild / githubWorkflowScalaVersions := Seq("3.8.3")
9+
Global / onChangedBuildSource := ReloadOnSourceChanges
910

1011
lazy val root = tlCrossRootProject
1112
.aggregate(
@@ -31,7 +32,7 @@ lazy val model =
3132
.crossType(CrossType.Pure)
3233
.in(file("model"))
3334
.settings(
34-
moduleName := "clue-model",
35+
moduleName := "clue-model",
3536
libraryDependencies ++=
3637
Settings.Libraries.Cats.value ++
3738
Settings.Libraries.CatsTestkit.value ++
@@ -43,7 +44,7 @@ lazy val model =
4344
Settings.Libraries.Monocle.value ++
4445
Settings.Libraries.MonocleLaw.value ++
4546
Settings.Libraries.MUnit.value,
46-
Test / classLoaderLayeringStrategy := ClassLoaderLayeringStrategy.Flat // Needed for circe's codec tests
47+
Test / classLoaderLayeringStrategy := ClassLoaderLayeringStrategy.Flat // Needed for circe's codec tests
4748
)
4849

4950
lazy val core =
@@ -52,9 +53,9 @@ lazy val core =
5253
.in(file("core"))
5354
.enablePlugins(BuildInfoPlugin)
5455
.settings(
55-
moduleName := "clue-core",
56-
buildInfoPackage := "clue",
57-
buildInfoKeys := Seq[BuildInfoKey](name, version),
56+
moduleName := "clue-core",
57+
buildInfoPackage := "clue",
58+
buildInfoKeys := Seq[BuildInfoKey](name, version),
5859
libraryDependencies ++=
5960
Settings.Libraries.Cats.value ++
6061
Settings.Libraries.CatsEffect.value ++
@@ -71,8 +72,8 @@ lazy val scalaJS =
7172
.in(file("scalajs"))
7273
.enablePlugins(ScalaJSPlugin)
7374
.settings(
74-
moduleName := "clue-scalajs",
75-
coverageEnabled := false,
75+
moduleName := "clue-scalajs",
76+
coverageEnabled := false,
7677
libraryDependencies ++=
7778
Settings.Libraries.ScalaJsDom.value ++
7879
Settings.Libraries.ScalaJsMacrotaskExecutor.value
@@ -84,7 +85,7 @@ lazy val http4s =
8485
.crossType(CrossType.Pure)
8586
.in(file("http4s"))
8687
.settings(
87-
moduleName := "clue-http4s",
88+
moduleName := "clue-http4s",
8889
libraryDependencies ++=
8990
Settings.Libraries.Http4sCirce.value ++
9091
Settings.Libraries.Http4sClient.value ++
@@ -197,23 +198,23 @@ lazy val sbtPlugin =
197198
.in(file("sbt-plugin"))
198199
.enablePlugins(SbtPlugin, BuildInfoPlugin)
199200
.settings(
200-
moduleName := "sbt-clue",
201-
crossScalaVersions := List("2.12.20"),
202-
scalacOptions := Nil,
201+
moduleName := "sbt-clue",
202+
crossScalaVersions := List("2.12.20"),
203+
scalacOptions := Nil,
203204
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % V.scalafixVersion),
204205
addSbtPlugin("org.portable-scala" % "sbt-platform-deps" % "1.0.2"),
205206
addSbtPlugin("org.portable-scala" % "sbt-crossproject" % "1.3.2"),
206-
buildInfoPackage := "clue.sbt",
207-
buildInfoKeys := Seq[BuildInfoKey](
207+
buildInfoPackage := "clue.sbt",
208+
buildInfoKeys := Seq[BuildInfoKey](
208209
version,
209210
organization,
210211
"rulesModule" -> (genRules / moduleName).value,
211212
"coreModule" -> (core.jvm / moduleName).value
212213
),
213214
buildInfoOptions += BuildInfoOption.PackagePrivate,
214-
Test / test :=
215+
Test / test :=
215216
scripted.toTask("").value,
216-
scripted := scripted
217+
scripted := scripted
217218
.dependsOn(
218219
genRules / publishLocal,
219220
model.jvm / publishLocal,
@@ -225,5 +226,5 @@ lazy val sbtPlugin =
225226
"-Dplugin.version=" + version.value,
226227
"-Dscala.version=" + (core.jvm / scalaVersion).value
227228
),
228-
scriptedBufferLog := false,
229+
scriptedBufferLog := false
229230
)

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)