microsoft / tfs-cli
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 359 units with 5,733 lines of code in units (79.7% of code).
    • 1 very complex units (275 lines of code)
    • 3 complex units (478 lines of code)
    • 15 medium complex units (1,068 lines of code)
    • 27 simple units (911 lines of code)
    • 313 very simple units (3,001 lines of code)
4% | 8% | 18% | 15% | 52%
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% | 8% | 18% | 15% | 52%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
app/exec/extension/_lib12% | 21% | 18% | 17% | 29%
app/lib0% | 0% | 24% | 20% | 55%
app/exec/extension0% | 0% | 26% | 3% | 69%
app/exec/build/tasks0% | 0% | 0% | 29% | 70%
app/exec0% | 0% | 0% | 24% | 75%
app/exec/workitem0% | 0% | 0% | 18% | 81%
app/exec/build0% | 0% | 0% | 8% | 91%
app/exec/extension/resources0% | 0% | 0% | 0% | 100%
app0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public processKey()
in app/exec/extension/_lib/vsix-manifest-builder.ts
275 70 3
public processKey()
in app/exec/extension/_lib/targets/Microsoft.VisualStudio.Services/vso-manifest-builder.ts
93 46 3
private genContentTypesXml()
in app/exec/extension/_lib/vsix-manifest-builder.ts
238 40 1
public async merge()
in app/exec/extension/_lib/merger.ts
147 26 0
public async exec()
in app/exec/extension/init.ts
226 25 0
protected addFile()
in app/exec/extension/_lib/manifest.ts
68 24 2
public async writeVsix()
in app/exec/extension/_lib/vsix-writer.ts
130 24 0
protected getMergeSettings()
in app/exec/extension/default.ts
73 14 0
private confirmPath()
in app/lib/outputs.ts
48 14 2
protected initialize()
in app/lib/arguments.ts
39 13 0
public validate()
in app/exec/extension/_lib/targets/Microsoft.VisualStudio.Services/composer.ts
36 12 1
protected getCredentials()
in app/lib/tfcommand.ts
58 12 2
public async getHelp()
in app/lib/tfcommand.ts
109 12 1
public static GetComposer()
in app/exec/extension/_lib/extension-composer-factory.ts
56 11 2
export function getExtInfo()
in app/exec/extension/_lib/extensioninfo.ts
61 11 4
private _getLocResult()
in app/exec/extension/_lib/manifest.ts
33 11 4
public getLocKeyPath()
in app/exec/extension/_lib/targets/Microsoft.VisualStudio.Services/vso-manifest-builder.ts
27 11 1
export function httpErr()
in app/lib/errorhandler.ts
38 11 1
protected initialize()
in app/lib/tfcommand.ts
66 11 0
public async exec()
in app/exec/build/tasks/create.ts
92 10 0