melos icon indicating copy to clipboard operation
melos copied to clipboard

request: Get the aggragated coverage

Open lulupointu opened this issue 2 years ago • 1 comments

Is there an existing feature request for this?

  • [X] I have searched the existing issues.

Command

melos coverage

Description

The command would run flutter run --coverage on every packages, then aggregate all the lcov.info data into a single lcov.info located at $MELOS_ROOT_PATH/coverage/lcov.info

Reasoning

  • I think test coverage is a feature that is used a lot.

  • Today it is quite laborious to implement, we basically have to write a script which does a lot of what melos already does (locating the packages, parsing their path, adding options to run in only selected packages)

Additional context and comments

I have already implemented such a feature for my project and would love to adapt it for melos. If you would be willing to take a PR for such a feature let me know 😊

lulupointu avatar Jul 07 '22 15:07 lulupointu

That would certainly be a useful feature, but I'm not certain Melos is the right place to implement it. I think we want to keep Melos focused on general purpose functionality to keep it maintainable.

The melos package has a public API, though, that might be useful in building a package that works for all Melos projects. If that API is missing something you need, we could look into adding it.

blaugold avatar Jul 11 '22 08:07 blaugold

I'll close this since it is a bit out of scope for Melos. It would be great if you could share how you did it @lulupointu so that others that stumble upon this issue can use the same way as you did. :)

spydon avatar Dec 04 '23 18:12 spydon