From 8981e35d7eb7066ee8cb2a5777d4c83e1986696d Mon Sep 17 00:00:00 2001 From: rockjam Date: Mon, 19 Sep 2016 15:08:11 +0300 Subject: Upgrade scalafmt 0.2.5 -> 0.3.1 --- plugins/scalafmt/Scalafmt.scala | 5 +++-- plugins/scalafmt/build/build.scala | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/scalafmt/Scalafmt.scala b/plugins/scalafmt/Scalafmt.scala index 94670cb..a1c7a0d 100644 --- a/plugins/scalafmt/Scalafmt.scala +++ b/plugins/scalafmt/Scalafmt.scala @@ -1,5 +1,6 @@ package cbt +import org.scalafmt.Error.Incomplete import org.scalafmt.{FormatResult, ScalafmtStyle} import java.io.File @@ -41,10 +42,10 @@ object Scalafmt { write(path, formatted.getBytes) reformattedCount += 1 } + case FormatResult.Failure(e: Incomplete) => + System.err.println(s"Couldn't complete file reformat: $path") case FormatResult.Failure(e) => System.err.println(s"Failed to format file: $path, cause: ${e}") - case FormatResult.Incomplete(e) => - System.err.println(s"Couldn't complete file reformat: $path") } } } diff --git a/plugins/scalafmt/build/build.scala b/plugins/scalafmt/build/build.scala index e8ce270..0d4900c 100644 --- a/plugins/scalafmt/build/build.scala +++ b/plugins/scalafmt/build/build.scala @@ -4,6 +4,6 @@ class Build(val context: Context) extends Plugin { override def dependencies = super.dependencies ++ Resolver( mavenCentral ).bind( - ScalaDependency("com.geirsson", "scalafmt", "0.2.5") + ScalaDependency("com.geirsson", "scalafmt", "0.3.1") ) } -- cgit v1.2.3