stryker-mutator / stryker-net

Mutation testing for .NET core and .NET framework!
https://stryker-mutator.io
Apache License 2.0
1.79k stars 188 forks source link

feat(Regex): Add more regex mutations #3060

Closed Pentiva closed 1 month ago

Pentiva commented 1 month ago

Added more regex mutations from weapon-regex.

weapon-regex has a concept of levels for which mutations are enabled which might be good to add in some way to not have too many unneeded mutations.

I also refactored RegexMutantOrchestrator, because all the mutators were stored in a dictionary based on type, but the dictionary was looped through anyway, so the type check was moved to IRegexMutator and RegexMutatorBase provides a better type check as it uses the is expression with generics instead of reflection. (This might also make it easier to filter out specific regex expression in a config file, as each mutator could provide its own required level.). I think this aligns it much more with the core mutators.

rouke-broersma commented 1 month ago

I will probably review this Friday, I haven't forgotten you 👌

rouke-broersma commented 1 month ago

Thanks!