When using --source, --include is silently ignored

Issue #265 resolved
Ned Batchelder
repo owner created an issue

Once --source is specified, --include is ignored. If the user specifies both, this shouldn't happen silently. A warning or error is appropriate.

Comments (14)

  1. Ned Batchelder reporter

    @Aldo Longhi Unfortunately, the conflict could be in the configuration file also. And run uses with --source or --include, but "report" uses only --include. I'll have to think more about what is a problem here, and what to do about it.

  2. Ned Batchelder reporter

    --source and --include are mutually exclusive #265

    Add a sanity_check function to CoverageConfig to perform sanity checks after configuration values have been collected from files, arguments etc.

    Raise an error if --source and --include are both set.

    The config tests are amended because some of them have both source and include set.

    Based on the original patch from Nathan Land

    close #265

    → <<cset 4aced78ac2a1>>

  3. Log in to comment