Skip to content

Commit

Permalink
Reformat with scalafmt 3.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
scala-steward committed Jan 6, 2022
1 parent afbd9c3 commit 8c5416d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/main/scala/com/lightbend/tools/ClocPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8c5416d

Please sign in to comment.