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

lcov report #67

Open
DanielMSchmidt opened this issue May 5, 2017 · 7 comments
Open

lcov report #67

DanielMSchmidt opened this issue May 5, 2017 · 7 comments

Comments

@DanielMSchmidt
Copy link

DanielMSchmidt commented May 5, 2017

Hi there,

I would love to use this tool with codecov.io but I think I will need a lcov report, can you tell me what needs to be done than I will try to have a look into it 👍

@DanielMSchmidt DanielMSchmidt changed the title lcov repott lcov report May 5, 2017
@rpl
Copy link
Owner

rpl commented May 5, 2017

Hi @DanielMSchmidt, I totally agree with you: generating a report in the lcov format would be great, e.g. we would be able to use services as codecov.io to make a pull request to fail when the flow coverage trend is going down (as we do with regular code coverage).

Generating such a report is technically possible, the main issues that have currently identified are:

  • translating the coverage data (eg. convert the coverage data collected from being "expressions based", that is how flow provides this data, to a "line based" lcov file, I started to look into this and it is pretty simple to convert the expression ranges into a line by line report)

  • as described in include covered_locs in json output #20, it seems that a regular lcov report is also supposed to contain a line by line report of the covered lines (which, as an example, exclude the lines that are inline comments and shouldn't impact the line by line coverage), and flow doesn't currently output the "covered expressions ranges", a patch has been proposed by @clarkbw in add covered_locs output to coverage facebook/flow#3231 (and apparently imported here https://phabricator.intern.facebook.com/D4861141, but I've not a facebook account and I'm not sure if it is publicly accessible with a regular facebook account)

we could probably workaround facebook/flow#3231 by processing the AST and build our own knowledge of the covered expression ranges, but it would much simpler (and definitely faster and safer) if flow can optionally provide this data given that it has already collected this knowledge internally.

The proposed patch from facebook/flow#3231is pretty small and some time ago I tried it and I've been able to easily build a custom flow binary from the patched sources, and so it is totally possible to use the patch to start to prototype the feature in more details in the meantime, and I would be definitely more than happy to help you on it!

Let me know if the above info are useful to you as a starting point.

Thanks a lot for your interest and help on this project! ❤️

@vicapow
Copy link

vicapow commented Apr 24, 2018

This will be out in the latest version of flow (woo!)

@mrkev
Copy link

mrkev commented Apr 24, 2018

Note: if it doesn't land on flow v0.71.0 it will land on v0.72.0. Sometimes cuts get backlogged a little; it is coming up though!

@r1b
Copy link

r1b commented May 23, 2018

Appears to be available in flow v0.72.0

@Peeja
Copy link

Peeja commented Jul 6, 2018

Not trying to be naggy, just honestly a bit lost in the above: where does that leave this? Can we get LCOV reports today? Or does this just mean it's possible to build now?

@mrkev
Copy link

mrkev commented Jul 11, 2018

iirc means it's possible to build now

@kangax
Copy link

kangax commented Nov 15, 2018

We are sending report to codecov.io now and it sort of works, but the local coverage and the coverage reported by codecov differ by a lot.

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

7 participants