microsoft / vscode-pull-request-github
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 965 units with 15,964 lines of code in units (64.4% of code).
    • 1 very complex units (636 lines of code)
    • 4 complex units (500 lines of code)
    • 48 medium complex units (2,846 lines of code)
    • 97 simple units (3,248 lines of code)
    • 815 very simple units (8,734 lines of code)
3% | 3% | 17% | 20% | 54%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
ts4% | 3% | 17% | 20% | 54%
tsx0% | 0% | 35% | 10% | 54%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src59% | 0% | 12% | 0% | 27%
src/view0% | 6% | 21% | 20% | 51%
src/github0% | 2% | 14% | 21% | 61%
src/issues0% | 4% | 24% | 29% | 41%
webviews/components0% | 0% | 42% | 12% | 45%
src/common0% | 0% | 14% | 20% | 65%
src/gitProviders0% | 0% | 0% | 27% | 72%
src/authentication0% | 0% | 0% | 57% | 42%
webviews/common0% | 0% | 0% | 0% | 100%
webviews/createPullRequestView0% | 0% | 0% | 0% | 100%
src/integrations0% | 0% | 0% | 0% | 100%
src/env0% | 0% | 0% | 0% | 100%
scripts0% | 0% | 0% | 0% | 100%
src/api0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
636 82 7
provideCompletionItems: async()
in src/github/folderRepositoryManager.ts
154 37 3
async provideCompletionItems()
in src/issues/issueCompletionProvider.ts
112 32 4
private async provideDocumentContent()
in src/view/treeNodes/pullRequestNode.ts
100 31 1
private async validateState()
in src/view/reviewManager.ts
134 27 2
async function init()
in src/extension.ts
131 21 7
protected async _onDidReceiveMessage()
in src/github/pullRequestOverview.ts
46 21 1
private async deleteBranch()
in src/github/pullRequestOverview.ts
102 19 1
async provideCompletionItems()
in src/issues/userCompletionProvider.ts
68 19 4
79 19 3
private async deleteBranch()
in src/github/activityBarViewProvider.ts
105 18 1
private setMilestones()
in src/issues/stateManager.ts
49 18 1
export function AddComment()
in webviews/components/comment.tsx
115 18 7
private async create()
in src/github/createPRViewProvider.ts
64 17 1
private async getBranchDeletionItems()
in src/github/folderRepositoryManager.ts
78 17 0
async findUpstreamForItem()
in src/github/folderRepositoryManager.ts
46 17 1
29 17 4
private registerListeners()
in src/view/reviewManager.ts
51 17 0
public async publishBranch()
in src/view/reviewManager.ts
88 17 1
async createPullRequest()
in src/github/folderRepositoryManager.ts
64 16 1