microsoft / tfs-cli
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 359 units with 5,733 lines of code in units (79.7% of code).
    • 7 very long units (1,242 lines of code)
    • 11 long units (776 lines of code)
    • 52 medium size units (1,649 lines of code)
    • 71 small units (1,070 lines of code)
    • 218 very small units (996 lines of code)
21% | 13% | 28% | 18% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts21% | 13% | 28% | 18% | 17%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
app/exec/extension/_lib35% | 15% | 26% | 10% | 12%
app/exec/extension30% | 11% | 18% | 20% | 18%
app/lib7% | 14% | 35% | 25% | 17%
app/exec/build/tasks0% | 29% | 23% | 28% | 18%
app/exec/workitem0% | 0% | 56% | 18% | 24%
app/exec/build0% | 0% | 47% | 30% | 22%
app/exec0% | 0% | 39% | 11% | 49%
app/exec/extension/resources0% | 0% | 0% | 65% | 34%
app0% | 0% | 0% | 57% | 42%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public processKey()
in app/exec/extension/_lib/vsix-manifest-builder.ts
275 70 3
private genContentTypesXml()
in app/exec/extension/_lib/vsix-manifest-builder.ts
238 40 1
public async exec()
in app/exec/extension/init.ts
226 25 0
public async merge()
in app/exec/extension/_lib/merger.ts
147 26 0
public async writeVsix()
in app/exec/extension/_lib/vsix-writer.ts
130 24 0
protected setCommandArgs()
in app/exec/extension/default.ts
117 1 0
public async getHelp()
in app/lib/tfcommand.ts
109 12 1
public processKey()
in app/exec/extension/_lib/targets/Microsoft.VisualStudio.Services/vso-manifest-builder.ts
93 46 3
public async exec()
in app/exec/build/tasks/create.ts
92 10 0
protected setCommandArgs()
in app/lib/tfcommand.ts
90 1 0
protected getMergeSettings()
in app/exec/extension/default.ts
73 14 0
protected addFile()
in app/exec/extension/_lib/manifest.ts
68 24 2
protected initialize()
in app/lib/tfcommand.ts
66 11 0
export function getExtInfo()
in app/exec/extension/_lib/extensioninfo.ts
61 11 4
protected setCommandArgs()
in app/exec/extension/init.ts
61 1 0
public publish()
in app/exec/extension/_lib/publish.ts
58 9 0
protected getCredentials()
in app/lib/tfcommand.ts
58 12 2
public static GetComposer()
in app/exec/extension/_lib/extension-composer-factory.ts
56 11 2
private addResourceStrings()
in app/exec/extension/_lib/vsix-writer.ts
50 7 1
public finalize()
in app/exec/extension/_lib/vsix-manifest-builder.ts
49 8 3