docs: fix incorrect 'cyclomatic' label in UnifiedFunctionMetrics JSDoc#293
Merged
askpt merged 1 commit intoMay 12, 2026
Merged
Conversation
The extension calculates cognitive complexity (per SonarSource spec), not cyclomatic complexity. The JSDoc comment on the `complexity` field of `UnifiedFunctionMetrics` mistakenly said 'cyclomatic'. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
askpt
approved these changes
May 12, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR corrects the JSDoc for UnifiedFunctionMetrics.complexity to accurately describe the metric produced by this VS Code extension (cognitive complexity per SonarSource), avoiding confusion for contributors and API consumers.
Changes:
- Update the
UnifiedFunctionMetrics.complexityfield documentation from “cyclomatic” to “cognitive” complexity.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #293 +/- ##
=======================================
Coverage 66.24% 66.24%
=======================================
Files 9 9
Lines 2604 2604
Branches 224 224
=======================================
Hits 1725 1725
Misses 878 878
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
🤖 This PR was created by Repo Assist, an automated AI assistant.
Summary
Fixes a documentation inaccuracy: the
complexityfield inUnifiedFunctionMetricswas documented as "cyclomatic complexity score" but this extension calculates cognitive complexity per the SonarSource specification.Change
File:
src/metricsAnalyzer/metricsAnalyzerFactory.tsWhy it matters
The JSDoc is the main reference developers see when working with the
UnifiedFunctionMetricstype. Using the wrong metric name ("cyclomatic" instead of "cognitive") would confuse anyone extending or integrating the extension.Test Status
npm run compile— no errorsnpm run lint— no warningsnpm test— requires VS Code download; not available in sandboxed CI (known infrastructure limitation)Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
releaseassets.githubusercontent.comSee Network Configuration for more information.