gremlins icon indicating copy to clipboard operation
gremlins copied to clipboard

Exclude requested packages/dirs from being mutated

Open alessio-perugini opened this issue 2 years ago • 3 comments

This feature will allow a user to exclude some directories from being mutated.

We can pass a flag with a list of dirs to be excluded by gremlins unleash

gremlin unleash --exclude-dirs="./dir1,./dir2,./dir3"

Config file:

unleash:
  exclude-dirs:
  - "./dir1"
  - "./dir2"
  - "./dir3"

What do you think about that?

alessio-perugini avatar Sep 25 '22 21:09 alessio-perugini

I'm not sure if it is better to exclude dirs or packages... Also, we have to be careful on how it plays with the recently added --coverpkg flag.

k3rn31 avatar Sep 26 '22 08:09 k3rn31

Regarding this feature, I was thinking of something more flexible.

To exclude specific mutators for paths:

excludes:
  - path: <path regex>
    mutators:
      - mutator1
      - mutator2

In this case we can have a list of specific path or regex matching paths. For each, we can have a specific list of mutators to match (if not specified will be all mutators).

Same concept can be applied to packages:

excludes:
  - package: <package regex>
    mutators:
      - mutator1
      - mutator2

k3rn31 avatar Oct 02 '22 06:10 k3rn31

@k3rn31 Sounds good to me :smile:

alessio-perugini avatar Oct 02 '22 08:10 alessio-perugini

Very expecting feature!

MEZk avatar Nov 18 '22 07:11 MEZk

Done in PR #228

k3rn31 avatar Feb 15 '24 10:02 k3rn31