nvim-lua/wishlist

Code coverage in editor

Open

#31 aberto em 21 de set. de 2021

Ver no GitHub
 (6 comments) (12 reactions) (0 assignees) (0 forks)github user discovery
help wantedidea

Métricas do repositório

Stars
 (249 stars)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

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.

Guia do colaborador