rpl / flow-coverage-report

Generate flow coverage reports in JSON, HTML and in the console.
MIT License
505 stars 42 forks source link

lcov report #67

Open DanielMSchmidt opened 7 years ago

DanielMSchmidt commented 7 years ago

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 👍

rpl commented 7 years ago

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:

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! :heart:

vicapow commented 6 years ago

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

mrkev commented 6 years ago

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 commented 6 years ago

Appears to be available in flow v0.72.0

Peeja commented 6 years ago

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 commented 6 years ago

iirc means it's possible to build now

kangax commented 5 years ago

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.