nvim-lua/wishlist

Code coverage in editor

Open

#31 aperta il 21 set 2021

Vedi su GitHub
 (6 commenti) (12 reazioni) (0 assegnatari) (0 fork)github user discovery
help wantedidea

Metriche repository

Star
 (249 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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.

Guida contributor