Skip to content

Error on unrecognised configuration directive in .coveragerc #386

@nedbat

Description

@nedbat

Originally reported by Kristian Glass (Bitbucket: DoISmellBurning, GitHub: DoISmellBurning)


I'd love it if coverage gave me an error if it encountered unrecognised directives in .coveragerc

Spot the problems with these files:

[run]
source = foo

[report]
branch = True

Did you notice that branch was in the report section when it should have been in run? You probably did, because you were deliberately looking for mistakes and it's a short file, but it's very easy to miss at a glance!

What about:

[report]
fail_under = 100

I cheated here. That's absolutely fine if you're using 4.0aSomething, but 3.7.1 doesn't support that directive (#314) which is entirely reasonable, but it's sure unpleasant to discover that you thought you were mandating 100% coverage but actually weren't...!

Some sort of "I don't know what to do with foo!" reporting, even if just a warning/informational message, would be incredibly useful please!


Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions