Naming scheme + Adjusted mutation score used by mutation levels#2995
Naming scheme + Adjusted mutation score used by mutation levels#2995dvcopae wants to merge 11 commits intostryker-mutator:masterfrom
Conversation
… because of the mutation level
# Conflicts: # docs/supported-mutators.md
Docs/mutant operator names
| | ------------------------------------------ | -------------------------------------- | --------------------- | | ||
| | FilledStringLiteralToEmptyReplacement | `"foo"` (filled string) | `""` (empty string) | | ||
| | EmptyStringLiteralToFilledReplacement | `""` (empty string) | `"Stryker was here!"` | | ||
| | FilledInterpolatedStringToEmptyReplacement | `s"foo ${bar}"` (string interpolation) | `s""` ¹ | |
There was a problem hiding this comment.
Minor thing, but as far as I'm concerned, this can also be FilledStringLiteralToEmptyReplacement. I don't think Stryker-JS, for example, has a difference between "" and ``
BundleMon (elements)Files updated (3)
Total files change +523B +0.08% Final result: ✅ View report in BundleMon website ➡️ |
| | SubtractionAssignmentNegation | `-=` | `+=` | | ||
| | MultiplicationAssignmentNegation | `*=` | `/=` | | ||
| | DivisionAssignmentNegation | `/=` | `*=` | | ||
| | RemainderAssignmentToMultiplicationReplacement | `%=` | `*=` | |
There was a problem hiding this comment.
| | RemainderAssignmentToMultiplicationReplacement | `%=` | `*=` | | |
| | RemainderAssignmentToMultiplicationAssignmentReplacement | `%=` | `*=` | |
| | RemainderAssignmentToMultiplicationReplacement | `%=` | `*=` | | ||
| | LeftShiftAssignmentNegation | `<<=` | `>>=` | | ||
| | RightShiftAssignmentNegation | `>>=` | `<<=` | | ||
| | BitwiseAndAssignmentToBitwiseOrReplacement | `&=` | <code>|=</code> | |
There was a problem hiding this comment.
| | BitwiseAndAssignmentToBitwiseOrReplacement | `&=` | <code>|=</code> | | |
| | BitwiseAndAssignmentToBitwiseOrAssignmentReplacement | `&=` | <code>|=</code> | |
| | LeftShiftAssignmentNegation | `<<=` | `>>=` | | ||
| | RightShiftAssignmentNegation | `>>=` | `<<=` | | ||
| | BitwiseAndAssignmentToBitwiseOrReplacement | `&=` | <code>|=</code> | | ||
| | BitwiseOrAssignmentToBitwiseAndReplacement | <code>|=</code> | `&=` | |
There was a problem hiding this comment.
| | BitwiseOrAssignmentToBitwiseAndReplacement | <code>|=</code> | `&=` | | |
| | BitwiseOrAssignmentToBitwiseAndAssignmentReplacement | <code>|=</code> | `&=` | |
| | RightShiftAssignmentNegation | `>>=` | `<<=` | | ||
| | BitwiseAndAssignmentToBitwiseOrReplacement | `&=` | <code>|=</code> | | ||
| | BitwiseOrAssignmentToBitwiseAndReplacement | <code>|=</code> | `&=` | | ||
| | NullishCoalescingOperatorToLogicalAndAssignmentReplacement | `??=` | `&&=`¹ | |
There was a problem hiding this comment.
| | NullishCoalescingOperatorToLogicalAndAssignmentReplacement | `??=` | `&&=`¹ | | |
| | NullishCoalescingAssignmentToLogicalAndAssignmentReplacement | `??=` | `&&=`¹ | |
There was a problem hiding this comment.
@rouke-broersma would you agree on this name? Or should it be NullCoalescingAssingmentToLogicalAndAssignmentReplacement?
| | Mutant operator | Original | Mutated | | ||
| | -------------------------------------- | ---------------------------------------------------------- | ------------------------------------------- | | ||
| | ForLoopConditionToFalseReplacement | `for (var i = 0; i < 10; i++) { }` | `for (var i = 0; false; i++) { }` ¹ | | ||
| | WhileLoopConditionToFalseReplacement | `while (a > b) { }` | `while (false) { }` | | ||
| | DoWhileLoopConditionToFalseReplacement | `do { } while (a > b);` | `do { } while (false);` | | ||
| | IfConditionToTrueReplacement | `if (a > b) { }` | `if (true) { }` | | ||
| | IfConditionToFalseReplacement | `if (a > b) { }` | `if (false) { }` | | ||
| | BooleanExpressionToTrueReplacement | `var x = a > b ? 1 : 2;` | `var x = true ? 1 : 2;` ¹ | | ||
| | BooleanExpressionToFalseReplacement | `var x = a > b ? 1 : 2;` | `var x = false ? 1 : 2;` ¹ | | ||
| | SwitchStatementBodyRemoval | `switch(x) { case 1: doSomething(); default: default(); }` | `switch(x) { case 1: default: default(); }` | |
There was a problem hiding this comment.
I think we should remove this group, as mutants in this group should be merged in others.
| Old name | New name |
|---|---|
| ForLoopConditionToFalseReplacement | LessThanExpressionToFalseReplacement |
| WhileLoopConditionToFalseReplacement | same |
| DoWhileLoopConditionToFalseReplacement | GreaterThanExpressionToFalseReplacement |
| IfConditionToTrueReplacement | GreaterThanExpressionToTrueReplacement |
| IfConditionToFalseReplacement | Sane |
| BooleanExpressionToTrueReplacement | Same |
| BooleanExpressionToFalseReplacement | Same |
| SwitchStatementBodyRemoval | BlockStatementRemoval |
|
@nicojs this was replaced with another PR right? |
Contains:
The status
IGNORED_BY_LEVEL_STATUSis introduced in the mutation levels PR from StrykerJS, so that one needs to be merged first for this functionality to be enabled.