Repository navigation
Conversation
The Linq mutator produced only compile errors (34 of 52 in the latest run: Append to Prepend on StringBuilder, Count to Sum on collections). Disabling it removes those failed compile attempts without losing any valid mutant.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #611 +/- ##
=======================================
Coverage 98.54% 98.54%
=======================================
Files 22 22
Lines 274 274
Branches 43 43
=======================================
Hits 270 270
Misses 1 1
Partials 3 3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The latest mutation run created 229 mutants, 52 with status CompileError (23 %). 34 of those come from the Linq mutator (StringBuilder.Append to Prepend: 32, Count() to Sum(): 2).
Root cause
The Linq mutator rewrites StringBuilder.Append and ICollection.Count into LINQ methods that do not compile on those types.
Change
Add
"ignore-mutations": ["linq"]inside thestryker-configobject of stryker-config.json.Before / After
Measured run on this branch: https://github.com/dailydevops/fluentvalue/actions/runs/40804529110
Result: the change has no effect, PR set to draft
In dotnet-stryker 5.0.0 the
ignore-mutationsfilter runs after the mutated assembly is compiled, andCsharpMutationProcess.FilterMutantsexplicitly skips mutants that are already CompileError ("CompileError is a final status and can not be changed during filtering"). All 34 Linq mutants therefore still fail to compile and are still reported as CompileError; no mutant was removed by the "mutation type filter" in the run (the report still lists the 32 Append-to-Prepend and 2 Count-to-Sum Linq mutants as CompileError). The same applies toignore-methods. There is no Stryker configuration in this version that prevents these compile attempts, so the proposed goal (CompileError 52 to about 18) cannot be reached by configuration.Risk / what this does not change
Harmless but useless: it would only disable the Linq mutator repo-wide (valid Linq mutants could not appear in future code). Recommend closing this PR.