-
Notifications
You must be signed in to change notification settings - Fork 249
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
first stab at statementRemoverMutator #3913 #3916
base: master
Are you sure you want to change the base?
Conversation
I would love this mutator. Stryker.NET also has it, but they call it the block statement mutator if I'm not mistaken. It has an additional feature, which I would love. Statements are not removed when there are other mutants generated anywhere in the statement. I view that as a requirement for this mutator because it would otherwise generate many mutants of low quality. @richardwerkman @rouke-broersma could one of you elaborate on how that works in Stryker.NET? Do you generate mutants and later decide which ones to keep, filtering out these low-quality mutants? Or did you make the "block statement" mutator "smart"? |
No we have both. We call them removal mutators. Statement and block: https://stryker-mutator.io/docs/stryker-net/mutations/#removal-mutators-statement-block |
As I understand there is no info in the mutator itself to decide on it. Ofc. it is an option to modify the calling code. I consider that feature as an optimization. First I concentrate to get the functionality together. |
@rouke-broersma do you have a way to make sure these mutants are generated when there are no other mutants generated in the (block)statement? |
Not sure on the specifics of the implementation, @richardwerkman ? |
The specifics of the implementation are: we don't have an implementation... I wanted to add that but so far without success. For now, we place these mutations all the time. Despite it generating some unwanted mutants. I had some ideas like filtering the mutants after generating them. Or keeping track of context and passing a value to mutators that helps identify if a mutant has been placed in this scope already. |
I've created an issue at stryker-net for this: stryker-mutator/stryker-net#2367 |
I added my experiment for functioncall remover mutator here as well #3920 |
I have updated the snapshots, fixed eslint problems (not mine), and a couple of tests (one was not mine). Now npm run all runs okay. This is the point when I consider this pull request ready. If anything else is needed for acceptance, I need guidance. |
Any news with this PR? |
Anything I can do to get this pull request accepted? |
Anything I can do to get this pull request accepted? |
I've opened issue #4463. We should tackle it during hacktober. I think that should be implemented before we can merge this PR. |
This is a preview. Works for me because the code I am using it with is really small and primitive.
I would like to get some feedback on which statements to remove, and which ones not to remove.
And ofc on the general direction.
I intend to work on the project with which I use stryker, and update the mutator in an as-needed basis, and also incorporate feedback here.