Skip to content

Commit

Permalink
Change scalafmt reporter to not use errors (#1088)
Browse files Browse the repository at this point in the history
  • Loading branch information
ghostdogpr authored Oct 14, 2021
1 parent d9ff4df commit 2839fd2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/src/main/scala/caliban/tools/Formatter.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package caliban.tools

import org.scalafmt.dynamic.ConsoleScalafmtReporter
import org.scalafmt.interfaces.Scalafmt
import zio.RIO
import zio.blocking.{ effectBlocking, Blocking }
Expand All @@ -24,7 +25,8 @@ object Formatter {
Scalafmt
.create(this.getClass.getClassLoader)
.withRespectVersion(false)
.withDefaultVersion("2.7.5") // For retro-compatibility
.withDefaultVersion("2.7.5") // For retro-compatibility
.withReporter(new ConsoleScalafmtReporter(System.out)) // defaults prints everything to System.err

val result = strs.map { case (name, code) => name -> scalafmt.format(config, Paths.get(s"$name.scala"), code) }
scalafmt.clear()
Expand Down

0 comments on commit 2839fd2

Please sign in to comment.