vscode-coverage-gutters icon indicating copy to clipboard operation
vscode-coverage-gutters copied to clipboard

Go to next uncovered line

Open Gerrit0 opened this issue 8 months ago • 3 comments

Is your feature request related to a problem? Please describe.

When reviewing coverage in a file and finishing writing tests for a block, it would be useful to be able to quickly go to the next uncovered section.

Describe the solution you'd like

Add two new commands - one to go to the next branch-uncovered line, and one to go to the next fully uncovered line.

Describe alternatives you've considered

Currently I open lcov's generated HTML report alongside vscode and use the shortcuts there

Image

Gerrit0 avatar Jun 04 '25 03:06 Gerrit0

@Gerrit0 Thanks for the feature suggestion! This seems like a nice addition to the extension, a couple questions for yeah.

  1. Do you see the commands being purely keyboard shortcut based or could there be GUI elements of some sort? (Maybe inline buttons kinda like git lense)

  2. Should the commands take the current cursor position into account when figuring out the next uncovered line / next uncovered branch? If it doesn't, then I guess the command is just iterating through the coverage lines for the current active editor file 🤔.

Some code areas that would be important for when we work on this:

  • Adding new commands to the extension
    • https://github.com/ryanluker/vscode-coverage-gutters/blob/master/src/extension.ts#L39
  • Adding new functionality to the coverage service to extract the next line or branch within the a specific file (and optionally the line number).
    • Currently, we only interact with the coverage info / cache once when we want to render something to the IDE.
    • https://github.com/ryanluker/vscode-coverage-gutters/blob/master/src/coverage-system/coverageservice.ts#L126

ryanluker avatar Jul 13 '25 16:07 ryanluker

  1. I think the buttons would be a nice touch -- I'm unlikely to use them, but if they are there it would make the commands more discoverable for other users; which is important!
  2. Cursor position absolutely should be taken into account! I'm imagining this working like VSCode's prev/next error shortcut.

Gerrit0 avatar Jul 13 '25 16:07 Gerrit0

  1. I think the buttons would be a nice touch -- I'm unlikely to use them, but if they are there it would make the commands more discoverable for other users; which is important!

    1. Cursor position absolutely should be taken into account! I'm imagining this working like VSCode's prev/next error shortcut.

Excellent, thanks for the other infos, and hopefully we will work on this shortly in the future 👍🏻.

ryanluker avatar Jul 13 '25 16:07 ryanluker