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

Gutters do not render, no error in logs #188

Closed erlloyd closed 5 years ago

erlloyd commented 5 years ago

Describe the bug Gutters do not render

To Reproduce Steps to reproduce the behaviour:

  1. I run coverage report
  2. Confirm lcov.info is present
  3. In VSCode, I try 'Display Coverage' and 'Watch' Expected behaviour The coverage is shown in the gutters

Screenshots screenshot 2018-11-13 15 20 18

Desktop (please complete the following information):

Additional context This has been happening for me over the past several versions

I've tried messing with the settings to show highlighting in the gutter, show highlighting on the line, etc

When I look at the output logs I see the following: `[1542143814324][coverageservice]: LOADING [1542143815384][coverageservice]: Loading 1 file(s) [1542143815388][coverageservice]: Caching 37 coverage(s)

I just never see anything show up in the editor.

erlloyd commented 5 years ago

Just an update with additional information, I've tried disabling all other extensions and have the same result.

erlloyd commented 5 years ago

I've also reproduced this on multiple machines, so it is not specific to a single machine's configuration

cooldome commented 5 years ago

Check that you have absolute file paths in the lcov.info file

ryanluker commented 5 years ago

@erlloyd thanks for submitting an issue. As @cooldome mentioned the extension does perform better if you have the coverage as absolutes but the extension will try to take relative and create absolute from that as well. Can you install the in development 2.3.0 version below and run the display / watch command and paste the results (it should display the cached coverage so that we can better debug your issue)?

vscode-coverage-gutters-2.3.0.zip

ryanluker commented 5 years ago

@erlloyd going to close this ticket for now but if you can reproduce the issue with the pre-release above I would be happy to open it again.

giovanicascaes commented 5 years ago

Hello.

I'm having the same issue as described above. The paths on lcov.info are already absolute. I'm using the latest version of the extension's (2.4.0). If needed I'll be glad to provide more info as much as I can.

Peppie84 commented 4 years ago

@ryanluker i can reproduce this issue, it just happened to me. The version i use is: v2.4.1. If i add a workspace-name the coverage will never be displayed.

My workspace settings file:

{
    "folders": [{
        "name": "Workspace1",
        "path": "C:\\My\\Abs\\Path\\To\\The\\Project"
    }],
    "settings": {
        "files.exclude": {
            "**/node_modules": true
        },
        "coverage-gutters.coverageFileNames": [
            "cov_phpunit.xml"
        ]
    }
}

I have debugged the code and the foundSection variable in sectionfinder.js::findSectionForEditor() is false. Maybe you can optimize the variable workspaceFolder.name on sectionfinder.js::calculateEditorData()

Peppie84 commented 4 years ago

@ryanluker fyi: The new version: v2.4.2 does not fix that issue.