You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
We want to add a mutator that removes statements or expressions. I.e. #3916
-resource.dispose();+ // 👽
However, this would result in many additional mutants without real value since another mutant already covered the statement. For example, we wouldn't want to remove this statement:
- const result = foo + bar;+ const result = foo - bar; // 👽
Is your feature request related to a problem? Please describe.
We want to add a mutator that removes statements or expressions. I.e. #3916
However, this would result in many additional mutants without real value since another mutant already covered the statement. For example, we wouldn't want to remove this statement:
Describe the solution you'd like
We would like to be able to filter mutants using a
MutantFilter
, like is implemented in Stryker.NET: https://github.com/stryker-mutator/stryker-net/blob/master/src/Stryker.Core/Stryker.Core/MutantFilters/IgnoreBlockMutantFilter.cs#L10Note: we shouldn't mark filtered-out mutants as 'ignored'; they should not exist in your report.
A valid approach might be to add an optional
filter
method on the mutator API, that, when implemented, indicated whether or not the mutant is valid.export interface NodeMutator { mutate(path: NodePath): Iterable<types.Node>; + filter?(mutableInScope: Mutable[]): boolean; readonly name: string; }
Describe alternatives you've considered
Keep like it is now, with a lot of noise when implementing the statement mutator.
Additional context
0
The text was updated successfully, but these errors were encountered: