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

Allow manual coverage file(s) to be set in the extension settings #178

Closed ryanluker closed 5 years ago

ryanluker commented 5 years ago

Functionality:

Resources:

https://github.com/ryanluker/vscode-coverage-gutters/issues/161#issuecomment-429580159

Shelim commented 5 years ago

Proposition: either allow filename(s) to be specified directly, or allow specifying director(ies) to be searched for coverage files (ignoring all non-specified), by default set as "." (root of workspace);

ryanluker commented 5 years ago

@Shelim this is what the current extension setting does https://github.com/ryanluker/vscode-coverage-gutters/blob/master/package.json#L127-L135 when you add more file names it looks for these in each workspace you have open (vscode lets you have multiple workspaces open now).

This ticket would provide a simpler system where you give an array of absolute file paths that would be used instead of the current file search system.

Shelim commented 5 years ago

@ryanluker If you know (by specifing in settings) that projectA will have coverage under project/coverage and projectB (in the same workspace) will have it under additional/files/coverage, why do we need to spend time searching through dependencies/all/4gb/of/them?

ryanluker commented 5 years ago

@Shelim so the current system only knows what your coverage files are named not where they live in your project (in terms of absolute paths). That is why this new feature is allowing developers to set the exact absolute file path locations of their coverage files (this will avoid the searching through dependencies).

Currently you could add your dependencies folders to the ignoredPathGlobs https://github.com/ryanluker/vscode-coverage-gutters/blob/master/package.json#L122-L126 which would assist in removing some of the time searching would take.

Shelim commented 5 years ago

@ryanluker What is the separator if I want to use more then one ignored Path?

ryanluker commented 5 years ago

@Shelim these regex blobs can be tricky, what you want to do is add the folder names you want ignored like this

**/{node_modules,venv,vendor,dependencies,newfolderstoignore,etc}/**

if you dont use node, python or php you can remove the first three and have something similar to this

**/{dependencies,newfolderstoignore,etc}/**
Shelim commented 5 years ago

@ryanluker Thanks, I'll give it a try! :+1:

eduardor2k commented 5 years ago

Hi, I'm running phpunit inside a docker container, it would be nice if we could add a path matcher:

<coverage generated="1544025055">
  <project timestamp="1544025055">
    <package name="App\Core\Configuration">
      <file name="/var/www/src/myfile.php">

Docker -> Real path /var/www/ -> /home/myusername/project1/

PhpStorm imagen

ryanluker commented 5 years ago

@eduardor2k We can discuss this new feature in #201, I dont think that work will get done with this ticket.

ryanluker commented 5 years ago

@mulligandev this feature will be releasing in the 2.4.0 version. You can find the PR here #226. Thanks again for the original ticket / comment.