tenninebt / vscode-koverage

VSCode code coverage extension

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NaN% for all folders and files

aidandamerell opened this issue · comments

Installed for a Ruby on Rails project which produces an lcov.info, howver Koverage reports NaN% for all files.
Screenshot:
Screenshot 2020-05-25 at 12 06 22

LCOV is generated with RSpec and https://github.com/fortissimo1997/simplecov-lcov

Any ideas?

Never faced it, can I have your lcov or a sample of it? That would help a lot.

Thanks for the quick reply! sure, I've taken a snippet out and pasted below:

SF:./app/models/some_file.rb
DA:3,1
DA:5,1
DA:8,1
DA:13,1
DA:15,1
DA:16,1
DA:18,1
DA:20,1
DA:22,1
DA:27,1
DA:30,1
DA:31,1
DA:33,1
DA:35,1
DA:39,1
DA:40,0
DA:43,1
DA:44,0
DA:47,1
DA:48,0
DA:51,1
DA:52,0
DA:55,1
DA:57,1
DA:58,0
DA:60,0
DA:63,1
DA:64,0
end_of_record
SF:./app/models/some_other_file.rb
DA:3,1
DA:4,1
DA:7,1

I see what's happening, there are supposed to be lines giving the coverage inside the lcov :

LF:25
LH:25
end_of_record

Here is an extract from https://manpages.debian.org/stretch/lcov/geninfo.1.en.html

At the end of a section, there is a summary about how many  lines  were
       found and how many were actually instrumented:

         LH:<number of lines with a non-zero execution count>
         LF:<number of instrumented lines>

I'm using a library to parse the lcov, I will check if there is way to compute those when missing, if the lib does not offer that, I have to implement it myself which should be still quick.

Awesome, thanks @tenninebt! I'm taking a look at the library I use to generate the LCOV and it doesn't look like there is a way to output those lines unfortunately :(

Hey, please try again with 0.0.4-dev and tell me if it works fine for you.

@tenninebt 0.4 Working a treat! Thanks for the amazingly quick turn around on this!

My pleasure, I know how frustrating it can be. Enjoy and do not hesitate to give more feedback.
Closing the issue