Skip to content

Commit

Permalink
refactor Doctor.getErrorReportSummary
Browse files Browse the repository at this point in the history
  • Loading branch information
kasiaMarek committed Oct 12, 2023
1 parent ceaabc5 commit 4745469
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -658,12 +658,10 @@ object Doctor {
text.replace(StdReportContext.WORKSPACE_STR, root.toString())
for {
lines <- Try(Files.readAllLines(file.toPath).asScala.toList).toOption
reversed = lines.reverse
index = reversed.indexWhere(_.startsWith(Report.summaryTitle))
index = lines.lastIndexWhere(_.startsWith(Report.summaryTitle))
if index >= 0
} yield reversed
.slice(0, index)
.reverse
} yield lines
.drop(index + 1)
.dropWhile(_ == "")
.map(decode)
.mkString("\n")
Expand Down

0 comments on commit 4745469

Please sign in to comment.