From 0ae572039932168ec5d09751e72e413f8433d692 Mon Sep 17 00:00:00 2001 From: scala-steward Date: Mon, 11 May 2026 00:33:01 +0000 Subject: [PATCH 1/3] Update scalafmt-core to 3.11.1 --- .scalafmt.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index a1984730ed..0f62a7ca51 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = 3.10.7 +version = 3.11.1 maxColumn = 140 runner.dialect = scala213source3 fileOverride { From 17d6746ee877b9c0e3f15602b6aed0dfa16e1691 Mon Sep 17 00:00:00 2001 From: scala-steward Date: Mon, 11 May 2026 00:33:19 +0000 Subject: [PATCH 2/3] Reformat with scalafmt 3.11.1 Executed command: scalafmt --non-interactive --- .../sttp4/ws/fs2/WebSocketToFs2Pipe.scala | 8 +++---- .../opentelemetry/OpenTelemetryMetrics.scala | 4 ++-- .../server/metrics/otel4s/Otel4sMetrics.scala | 4 ++-- .../metrics/otel4s/Otel4sMetricsTest.scala | 23 ++++++++----------- .../interpreter/ServerInterpreterTest.scala | 5 +++- .../tracing/otel4s/Otel4sTracingTest.scala | 2 +- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/client/sttp-client4/src/main/scalajvm/sttp/tapir/client/sttp4/ws/fs2/WebSocketToFs2Pipe.scala b/client/sttp-client4/src/main/scalajvm/sttp/tapir/client/sttp4/ws/fs2/WebSocketToFs2Pipe.scala index 80fc9f775c..b85da85c6f 100644 --- a/client/sttp-client4/src/main/scalajvm/sttp/tapir/client/sttp4/ws/fs2/WebSocketToFs2Pipe.scala +++ b/client/sttp-client4/src/main/scalajvm/sttp/tapir/client/sttp4/ws/fs2/WebSocketToFs2Pipe.scala @@ -91,10 +91,10 @@ class WebSocketToFs2Pipe[_F[_]: Concurrent, R <: Fs2Streams[_F] with WebSockets] } .collect { case (_, Right(d)) => d } .unNoneTerminate - // `unNoneTerminate` halts `receives` immediately when the server's Close frame produces a - // `None`. This is important because after returning the Close frame, `ws.receive()` arms - // an internal poison pill - the next call raises `WebSocketClosed`. Halting here cancels - // the upstream `Stream.repeatEval(ws.receive())` before it can make that follow-up call. + // `unNoneTerminate` halts `receives` immediately when the server's Close frame produces a + // `None`. This is important because after returning the Close frame, `ws.receive()` arms + // an internal poison pill - the next call raises `WebSocketClosed`. Halting here cancels + // the upstream `Stream.repeatEval(ws.receive())` before it can make that follow-up call. // `concurrently` (rather than `merge`) makes `sends` a side-effect of `receives`: when the // output stream from the server terminates (e.g. on Close), the `sends` background fiber is diff --git a/metrics/opentelemetry-metrics/src/main/scala/sttp/tapir/server/metrics/opentelemetry/OpenTelemetryMetrics.scala b/metrics/opentelemetry-metrics/src/main/scala/sttp/tapir/server/metrics/opentelemetry/OpenTelemetryMetrics.scala index c41ccea37d..2b1bdb4d18 100644 --- a/metrics/opentelemetry-metrics/src/main/scala/sttp/tapir/server/metrics/opentelemetry/OpenTelemetryMetrics.scala +++ b/metrics/opentelemetry-metrics/src/main/scala/sttp/tapir/server/metrics/opentelemetry/OpenTelemetryMetrics.scala @@ -18,8 +18,8 @@ case class OpenTelemetryMetrics[F[_]](meter: Meter, metrics: List[Metric[F, _]]) def addRequestsActive(labels: MetricLabels = OpenTelemetryAttributes): OpenTelemetryMetrics[F] = copy(metrics = metrics :+ requestActive(meter, labels)) - /** Registers a `http.server.request.total` counter (assuming default labels). Note: this metric is not part of the OpenTelemetry - * HTTP semantic conventions - the count is implicitly provided by the `http.server.request.duration` histogram. + /** Registers a `http.server.request.total` counter (assuming default labels). Note: this metric is not part of the OpenTelemetry HTTP + * semantic conventions - the count is implicitly provided by the `http.server.request.duration` histogram. */ def addRequestsTotal(labels: MetricLabels = OpenTelemetryAttributes): OpenTelemetryMetrics[F] = copy(metrics = metrics :+ requestTotal(meter, labels)) diff --git a/metrics/otel4s-metrics/src/main/scala/sttp/tapir/server/metrics/otel4s/Otel4sMetrics.scala b/metrics/otel4s-metrics/src/main/scala/sttp/tapir/server/metrics/otel4s/Otel4sMetrics.scala index ed91cbc27d..f0b67f10e0 100644 --- a/metrics/otel4s-metrics/src/main/scala/sttp/tapir/server/metrics/otel4s/Otel4sMetrics.scala +++ b/metrics/otel4s-metrics/src/main/scala/sttp/tapir/server/metrics/otel4s/Otel4sMetrics.scala @@ -40,7 +40,7 @@ object Otel4sMetrics { private type MetricLabels = MetricLabelsTyped[Attribute[_]] private val DurationBucketBoundaries = BucketBoundaries( - 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10 + 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10 ) /** Using the default labels, registers the following metrics: @@ -77,7 +77,7 @@ object Otel4sMetrics { forResponse = List( { case Right(r) => Some(HttpAttributes.HttpResponseStatusCode(r.code.code.toLong)) - case Left(_) => Some(HttpAttributes.HttpResponseStatusCode(500)) + case Left(_) => Some(HttpAttributes.HttpResponseStatusCode(500)) }, { case Right(_) => None diff --git a/metrics/otel4s-metrics/src/test/scala/sttp/tapir/server/metrics/otel4s/Otel4sMetricsTest.scala b/metrics/otel4s-metrics/src/test/scala/sttp/tapir/server/metrics/otel4s/Otel4sMetricsTest.scala index 4083f1386d..24598d3c0b 100644 --- a/metrics/otel4s-metrics/src/test/scala/sttp/tapir/server/metrics/otel4s/Otel4sMetricsTest.scala +++ b/metrics/otel4s-metrics/src/test/scala/sttp/tapir/server/metrics/otel4s/Otel4sMetricsTest.scala @@ -277,26 +277,23 @@ class Otel4sMetricsTest extends AsyncFlatSpec with Matchers { .description(HttpMetrics.ServerRequestDuration.description) if (isFailure) { - base - .pointCount(1) - .containsPoints( - PointExpectation - .histogram - .count(expectedCount.toLong) - .attributesSubset((baseResponseAttributes(expectedStatusCode) ++ failureAttributes(isFailure)): _*) - ) + base + .pointCount(1) + .containsPoints( + PointExpectation.histogram + .count(expectedCount.toLong) + .attributesSubset((baseResponseAttributes(expectedStatusCode) ++ failureAttributes(isFailure)): _*) + ) } else { base .pointCount(2) .containsPoints( - PointExpectation - .histogram + PointExpectation.histogram .count(expectedCount.toLong) .attributesSubset((baseResponseAttributes(expectedStatusCode) ++ phaseAttribute("headers")): _*) ) .containsPoints( - PointExpectation - .histogram + PointExpectation.histogram .count(expectedCount.toLong) .attributesSubset((baseResponseAttributes(expectedStatusCode) ++ phaseAttribute("body")): _*) ) @@ -347,7 +344,7 @@ class Otel4sMetricsTest extends AsyncFlatSpec with Matchers { private def assertMetrics(metrics: List[io.opentelemetry.sdk.metrics.data.MetricData], expectations: List[MetricExpectation]): Assertion = MetricExpectations.checkAll(metrics, expectations) match { - case Right(_) => succeed + case Right(_) => succeed case Left(mismatches) => fail(MetricExpectations.format(mismatches)) } diff --git a/server/core/src/test/scala/sttp/tapir/server/interpreter/ServerInterpreterTest.scala b/server/core/src/test/scala/sttp/tapir/server/interpreter/ServerInterpreterTest.scala index a219ac1702..35d55d858d 100644 --- a/server/core/src/test/scala/sttp/tapir/server/interpreter/ServerInterpreterTest.scala +++ b/server/core/src/test/scala/sttp/tapir/server/interpreter/ServerInterpreterTest.scala @@ -73,7 +73,10 @@ class ServerInterpreterTest extends AnyFlatSpec with Matchers { // due to Scala 3.8 compatibility (the implicit can no longer be applied as a regular argument) .securityIn(queryAnyFormat[StringWrapper, TextPlain]("x", Codec.listHead(addToTrailCodec("x")))) .in(queryAnyFormat[StringWrapper, TextPlain]("y", Codec.listHead(addToTrailCodec("y")))) - .in(EndpointIO.Body(RawBodyType.StringBody(java.nio.charset.StandardCharsets.UTF_8), addToTrailCodec("z"), EndpointIO.Info.empty)) + .in( + EndpointIO + .Body(RawBodyType.StringBody(java.nio.charset.StandardCharsets.UTF_8), addToTrailCodec("z"), EndpointIO.Info.empty) + ) .serverSecurityLogic[Unit, Identity](_ => Left(())) .serverLogic(_ => _ => Right(())) ), diff --git a/tracing/otel4s-tracing/src/test/scala/sttp/tapir/server/tracing/otel4s/Otel4sTracingTest.scala b/tracing/otel4s-tracing/src/test/scala/sttp/tapir/server/tracing/otel4s/Otel4sTracingTest.scala index c516c6b88a..002deb3cc7 100644 --- a/tracing/otel4s-tracing/src/test/scala/sttp/tapir/server/tracing/otel4s/Otel4sTracingTest.scala +++ b/tracing/otel4s-tracing/src/test/scala/sttp/tapir/server/tracing/otel4s/Otel4sTracingTest.scala @@ -143,7 +143,7 @@ class Otel4sTracingTest extends AsyncFlatSpec with Matchers { private def assertTrace(spans: List[SpanData], expectation: TraceForestExpectation): Assertion = TraceExpectations.check(spans, expectation) match { - case Right(_) => succeed + case Right(_) => succeed case Left(mismatches) => fail(TraceExpectations.format(mismatches)) } From 1dbe107620f427601da24b785d9c2ce50f965451 Mon Sep 17 00:00:00 2001 From: scala-steward Date: Mon, 11 May 2026 00:33:19 +0000 Subject: [PATCH 3/3] Add 'Reformat with scalafmt 3.11.1' to .git-blame-ignore-revs --- .git-blame-ignore-revs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 236f54522c..c5b67f25ad 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -81,3 +81,6 @@ da85b978db204adf6f236bfd4e453628a6d4cdda # Scala Steward: Reformat with scalafmt 3.10.7 32ddff2605807a89e66272507b85230c3d3adfa1 + +# Scala Steward: Reformat with scalafmt 3.11.1 +17d6746ee877b9c0e3f15602b6aed0dfa16e1691