pilat / vscode-coverage-highlighter

Reliable code coverage highlighting for VSCode
29 stars 13 forks source link

Unable to handle absolute paths in XML class's `filename` field #22

Open cassie-nahar opened 3 years ago

cassie-nahar commented 3 years ago

The Problems pane successfully shows messages that indicate the XML file was found, however toggling coverage display while viewing one of the source files produces no change.

Also relevant: The path listed by the file in the Problems pane is incorrect. In this particular example, it should show:

sample1.cpp /workspaces/ci-baseline/sample1/src

But instead it shows:

sample1.cpp build/workspaces/ci-baseline/sample1/src

My best guess is that the extension is expecting the XML filename values to contain relative paths. Mine has absolute paths.

cassie-nahar commented 3 years ago

I was able to confirm my suspicion regarding absolute/relative paths by manually modifying my XML file. I had to adjust <source> from /workspaces/ci-baseline/build to /workspaces/ci-baseline, and also adjust the <class filename="/workspaces/ci-baseline/sample1/src/sample1.cpp" to <class filename="sample1/src/sample1.cpp". After that, reloading the window showed the expected behavior.

This strongly indicates that this extension cannot handle absolute paths in the XML filename field.