Skip to content

Commit

Permalink
chore: update scalafmt to 2.4.1 (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
Honza Strnad committed Feb 22, 2020
1 parent ce61901 commit b9b3137
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=2.3.2
version=2.4.1
8 changes: 2 additions & 6 deletions api/src/main/scala/slog4s/WhenEnabledLogBuilder.scala
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ trait WhenEnabledLogBuilder[F[_]] { self =>
): WhenEnabledLogBuilder[F] = {
new WhenEnabledLogBuilder[F] {
override def apply(f: LogBuilder[F] => F[Unit]): F[Unit] = {
self { logBuilder =>
f(logBuilder.withArg(key, value))
}
self { logBuilder => f(logBuilder.withArg(key, value)) }
}
}
}
Expand All @@ -72,9 +70,7 @@ trait WhenEnabledLogBuilder[F[_]] { self =>
new WhenEnabledLogBuilder[F] {
override def apply(f: LogBuilder[F] => F[Unit]): F[Unit] = {
self { logBuilder =>
fv.flatMap { value =>
f(logBuilder.withArg(key, value))
}
fv.flatMap { value => f(logBuilder.withArg(key, value)) }
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ private[console] class PlainFormatter[F[_]: Sync](
.append(" : ")
.append(msg)
printStream.println(builder.mkString)
throwable.foreach { value =>
value.printStackTrace(printStream)
}
throwable.foreach { value => value.printStackTrace(printStream) }
}

private def formattedLevel(level: Level): String = {
Expand Down
4 changes: 1 addition & 3 deletions monix/src/main/scala/slog4s/monix/UseMonixContext.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ object UseMonixContext {
new UseContext[Task, T] {

override def update[V](f: T => T)(fv: Task[V]): Task[V] = {
taskLocal.read.flatMap { old =>
taskLocal.bind(f(old))(fv)
}
taskLocal.read.flatMap { old => taskLocal.bind(f(old))(fv) }
}
}
}
22 changes: 14 additions & 8 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,24 @@ object Dependencies {
lazy val catsEffect = "org.typelevel" %% "cats-effect" % "2.1.1"
lazy val catsMtl = "org.typelevel" %% "cats-mtl-core" % "0.7.0"
lazy val circeCore = "io.circe" %% "circe-core" % "0.13.0"
lazy val circeLiteral = "io.circe" %% "circe-literal" % "0.13.0" // used for test only
lazy val circeParser = "io.circe" %% "circe-parser" % "0.13.0" // used for site only
lazy val circeLiteral =
"io.circe" %% "circe-literal" % "0.13.0" // used for test only
lazy val circeParser =
"io.circe" %% "circe-parser" % "0.13.0" // used for site only
lazy val diffx = "com.softwaremill.diffx" %% "diffx-scalatest" % "0.3.17"
lazy val logback = "ch.qos.logback" % "logback-classic" % "1.2.3"
lazy val logstash = "net.logstash.logback" % "logstash-logback-encoder" % "6.3"
lazy val kindProjector = "org.typelevel" %% "kind-projector" % "0.11.0" cross CrossVersion.full
lazy val logstash =
"net.logstash.logback" % "logstash-logback-encoder" % "6.3"
lazy val kindProjector =
"org.typelevel" %% "kind-projector" % "0.11.0" cross CrossVersion.full
lazy val magnolia = "com.propensive" %% "magnolia" % "0.12.6"
lazy val libmdoc = "org.scalameta" %% "mdoc" % "2.0.3" excludeAll (ExclusionRule(
organization = "org.slf4j"
))
lazy val libmdoc =
"org.scalameta" %% "mdoc" % "2.0.3" excludeAll (ExclusionRule(
organization = "org.slf4j"
))
lazy val monixDependency = "io.monix" %% "monix" % "3.1.0"
lazy val scalaCollectionCompat = "org.scala-lang.modules" %% "scala-collection-compat" % "2.1.4"
lazy val scalaCollectionCompat =
"org.scala-lang.modules" %% "scala-collection-compat" % "2.1.4"
lazy val scalaTest = "org.scalatest" %% "scalatest" % "3.1.1"
lazy val slf4jDepedency = "org.slf4j" % "slf4j-api" % "1.7.30"
lazy val sourcecode = "com.lihaoyi" %% "sourcecode" % "0.2.1"
Expand Down
4 changes: 1 addition & 3 deletions slf4j/src/test/scala/slog4s/slf4j/Slf4jLoggerTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ class Slf4jLoggerTest extends FixtureAnyFunSpec with Matchers with Inside {
it("implements whenEnabled correctly when level if on") { fixture =>
import fixture._
selectLevel(makeLogger())
.whenEnabled { builder =>
builder.log("test")
}
.whenEnabled { builder => builder.log("test") }
.unsafeRunSync()
val result = selectRaw(rawLogger)
result should matchTo(List(Message(locationMarker(), "test")))
Expand Down

0 comments on commit b9b3137

Please sign in to comment.