Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Mutator): Add mutator for GeneratedRegex #3106

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Pentiva
Copy link
Contributor

@Pentiva Pentiva commented Nov 11, 2024

Adds the ability for Stryker to apply regex mutations to code using the GeneratedRegex attribute. Also switches usage in the library to use the regex source generator.

There are several things that I think aren't perfect about this implementation:

  • All of the mutation is done in the orchestrator, instead of a mutator.
  • The actual mutation does not match a manual mutation.
    • Therefore the JSON report has to be faked to make sense.
  • The typical tests for the orchestrator was causing my IDE to lag very heavily, so VerifyTests was used.
  • The SemanticModel has to be recomputed after a change, otherwise it is unusable in further mutations.
  • Since GeneratedRegexOrchestrator needs to generate the mutants, it is now made available through the MutationContext.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant