Métriques du dépôt
- Stars
- (249 stars)
- Métriques de merge PR
- (Métriques PR en attente)
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:
- https://github.com/ruanyl/coverage.vim
- https://github.com/mgedmin/coverage-highlight.vim
- https://github.com/google/vim-coverage
- https://github.com/alepez/vim-llvmcov
- https://github.com/dsych/blanket.nvim (written in Lua, JaCoCo only)
- https://github.com/rafaelsq/nvim-goc.lua (written in Lua, Go only)
- https://github.com/deepdivr/solargraph_test_coverage (written in Ruby as LS plugin)
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.