Comments (5)
Actually, I solved the problem! The thing is that the path parsing will be done on a Unix path in a Windows system.
By changing the value
"coverage-gutters.remotePathResolve": ["/opt/local", "c:/Users/myusername/projects/myprojectname"]
to
"coverage-gutters.remotePathResolve": ["\\opt\\local", "."]
the problem disappeared (the second value "."
does not matter so much, but I prefer relative paths for the local dev system as they are more stable).
To close this issue, I'd like to write a bit of documentation for the remotePathResolve
setting. Would you accept a PR, and if so, where should I put the documentation?
from vscode-coverage-gutters.
@denisrossetre Thanks for the ticket! Are you able to grab more logs from the extension output log area?
In terms of extra logging, check out this area, and you could maybe remove the .size
to print the whole cache and that would assist us in figuring out what is inside (this should really be an extension setting to enable "verbose" logging mode but sadly haven't got to that yet 😓).
vscode-coverage-gutters/src/coverage-system/coverageservice.ts
Lines 101 to 105 in c15ac1a
from vscode-coverage-gutters.
Actually, I solved the problem! The thing is that the path parsing will be done on a Unix path in a Windows system.
By changing the value
"coverage-gutters.remotePathResolve": ["/opt/local", "c:/Users/myusername/projects/myprojectname"]
to"coverage-gutters.remotePathResolve": ["\\opt\\local", "."]
the problem disappeared (the second value"."
does not matter so much, but I prefer relative paths for the local dev system as they are more stable.To close this issue, I'd like to write a bit of documentation for the
remotePathResolve
setting. Would you accept a PR, and if so, where should I put the documentation?
I am glad you got it figured out 👍🏻 !
More documentation is always welcome, so PR will definitely be accepted, thanks.
I think the tips and tricks section would be a good fit? It gets great SEO from being on the front page + in the marketplace.
https://marketplace.visualstudio.com/items?itemName=ryanluker.vscode-coverage-gutters
https://github.com/ryanluker/vscode-coverage-gutters#tips-and-tricks
from vscode-coverage-gutters.
@denisrossetre I'm encountering the same issue that you were -- I'm using Windows 10, and I have a docker container running Linux, but coverage gutters isn't showing the code coverage in VSC.
I tried using your fix, here is my settings.json
"coverage-gutters.coverageFileNames": [
"coverage.xml",
"lcov.info",
"cov.xml",
"jacoco.xml"
],
"coverage-gutters.remotePathResolve": [
[
"\\home\\dev\\Mxxxx",
"."
]
]
The /home/dev/M...
path is what I'm using in the container.
In the CG log I see this:
[1698181260483][coverageservice]: c:\Users\Exxxxxxxx\gitlab\Mxxxx\coverage.xml
[1698181260483][coverageservice]: Loaded 1 data file(s)
[1698181260488][coverageservice]: Caching 6 coverage(s)
[1698181260488][coverageservice]: READY
[1698181260488][coverageservice]: RENDERING
[1698181260488][coverageservice]: READY
so I know that it's picking up my coverage file, but there's just still no visual indication on the file, and the bottom bar still shows "No coverage".
Did you end up having to do anything else other than changing this setting, to fix the issue? I'm running Coverage Gutters v2.11.0
from vscode-coverage-gutters.
@denisrossetre I'm encountering the same issue that you were -- I'm using Windows 10, and I have a docker container running Linux, but coverage gutters isn't showing the code coverage in VSC.
I tried using your fix, here is my settings.json
"coverage-gutters.coverageFileNames": [ "coverage.xml", "lcov.info", "cov.xml", "jacoco.xml" ], "coverage-gutters.remotePathResolve": [ [ "\\home\\dev\\Mxxxx", "." ] ]The
/home/dev/M...
path is what I'm using in the container.In the CG log I see this:
[1698181260483][coverageservice]: c:\Users\Exxxxxxxx\gitlab\Mxxxx\coverage.xml [1698181260483][coverageservice]: Loaded 1 data file(s) [1698181260488][coverageservice]: Caching 6 coverage(s) [1698181260488][coverageservice]: READY [1698181260488][coverageservice]: RENDERING [1698181260488][coverageservice]: READY
so I know that it's picking up my coverage file, but there's just still no visual indication on the file, and the bottom bar still shows "No coverage".
Did you end up having to do anything else other than changing this setting, to fix the issue? I'm running Coverage Gutters v2.11.0
@ralittl Hmm I think you might want to try one level of array instead?
"coverage-gutters.remotePathResolve": ["\\home\\dev\\Mxxxx", "."]
Also, once you get the system working, try out the watch button in the bottom status bar and you should get an output similar to the following:
[1699830894119][coverageservice]: INITIALIZING
[1699830925569][coverageservice]: LOADING
[1699830925644][coverageservice]: Loading 7 file(s)
[1699830925644][coverageservice]: /home/ryan/Dev/vscode-coverage-gutters/example/node/lcov.info,/home/ryan/Dev/vscode-coverage-gutters/example/remote-node/lcov.info,/home/ryan/Dev/vscode-coverage-gutters/example/ruby/lcov.info,/home/ryan/Dev/vscode-coverage-gutters/example/java/my-app/cov.xml,/home/ryan/Dev/vscode-coverage-gutters/example/php/cov.xml,/home/ryan/Dev/vscode-coverage-gutters/example/python/cov.xml,/home/ryan/Dev/vscode-coverage-gutters/example/multimodule-java/jacoco.xml
[1699830925646][coverageservice]: Loaded 7 data file(s)
[1699830925670][coverageservice]: Caching 19 coverage(s)
[1699830925670][coverageservice]: READY
[1699830925670][coverageservice]: RENDERING
[1699830925670][renderer][section file path]: ./node/test.js
[1699830925671][renderer][section file path]: ./node/test.js
[1699830925671][coverageservice]: READY
[1699830925671][coverageservice]: Listening to file system at {/home/ryan/Dev/vscode-coverage-gutters/example}/**/{lcov.info,cov.xml,coverage.xml,jacoco.xml,coverage.cobertura.xml}
[1699830933310][coverageservice]: RENDERING
[1699830933311][renderer][section file path]: ./node/test.js
[1699830933311][coverageservice]: READY
from vscode-coverage-gutters.
Related Issues (20)
- [feat] Report per-file uncovered lines under `PROBLEMS` tab like `markis.code-coverage` HOT 3
- support jacoco aggregate HOT 10
- Confusing coverage highlighting for python from coverage.xml HOT 3
- Multiple test projects HOT 6
- Coverage "gutter" not showing, "line" and "ruler" OK HOT 8
- Extension settings do not have the scope property defined HOT 3
- refactoring if clause caused extension to crash HOT 3
- update CHANGELOG.md to make changes extension-visible
- Java example pom issues and failure in mvn install HOT 2
- Cannot seem to watch files outside of VS Code workspace directory HOT 2
- Improve visibility of covered lines HOT 4
- Add support for remote coverage files HOT 3
- Support coverage reports with multiple sources HOT 2
- behavior change suggestion/rfc: statusbar should report `Math.floor` instead of `Math.round` HOT 1
- `Illegal argument: line must be non-negative` when any `detail.line` is 0 HOT 1
- Where does the watcher look for the lcov.info file? HOT 2
- Coverage information fails to render when branch coverage is enabled HOT 1
- Update deploy automation action to use v1 of external action
- Cant read coverage data from cobertura-coverage.xml HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-coverage-gutters.