Skip to content

Some documentation needed: coverage() #454

Closed
dart-archive/coverage
#267

Description

@jtmcdole

I have a continuous coverage collection that dumps to a file some tools use to mark up different editors. Just wondering what the extra terms are.
https://github.com/dart-lang/coverage/blob/f55a498ab3f33361a6dbca8d7c570fd80a936a6d/lib/src/collect.dart#L28

Activity

  1. cbracken commented on Aug 9, 2019

    @cbracken
    Member

    Hrm. Looks like someone made changes that didn't update the docs. By someone, I mean me for includeDart which I probably should have made optional and defaulted false. This controls whether coverage is collected for dart: libraries. Most people only care about coverage for their own code, hence why we default it false in the program args. Fix PR is dart-archive/coverage#266.

    Looks like @grouma added scopedOutput. It's unclear to me what it does from the commit comment. Unrelated, but looks like it was landed in a merge commit with a bunch of fixups in the commit history which makes it a bit tricky to see the whole patch without a manual diff -- generally we should prefer to squash to keep this history easy to follow. @grouma would you mind sending a patch that adds the docs to collect() and update the README with example usage?

  2. grouma commented on Aug 9, 2019

    @grouma
    Member

    I can take a look at this likely next week. My bad on not squashing. That is our general practice for all other repositories as well so I'm surprised I messed up on this one :(

    It sounds like scopedOutput has some overlap with includeDart. The purpose of this argument is to only collect coverage for a subset of paths. This is crucial for our internal users as it is much faster to collect coverage information for a subset of scripts instead of filtering a report for a potentially large VM application.

  3. cbracken commented on Aug 9, 2019

    @cbracken
    Member

    I think it's possible to disable merge commits, but I'm also pretty sure I don't have the power to edit the repo settings. My guess is kevmoo or someone else on the Dart side should though -- easy enough to switch the default and then we don't have to worry about it.

  4. cbracken commented on Aug 9, 2019

    @cbracken
    Member

    Re: scopedOutput that sounds awesome from a performance perspective! It overlaps with includeDart if a value is set, but I assume the default is still "collect everything if no values are set", in which case having includeDart is still useful in that case so probably fine to keep both.

    Thanks for adding that!

  5. jtmcdole commented on Aug 9, 2019

    @jtmcdole
    ContributorAuthor

    Would be nice to have the set defaulted to <String>{} as well.

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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions