ryanluker / vscode-coverage-gutters

Display test coverage generated by lcov and xml - works with many languages
https://marketplace.visualstudio.com/items?itemName=ryanluker.vscode-coverage-gutters
MIT License
460 stars 88 forks source link

Links don't work in Preview Coverage Report #250

Closed geraintwhite closed 2 years ago

geraintwhite commented 4 years ago

Describe the bug None of the links to files work in the Preview Coverage Report

To Reproduce Steps to reproduce the behaviour:

  1. Run 'Preview Coverage Report' from command palette
  2. Click on one of the file links
  3. Nothing happens

Expected behaviour As when viewing the coverage report in the browser, clicking the link should display the coverage report for that file

Screenshots image

Desktop (please complete the following information):

ryanluker commented 4 years ago

@grit96 Thanks for submitting an issue! There is a bit of complexity here given the security Microsoft has put into the webview api for vscode extensions https://code.visualstudio.com/api/extension-guides/webview#loading-local-content . By default not many urls and resources are available to navigate between (I can see the expected errors when I open my debugger on a coverage report).

Screenshot from 2020-01-26 11-01-43

It is odd that the local workspace files are not exempt given that the docs say they are by default... Might be something to look into around anchor links that are generated by the coverage report tooling.

If someone wants to investigate this further, take a look at the WebviewOptions and start passing in something other then defaults to the webview panel create :thinking: https://github.com/ryanluker/vscode-coverage-gutters/blob/master/src/extension/gutters.ts#L58-L68

ryanluker commented 2 years ago

Fixed with https://github.com/ryanluker/vscode-coverage-gutters/pull/363 and will go out into the next release.