microsoft / vscode-extension-samples
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 601 units with 7,336 lines of code in units (71.3% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (116 lines of code)
    • 13 medium complex units (934 lines of code)
    • 32 simple units (872 lines of code)
    • 555 very simple units (5,414 lines of code)
0% | 1% | 12% | 11% | 73%
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
ts0% | 1% | 12% | 12% | 73%
js0% | 0% | 14% | 9% | 76%
tsx0% | 0% | 0% | 0% | 100%
rs0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
configuration-sample0% | 100% | 0% | 0% | 0%
lsp-embedded-request-forwarding0% | 0% | 52% | 0% | 47%
lsp-embedded-language-service0% | 0% | 36% | 21% | 42%
terminal-sample0% | 0% | 80% | 8% | 11%
comment-sample0% | 0% | 91% | 0% | 8%
test-provider-sample0% | 0% | 38% | 0% | 61%
quickinput-sample0% | 0% | 21% | 28% | 50%
custom-editor-sample0% | 0% | 9% | 6% | 84%
task-provider-sample0% | 0% | 30% | 0% | 69%
source-control-sample0% | 0% | 8% | 33% | 57%
vim-sample0% | 0% | 0% | 18% | 81%
tree-view-sample0% | 0% | 0% | 9% | 90%
lsp-multi-server-sample0% | 0% | 0% | 46% | 54%
fsconsumer-sample0% | 0% | 0% | 77% | 22%
fsprovider-sample0% | 0% | 0% | 16% | 83%
authenticationprovider-sample0% | 0% | 0% | 18% | 81%
extension-terminal-sample0% | 0% | 0% | 32% | 68%
nodefs-provider-sample0% | 0% | 0% | 10% | 89%
contentprovider-sample0% | 0% | 0% | 11% | 88%
lsp-web-extension-sample0% | 0% | 0% | 20% | 80%
basic-multi-root-sample0% | 0% | 0% | 50% | 50%
webview-codicons-sample0% | 0% | 0% | 0% | 100%
webview-sample0% | 0% | 0% | 0% | 100%
webview-view-sample0% | 0% | 0% | 0% | 100%
lsp-log-streaming-sample0% | 0% | 0% | 0% | 100%
code-actions-sample0% | 0% | 0% | 0% | 100%
call-hierarchy-sample0% | 0% | 0% | 0% | 100%
lsp-sample0% | 0% | 0% | 0% | 100%
decorator-sample0% | 0% | 0% | 0% | 100%
inline-completions0% | 0% | 0% | 0% | 100%
semantic-tokens-sample0% | 0% | 0% | 0% | 100%
codelens-sample0% | 0% | 0% | 0% | 100%
i18n-sample0% | 0% | 0% | 0% | 100%
lsp-user-input-sample0% | 0% | 0% | 0% | 100%
notebook-renderer-sample0% | 0% | 0% | 0% | 100%
completions-sample0% | 0% | 0% | 0% | 100%
github-authentication-sample0% | 0% | 0% | 0% | 100%
diagnostic-related-information-sample0% | 0% | 0% | 0% | 100%
virtual-document-sample0% | 0% | 0% | 0% | 100%
progress-sample0% | 0% | 0% | 0% | 100%
statusbar-sample0% | 0% | 0% | 0% | 100%
getting-started-sample0% | 0% | 0% | 0% | 100%
product-icon-theme-sample0% | 0% | 0% | 0% | 100%
notebook-renderer-react-sample0% | 0% | 0% | 0% | 100%
document-editing-sample0% | 0% | 0% | 0% | 100%
webpack-sample0% | 0% | 0% | 0% | 100%
uri-handler-sample0% | 0% | 0% | 0% | 100%
welcome-view-content-sample0% | 0% | 0% | 0% | 100%
helloworld-minimal-sample0% | 0% | 0% | 0% | 100%
helloworld-web-sample0% | 0% | 0% | 0% | 100%
helloworld-sample0% | 0% | 0% | 0% | 100%
proposed-api-sample0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export function activate()
in configuration-sample/src/extension.ts
116 27 1
async function selectWorkspaceFolder()
in source-control-sample/src/extension.ts
49 20 2
export function getCSSVirtualContent()
in lsp-embedded-request-forwarding/client/src/embeddedSupport.ts
89 19 2
export function getDocumentRegions()
in lsp-embedded-request-forwarding/client/src/embeddedSupport.ts
87 18 2
async function getRakeTasks()
in task-provider-sample/src/rakeTaskProvider.ts
61 18 0
export function activate()
in terminal-sample/src/extension.ts
155 18 1
export function getDocumentRegions()
in lsp-embedded-language-service/server/src/embeddedSupport.ts
65 16 2
export async function activate()
in test-provider-sample/src/extension.ts
80 16 1
async function pickFile()
in quickinput-sample/src/quickOpen.ts
64 13 0
export function getLanguageModelCache()
in lsp-embedded-language-service/server/src/languageModelCache.ts
50 12 3
export function activate()
in comment-sample/src/extension.ts
89 11 1
_initElements()
in custom-editor-sample/media/pawDraw.js
61 11 1
function getLanguageRanges()
in lsp-embedded-language-service/server/src/embeddedSupport.ts
40 11 3
function getLanguageRanges()
in lsp-embedded-request-forwarding/client/src/embeddedSupport.ts
44 11 3
async showInputBox()
in quickinput-sample/src/multiStepInput.ts
58 10 8
private _findMapping()
in vim-sample/src/controller.ts
59 10 3
public static findNextWord()
in vim-sample/src/words.ts
28 10 3
export async function activate()
in source-control-sample/src/extension.ts
55 9 1
export async function downloadFiddle()
in source-control-sample/src/fiddleRepository.ts
24 9 2
export function getLanguageModes()
in lsp-embedded-language-service/server/src/languageModes.ts
68 8 0