aboutsummaryrefslogtreecommitdiff
path: root/plugins/scalafmt/Scalafmt.scala
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/scalafmt/Scalafmt.scala')
-rw-r--r--plugins/scalafmt/Scalafmt.scala5
1 files changed, 3 insertions, 2 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")
}
}
}