microsoft / azure-repos-pr-multi-cherry-pick
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 22 units with 487 lines of code in units (35.3% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (226 lines of code)
    • 4 medium size units (149 lines of code)
    • 2 small units (24 lines of code)
    • 13 very small units (88 lines of code)
0% | 46% | 30% | 4% | 18%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 50% | 32% | 0% | 16%
tsx0% | 38% | 26% | 14% | 20%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/services0% | 66% | 33% | 0% | 0%
src0% | 29% | 30% | 6% | 34%
src/Components0% | 0% | 0% | 44% | 56%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export async function CreatePullRequestAsync()
in src/services/cherryPickService.ts
88 8 5
export async function CherryPickCommitsAsync()
in src/services/cherryPickService.ts
75 13 3
public render()
in src/dialog.tsx
63 5 0
export async function GetAllBranchesAsync()
in src/services/gitBranchService.ts
44 6 1
43 9 2
export async function ValidateTargetBranchesAsync()
in src/services/cherryPickService.ts
39 5 3
execute: async()
in src/app.ts
23 1 1
13 1 0
public render()
in src/Components/summaryTable.tsx
11 1 0
10 1 1
10 4 1
dismiss()
in src/dialog.tsx
9 3 1
export function findIndex()
in src/utilities.ts
9 3 2
constructor()
in src/dialog.tsx
8 1 1
8 1 1
static newGuid()
in src/utilities.ts
7 2 0
constructor()
in src/Components/formView.tsx
6 1 1
export function trimStart()
in src/utilities.ts
6 2 2
componentWillReceiveProps()
in src/Components/formView.tsx
5 2 2
4 1 1