Skip to content

Commit

Permalink
Merge pull request #621 from ckipp01/doctor-v5
Browse files Browse the repository at this point in the history
feat: account for v5 of the Doctor
  • Loading branch information
ckipp01 authored Oct 25, 2023
2 parents dfcb4f5 + 4060521 commit 6692a65
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions lua/metals/doctor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,26 @@ Doctor.create = function(args)
end

handle_explanations()

if doctor_version >= 5 then
if not vim.tbl_isempty(folder.errorReports) then
table.insert(output, "")
table.insert(output, "## Error Reports")
for _, report in ipairs(folder.errorReports) do
table.insert(output, "")
table.insert(output, string.format("### %s", report.name))
table.insert(output, string.format("- timestamp: %s", report.timestamp))
table.insert(output, string.format("- uri: %s", report.uri))
if report.buildTarget then
table.insert(output, string.format("- target: %s", report.buildTarget))
end
table.insert(output, string.format("- error type: %s", report.errorReportType))
table.insert(output, "")
table.insert(output, "#### Summary")
table.insert(output, report.shortSummary)
end
end
end
end
elseif doctor_version > 0 then
table.insert(output, "## Build Targets")
Expand Down

0 comments on commit 6692a65

Please sign in to comment.