Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Exclude functions from code coverage #476

@laksru

Description

@laksru

Hello,
It is good that we can exclude files from code coverage using config files and regex patterns.
Is there any way that we can exclude functions in a file using filters and exclusion markers from config files.

For example, I am looking for a way to exclude functions from code coverage when we add the function names in the config file.
In coverage.py for python, we can add "pragma: no cover" and list of function names in the config file to ignore those functions. In a similar way, can we do it in gcovr?
Please suggest.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions