-
-
Notifications
You must be signed in to change notification settings - Fork 36
Description
I believe that it would be handy to exclude specified paths from the mutants generation.
Let's say that I want to exclude things like configuration logic or some test helper logic files, located within the src directory. Right now the default behaviour of cargo mutants command is that it tries to generate mutants for every file in the src directory and in their child directories.
I could envision having a command line parameter as follows:
cargo mutants --exclude <regexes-for-paths-to-be-excluded>
Use case scenario:
Prerequisite:
Git clone test repo
Steps:
- Go to the main directory of the cloned repo
- Execute the following command
cargo mutants --exclude "(\/src\/tests)" "(\/src\/config)"
Expected behaviour:
Every file which is located in either /src/tests or /src/config directories are excluded from mutants generation.
Actual behaviour:
Because of the default behaviour of cargo-mutants (and due to the non-existency of this command line parameter) there are mutants generated for the files both in /src/tests and /src/config