vscode-coverage-gutters icon indicating copy to clipboard operation
vscode-coverage-gutters copied to clipboard

Look-up for coverage files is broken likely to broken globbing logic

Open ssbarnea opened this issue 9 months ago • 3 comments

Describe the bug

Listening to file system at {/Users/ssbarnea/code/a/ansible-lint,/Users/ssbarnea/code/a/vscode-ansible}/**/{cov.xml,coverage.xml,coverage.lcov,jacoco.xml,lcov.info}
[1742735708465][coverageservice]: RENDERING
[1742735708465][coverageservice]: READY
[1742735748342][coverageservice]: LOADING
[1742735753212][coverageservice]: RENDERING
[1742735753212][coverageservice]: READY
[1742735753217][coverageservice]: RENDERING
[1742735753217][coverageservice]: READY
[1742735756023][coverageservice]: Loading 0 file(s)
❯ \ls -1 /Users/ssbarnea/code/a/ansible-lint/.tox/py/{cov.xml,coverage.xml,coverage.lcov,jacoco.xml,lcov.info} 2>/dev/null
> \ls -1  2> /dev/null
/Users/ssbarnea/code/a/ansible-lint/.tox/py/coverage.xml

As you can see, there is a coverage.xml file present but the globing performed by the extension fails to find it.

ssbarnea avatar Mar 23 '25 13:03 ssbarnea

@ssbarnea Thanks for the ticket! Is the coverage file in question in the workspace of the open project? I believe the VSCode extension api disallows file loading from outside the active workspace (afaik).

            glob(`${this.configStore.coverageBaseDir}/${fileName}`,
                {
                    cwd: workspaceFolder.uri.fsPath,
                    dot: true,
                    ignore: this.configStore.ignoredPathGlobs,
                    realpath: true,
                    strict: false,
                },
            );

ryanluker avatar Apr 05 '25 18:04 ryanluker

I think https://github.com/ryanluker/vscode-coverage-gutters/issues/418#issuecomment-1649153739 applies here too.

mattseddon avatar Aug 01 '25 06:08 mattseddon

I think #418 (comment) applies here too.

Yeah that makes sense to me as well.

ryanluker avatar Aug 10 '25 20:08 ryanluker