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 source file path match/equivalences in the coverage object #201

Closed eduardor2k closed 5 years ago

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:

Docker -> Real path /var/www/ -> /home/myusername/project1/ PhpStorm ![imagen](https://user-images.githubusercontent.com/318278/49788876-cd52a780-fd2a-11e8-8529-c967865d494b.png) _Originally posted by @eduardor2k in https://github.com/ryanluker/vscode-coverage-gutters/issues/178#issuecomment-446121779_ ## Info - update https://github.com/ryanluker/vscode-coverage-gutters/blob/master/src/coverage-system/sectionFinder.ts#L55 to check the file path for the match to possibly swap. - this is important to do before trying to find the section as it wont succeed if the build image paths are not the same as the system ones.
ryanluker commented 5 years ago

@eduardor2k thanks for submitting an issue. This should be doable and it can simply be a step in the coverage cache flow where it checks the source file for the specified path (/var/www) and swaps it with whatever the developer defined. I have added this issue to the 2.4.0 release!

ryanluker commented 5 years ago

@eduardor2k This will go out in the 2.4.0 release which will hopefully happen in ~1-2 weeks