Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suddenly stopped working #448

Open
robross0606 opened this issue Aug 1, 2024 · 5 comments
Open

Suddenly stopped working #448

robross0606 opened this issue Aug 1, 2024 · 5 comments

Comments

@robross0606
Copy link

robross0606 commented Aug 1, 2024

Describe the bug
This has been working fine for at least a year if not longer. Suddenly all my projects insist there is "No Coverage" even though my user config is set to analysis/**/index.html and the following file tree exists in the project:
image

And the HTML contents look normal:
image

Expected behaviour
Coverage would continue to be detected as it has for the last year.

Desktop (please complete the following information):

  • OS: Windows 10.0.19045.4717
  • Extension Version 2.11.1
  • VSCode Version 1.91.1
@ryanluker
Copy link
Owner

@robross0606 Thanks for the ticket!
Are you able to check out the extension logging and see if the extension is finding any coverage in the file paths you have specified? (these logs can be found in the output tab in the terminal and then on the right hand side there is drop down and coverage-gutters should be in there)

@robross0606
Copy link
Author

Sorry, took me a while to circle back on this in a project where it is occurring. All I get in the logs is this:

[1726668095369][coverageservice]: LOADING
[1726668095655][coverageservice]: Loading 1 file(s)
[1726668095655][coverageservice]: c:\Code\nl\node-error-utils\analysis\lcov.info
[1726668095655][coverageservice]: Loaded 1 data file(s)
[1726668095656][coverageservice]: Caching 8 coverage(s)
[1726668095656][coverageservice]: READY
[1726668095656][coverageservice]: RENDERING
[1726668095656][coverageservice]: READY
[1726668095656][coverageservice]: Listening to file system at {c:\Code\nl\node-error-utils}/**/{lcov.info,cov.xml,coverage.xml,jacoco.xml,coverage.cobertura.xml}
[1726668097810][coverageservice]: RENDERING
[1726668097810][coverageservice]: READY

Settings look like this:
image

Root of project has this:
image

Opening analysis/index.html shows this (which is correct):
image

Coverage gutters used to work without an issue, but now keeps saying "No Coverage".

@robross0606
Copy link
Author

I just realized that the coverage indicator on the bottom bar is showing the coverage of each opened file instead of the overall test coverage. Did it always do this? It seems strange to show "No Coverage" when no files are opened instead of showing the project's overall coverage. Why not show this when no file is open?

image

@robross0606
Copy link
Author

I also noticed that the coverage numbers in the bottom are are truncating decimals instead of rounding. For example, one of my files has 96.77% coverage but coverage gutters reports 96% coverage instead of 97%.

@ryanluker
Copy link
Owner

ryanluker commented Oct 19, 2024

@robross0606 Interesting! I would have to rack my brain but I think the bottom coverage indicator always showed the current files covered lines. There definitely could be improvements here for the rounding, total project coverage, etc but finding dev time for improvements / open source contributions is the usual bottleneck.

Sorry, took me a while to circle back on this in a project where it is occurring. All I get in the logs is this:
Those logs look correct as well and you should be able to see coverages in the gutters if you open up a specific file 🤔.

Some more debugging we can do, try to check out the example project in this repo and see if the coverage is showing up correctly there. If it is, then maybe there are some settings within your other project that is preventing the visualization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants