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

Correctly shows coverage only for the first file in a PHP project #157

Closed VVatashi closed 6 years ago

VVatashi commented 6 years ago

Hello, I have tried this extension to show the line coverage in my project. It looks like it works for the first PHP file in the project. But when I select any other file, unfortunately, it seems that it continues to show the coverage of the first file. I have generated a code coverage file with the PHPUnit with the coverage-clover option.

The coverage-gutters log looks like:

[1533358148956][coverageservice]: INITIALIZING
[1533358162996][coverageservice]: LOADING
[1533358163012][coverageservice]: Loading 1 file(s)
[1533358163052][coverageservice]: Caching 3 coverage(s)
[1533358163052][coverageservice]: READY
[1533358163052][coverageservice]: RENDERING
[1533358163053][renderer][section file path]: <path to the first file in the project>
[1533358163053][coverageservice]: READY
[1533358170943][coverageservice]: RENDERING
[1533358170944][coverageservice]: READY
[1533358170998][coverageservice]: RENDERING
[1533358170998][renderer][section file path]: <path to the first file in the project>
[1533358171053][coverageservice]: READY
[1533358192472][coverageservice]: RENDERING
[1533358192472][coverageservice]: READY
[1533358192520][coverageservice]: RENDERING
[1533358192520][renderer][section file path]: <path to the first file in the project>
...
ryanluker commented 6 years ago

@VVatashi thanks for submitting an issue. I was not able to reproduce this locally :thinking: . I added some more files to the example project and then all rendered different coverages fine. screenshot from 2018-08-04 14-56-55 Are you using a workspace with vscode or just opening a folder?

VVatashi commented 6 years ago

With my project, both as a folder and as a workspace, it seems that it not works properly. But now I have cloned example project, added more classes and tests, and it works. So, maybe something is wrong with my project... I will try to figure out what is difference.

VVatashi commented 6 years ago

I realized that it stops working correctly when the top-level directory of the project is not named in the lower case.

ryanluker commented 6 years ago

@VVatashi this sounds related to #155 once the bugfix release (2.1.1) is out you should try again 😄

ryanluker commented 6 years ago

@VVatashi 2.1.1 has been released, going to close this ticket but we can reopen it if you found the issue isnt gone.