Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update scalafmt-core to 3.3.0 in series/1.x #567

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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