Skip to content

refactor: resolve SonarAnalyzer S3776/S1541 complexity warnings - #259

Merged
Yuta-K19418 merged 3 commits into
mainfrom
fix/resolve-sonaranalyzer-complexity-warnings
Jul 30, 2026
Merged

refactor: resolve SonarAnalyzer S3776/S1541 complexity warnings#259
Yuta-K19418 merged 3 commits into
mainfrom
fix/resolve-sonaranalyzer-complexity-warnings

Conversation

@Yuta-K19418

Copy link
Copy Markdown
Owner

Summary

  • Split flagged high-complexity methods across 20 files into smaller, single-responsibility helper methods to bring SonarAnalyzer S3776 (Cognitive Complexity) / S1541 (Cyclomatic Complexity) under threshold
  • Removed the corresponding grandfathered suppression blocks from .editorconfig
  • Pure refactor — no behavioral changes; recursive algorithm in KeyPathTraverser (owned by Unbounded recursion in KeyPathTraverser can crash on deeply nested JSON #253) left untouched
  • Added characterization tests for previously untested branches (MorphTableView/MorphTreeView OnKeyDown, FileDialogHandler.HandleFileSelectedAsync) before refactoring those methods

Test plan

  • dotnet build — 0 warnings, 0 errors
  • dotnet format --verify-no-changes — no diff
  • dotnet test — 1530/1530 passed
  • Independently reviewed by two reviewers confirming behavioral invariance across all 20 files

Closes #258

🤖 Generated with Claude Code

Yuta-K19418 and others added 3 commits July 29, 2026 18:12
…eeView

Locks current key-consumption semantics (vim navigation, gg/G sequence,
global-shortcut bubble-up, non-vim/non-global base fallback) before the
upcoming S1541 complexity refactor.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…Array/unsupported-extension branches

Locks the Csv, JsonArray, and detection-failure branches before the
upcoming S1541 complexity refactor of FileDialogHandler.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Split flagged high-complexity methods across 20 files into smaller
helper methods; removed the corresponding grandfathered suppression
blocks from .editorconfig. No behavioral changes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Yuta-K19418
Yuta-K19418 merged commit 6d62ca8 into main Jul 30, 2026
6 of 12 checks passed
@Yuta-K19418
Yuta-K19418 deleted the fix/resolve-sonaranalyzer-complexity-warnings branch July 30, 2026 04:40
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.

refactor: resolve grandfathered SonarAnalyzer complexity warnings (S3776/S1541)

1 participant