nvim-lua/wishlist

Code coverage in editor

Open

#31 创建于 2021年9月21日

在 GitHub 查看
 (6 评论) (12 反应) (0 负责人) (0 fork)github user discovery
help wantedidea

仓库指标

Star
 (249 star)
PR 合并指标
 (PR 指标待抓取)

描述

What? Seeing which lines in currently opened buffer are covered by tests. Many IDEs provide that. Below are few examples:

Why? It helps tremendously during writing tests. Most coverage plugins allow exporting report as HTML, but it's tedious to navigate and switch context.

Potential existing implementations:

Potential pitfalls: In the simplest scenario, plugin should be able to show which lines are covered. Some coverage tools provide additional information, e.g. branch coverage, which is more difficult to present (I saw this reported with yellow background colour, and perhaps popup could be displayed with further details on CursorHold). As for visualization, I think plugin should at least allow choosing between highlighting whole lines and using signs. Perhaps virtual text could be also used as third method. There are few report types, from my own experience many tools know how to generate report in cobertura XML format.

贡献者指南