Skip to content

Ignoring single mutations #3342

@causa-prima

Description

@causa-prima

Is your feature request related to a problem? Please describe.
I have the following code:

var suggestionsLeft = Constants.NumberOfSearchSuggestions - searchResults.Count;
if (suggestionsLeft > 0)

Stryker will rightfully create a mutant replacing > with >=, but it would be pretty laborious to write a test where the number of search results exactly matches the constant.

Describe the solution you'd like
I'd like a way to specifically disable the mutation > to >=, ideally on a per-line basis.

Describe alternatives you've considered
// Stryker disable once Equality would disable the other valid equality mutations as well that I definitely want to keep.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: FiltersMutant filtering algorithmsPriority: LowAn annoyance. Not of importance, choose whenever be fixed🚀 Feature requestNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions