Skip to content

Commit

Permalink
Merge pull request #567 from scala-steward/update/series/1.x/scalafmt…
Browse files Browse the repository at this point in the history
…-core-3.3.0

Update scalafmt-core to 3.3.0 in series/1.x
  • Loading branch information
danicheg authored Dec 30, 2021
2 parents 37d6cea + 3cc1e8a commit 641aef3
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 16 deletions.
6 changes: 4 additions & 2 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# tune this file as appropriate to your style! see:
# https://scalameta.org/scalafmt/docs/configuration.html

version = 2.7.5
version = 3.3.0

maxColumn = 100

Expand All @@ -20,9 +20,11 @@ align {
tokens = ["%", "%%"]
}

docstrings = JavaDoc
docstrings.style = Asterisk

rewrite {
rules = [SortImports, RedundantBraces]
redundantBraces.maxLines = 1
}

runner.dialect = "scala213source3"
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ import org.typelevel.log4cats._
import cats._

/**
* Allows for mapK or algebraic higher kinded
* transformations
* Allows for mapK or algebraic higher kinded transformations
*/
object Translate {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ import cats.syntax.all._
import org.typelevel.log4cats._

/**
* >>> WARNING READ BEFORE USAGE! <<<
* This logger will NOT log anything if `F` fails!
* >>> WARNING READ BEFORE USAGE! <<< This logger will NOT log anything if `F` fails!
*
* Running the `WriterT` instance will yield a value of type `F[(G[LogMessage], A)]`.
* As a result, the logged messages can be materialized if and only `F` succeeds.
* Running the `WriterT` instance will yield a value of type `F[(G[LogMessage], A)]`. As a result,
* the logged messages can be materialized if and only `F` succeeds.
*/
object WriterTLogger {
def apply[F[_]: Applicative, G[_]: Alternative](
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ import scala.reflect.macros.blackbox
/**
* Macros that support the logging system.
*
* See for handling call-by-name-parameters in macros
* https://issues.scala-lang.org/browse/SI-5778
* See for handling call-by-name-parameters in macros https://issues.scala-lang.org/browse/SI-5778
*
* @author Sarah Gerweck <sarah@atscale.com>
* @author
* Sarah Gerweck <sarah@atscale.com>
*/
private[slf4j] class GetLoggerMacros(val c: blackbox.Context) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ private[slf4j] object Slf4jLoggerInternal {
} MDC.put(k, v)

try logging()
finally if (backup eq null) MDC.clear()
else MDC.setContextMap(backup)
finally
if (backup eq null) MDC.clear()
else MDC.setContextMap(backup)
}

isEnabled.ifM(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ class Slf4jLoggerInternalSuite extends CatsEffectSuite {

import dirtyStuff._

//logging happens here
// logging happens here
val loggerThread = namedSingleThreadExecutionContext("my-thread-1")

//restoring context would run here if IO.bracket was used
// restoring context would run here if IO.bracket was used
val finalizerThread = namedSingleThreadExecutionContext("my-thread-2")

val mainThread = namedSingleThreadExecutionContext("main-thread")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package org.typelevel.log4cats.testing

import org.typelevel.log4cats.{SelfAwareLogger}
import org.typelevel.log4cats.SelfAwareLogger
import cats.effect.Sync
import cats.implicits._
import java.util.concurrent.atomic.AtomicReference
Expand Down

0 comments on commit 641aef3

Please sign in to comment.