Skip to content

Commit abf5d46

Browse files
tablackburnclaude
andcommitted
style: remove unreachable IsNullOrEmpty guard in Split-SemVerString
The previous commit added [ValidateNotNullOrEmpty()] to $VersionString, which makes the in-body IsNullOrEmpty check unreachable under normal parameter binding — both Copilot and CodeRabbit flagged it as dead code. Removing the redundant guard. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 703c2a8 commit abf5d46

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

tests/ManifestHelpers.psm1

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ function Split-SemVerString {
4040
[string]$VersionString
4141
)
4242

43-
if ([string]::IsNullOrEmpty($VersionString)) {
44-
throw 'VersionString cannot be empty or null'
45-
}
46-
4743
# Strip build metadata per SemVer 2.0.0 — it does not affect precedence and is
4844
# not valid for [System.Version], so it must be removed before further parsing.
4945
$coreVersion = ($VersionString -split '\+', 2)[0]

0 commit comments

Comments
 (0)