Repository navigation
ci: self-mutation on PSMutant 0.9.0, with NumberBoundary and ArithmeticOperator - #217
Merged
Merged
Conversation
…icOperator The two new operators found one fault: the report's producedBy version came from Get-Module's first answer, which with two versions loaded names an arbitrary one. It now reads the manifest beside src/ (0.7.2). Four were test gaps: union order (the fixture read the same reversed), a function-drive self-call with an argument, the config path's spelling under a case-insensitive comparison, and a blank line after a further comment. The rest index lists that hold one item by then, and are declared inline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2xHDB6dJmcwLt5EfS2QVP
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.
Moves self-mutation to PSMutant 0.9.0 and turns on its two new operators,
NumberBoundaryandArithmeticOperator. StringLiteral is still the only opt-in operator left off.Their first run scored 98.9%, with 19 survivors. Sorted:
One real fault, fixed (opens 0.7.2).
Get-PSCxModuleVersiontook the report'sproducedByversion fromGet-Module's first answer. With two versions of PSComplexity imported side by side, that is whichever PowerShell lists first, not the one writing the report. It now reads the manifest besidesrc/, which is always the version that ran. CHANGELOG and ReleaseNotes are updated.Four test gaps, now tested:
Ast.ps1): the existing fixture, continue/break/continue, reads the same reversed, so a walk numbered downwards also passed. Added a case that doesn't read the same reversed.${function:...}with an argument after it, soCommandElements[0]and[-1]differ.Find-PSCxRunConfigFileunder a case-insensitive comparison returns the first path's spelling. The assertion is case-sensitive, becauseShould-Becompares strings without case and let the mutant through.Declared equivalent, beside the code. These are
# PSMutant-Equivalent:comments, as PSMutant's own source uses. Most are an index[0] -> [-1]into a list that holds exactly one item by then, or a counter that is only ever compared with-gt 0or against a line number of at least 1. Where one line held two identical mutants, it is split so each declaration names exactly one.Position = 0 -> (-1)on-Pathsits in the config beside the existing0 -> 1: checked on 7.5 and 7.6, it binds identically.All gates run locally on 7.6.8:
🤖 Generated with Claude Code
https://claude.ai/code/session_01Q2xHDB6dJmcwLt5EfS2QVP