Skip to content

Commit

Permalink
fix: show right number of errors in diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikaverpil committed May 22, 2024
1 parent 945f5a8 commit 8a11fcb
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lua/neotest-golang/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,7 @@ function M.Adapter.results(spec, result, tree)
local matched_line_number =
string.match(line.Output, test_filename .. ":(%d+)")

if matched_line_number == nil or panic_detected then
-- log the error without a line number
---@type neotest.Error
local error = { message = line.Output }
table.insert(errors, error)
else
if matched_line_number ~= nil then
-- attempt to parse the line number...
---@type number | nil
local line_number = tonumber(matched_line_number)
Expand Down

0 comments on commit 8a11fcb

Please sign in to comment.