Skip to content

DOC-02: add default clause to switch (Codacy S131) - #206

Merged
davidnmbond merged 2 commits into
mainfrom
fix/doc-02-switch-default
Nov 13, 2026
Merged

davidnmbond merged 2 commits into
mainfrom
fix/doc-02-switch-default

Conversation

@davidnmbond

Copy link
Copy Markdown
Contributor

Codacy flagged SonarCSharp_S131 on the switch in DotNetVersion.FromProse (the one new High issue on #203). Behaviour is unchanged; 13 DOC-02 tests pass.

@codacy-production

codacy-production Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics -5 complexity · 0 duplication

Metric Results
Complexity -5
Duplication 0

View in Codacy

🟢 Coverage 100.00% diff coverage · +0.00% coverage variation

Metric Results
Coverage variation ✅ +0.00% coverage variation (-1.00%)
Diff coverage ✅ 100.00% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (c97435f) 22793 14520 63.70%
Head commit (65373e6) 22796 (+3) 14523 (+3) 63.71% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#206) 9 9 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

✅ No blocking issues noticed

No blocking findings were identified. The default-branch refactor is a medium-severity suggestion to satisfy static analysis more explicitly while preserving behavior.

Test suggestions

  • Verify recognized Standard, Framework, and Core prose versions still produce the same results.
  • Verify an unrecognized kind still follows the existing normalized-version fallback behavior.
  • Verify the explicit default branch is executed without changing the returned result.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify recognized Standard, Framework, and Core prose versions still produce the same results.
2. Verify an unrecognized kind still follows the existing normalized-version fallback behavior.
3. Verify the explicit default branch is executed without changing the returned result.

TIP Add a Jira or Linear ticket key to the branch or title so the reviewer can check the PR against it. Using another tracker? Tell us.
TIP How was this review? Give us feedback

Comment on lines +260 to +261
default:
break;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 MEDIUM RISK

Suggestion: Refactor the fallback normalization and major-version logic into the default branch and return its result there, removing the now-unreachable code after the switch.

See Issue in Codacy

TIP React 👍 if this review is right, or reply with what's wrong and how it could be better to help improve the reviewer.

@davidnmbond
davidnmbond merged commit 0a37030 into main Nov 13, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant