Skip to content

Ability to specify "all but" ignore patterns in omit #1579

Open
@plondino

Description

@plondino

Is there any way to use omit to specify "all files except "?

For example, I have a generated package with some custom code in the __init__.py. The generated code is potentially thousands of lines and dwarfs the actual tested code in terms of a percentage, but I still want to ensure my custom code is tested.

Since omit can only exclude files after source/include, I couldn't figure out a way to do this without listing every single generated file in omit (which can be a lot of files) except for the init.py.

Does it make sense to either respect the order of omit/include, or use an approach like gitignore (using the ! to "reinclude" something, see https://git-scm.com/docs/gitignore#_pattern_format), or support some other pattern matching in the filename?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions