Skip to content

Allow glob in source #2400

Done
Done

Description

@ferdinandrau

Is your feature request related to a problem? Please describe.

Hi, I would really like to be able to give all my monorepo packages in a source array without having to list them out, using a wildcard. Having that option unset and using include or omit is not sufficient, as it does not track files that were not executed, which is basically the point of tracking test coverage.

Describe the solution you'd like

# pyproject.toml

[tool.coverage.run]
source = ["packages/*/src"]

Describe alternatives you've considered

Listing everything out. Easy to forget, not nice for things like a CI pipelines that should pick up new packages automatically. Can this be supported or is there a reason it isn't?

Activity

  1. added
    enhancement
    on Nov 15, 2026
  2. nedbat commented on Nov 22, 2026

    @nedbat
    Member

    Can you tell us more about your situation? What is the layout of your repo?

  3. nedbat commented on Nov 29, 2026

    @nedbat
    Member

    This is now released as part of coverage 7.18.0.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions