From 8c5416dffb898010054ac11a9b0f90c4cd2a1425 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 6 Jan 2022 18:56:50 +0100 Subject: [PATCH] Reformat with scalafmt 3.2.2 --- .../scala/com/lightbend/tools/ClocPlugin.scala | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/scala/com/lightbend/tools/ClocPlugin.scala b/src/main/scala/com/lightbend/tools/ClocPlugin.scala index 684b17a..934a35b 100644 --- a/src/main/scala/com/lightbend/tools/ClocPlugin.scala +++ b/src/main/scala/com/lightbend/tools/ClocPlugin.scala @@ -45,13 +45,13 @@ object ClocRunner { val command = Seq("cloc", "--progress-rate=0", "--quiet", "--csv") def countLines(files: Iterable[File]): Int = try sys.process.Process(command ++ files.map(_.toString)) - .!! - // JDK 11: work around https://github.com/scala/bug/issues/11125 - // without incurring a deprecation warning. was: .lines - .linesWithSeparators.map(_.stripLineEnd) - .map(_.split(',')) - .collectFirst { case Array(_, "Scala", _, _, n) => n.toInt } - .getOrElse(0) + .!! + // JDK 11: work around https://github.com/scala/bug/issues/11125 + // without incurring a deprecation warning. was: .lines + .linesWithSeparators.map(_.stripLineEnd) + .map(_.split(',')) + .collectFirst { case Array(_, "Scala", _, _, n) => n.toInt } + .getOrElse(0) catch { case e: java.io.IOException => Console.err.println(e.getMessage)