Skip to content

docs: fix incorrect 'cyclomatic' label in UnifiedFunctionMetrics JSDoc#293

Merged
askpt merged 1 commit into
mainfrom
repo-assist/improve-fix-cyclomatic-typo-61406a613438d361
May 12, 2026
Merged

docs: fix incorrect 'cyclomatic' label in UnifiedFunctionMetrics JSDoc#293
askpt merged 1 commit into
mainfrom
repo-assist/improve-fix-cyclomatic-typo-61406a613438d361

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

🤖 This PR was created by Repo Assist, an automated AI assistant.

Summary

Fixes a documentation inaccuracy: the complexity field in UnifiedFunctionMetrics was documented as "cyclomatic complexity score" but this extension calculates cognitive complexity per the SonarSource specification.

Change

File: src/metricsAnalyzer/metricsAnalyzerFactory.ts

- /** The total cyclomatic complexity score for this function */
+ /** The total cognitive complexity score for this function */

Why it matters

The JSDoc is the main reference developers see when working with the UnifiedFunctionMetrics type. Using the wrong metric name ("cyclomatic" instead of "cognitive") would confuse anyone extending or integrating the extension.

Test Status

  • npm run compile — no errors
  • npm run lint — no warnings
  • ⚠️ npm 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.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "releaseassets.githubusercontent.com"

See Network Configuration for more information.

Generated by 🌈 Repo Assist, see workflow run. Learn more.

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@94ec5db57374c5b04a4b8eef8b4413f9af44d63f

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 askpt changed the title [repo-assist] docs: fix incorrect 'cyclomatic' label in UnifiedFunctionMetrics JSDoc docs: fix incorrect 'cyclomatic' label in UnifiedFunctionMetrics JSDoc May 12, 2026
@askpt askpt marked this pull request as ready for review May 12, 2026 20:49
@askpt askpt self-requested a review as a code owner May 12, 2026 20:49
Copilot AI review requested due to automatic review settings May 12, 2026 20:49
@askpt askpt closed this May 12, 2026
@askpt askpt reopened this May 12, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.complexity field documentation from “cyclomatic” to “cognitive” complexity.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.24%. Comparing base (cbdbe51) to head (474dc58).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@askpt askpt merged commit 4ef92bb into main May 12, 2026
27 checks passed
@askpt askpt deleted the repo-assist/improve-fix-cyclomatic-typo-61406a613438d361 branch May 12, 2026 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants