Skip to content

Commit

Permalink
fix: do not show warning when no problems were found
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikaverpil committed Jun 24, 2024
1 parent ffba575 commit 95bb7cb
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions lua/neotest-golang/results_dir.lua
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,13 @@ function M.show_warnings(d)
table.insert(position_ids, pos_id)
end
end
vim.notify(
"Test(s) not associated (not found/executed):\n"
.. table.concat(position_ids, "\n"),
vim.log.levels.DEBUG
)
if #position_ids > 0 then
vim.notify(
"Test(s) not associated (not found/executed):\n"
.. table.concat(position_ids, "\n"),
vim.log.levels.DEBUG
)
end
end

if options.get().warn_test_name_dupes == true then
Expand All @@ -298,10 +300,12 @@ function M.show_warnings(d)
)
end
end
vim.notify(
"Duplicate test name(s) detected:\n" .. table.concat(test_dupes, "\n"),
vim.log.levels.WARN
)
if #test_dupes > 0 then
vim.notify(
"Duplicate test name(s) detected:\n" .. table.concat(test_dupes, "\n"),
vim.log.levels.WARN
)
end
end
end

Expand Down

0 comments on commit 95bb7cb

Please sign in to comment.