bazelbuild / vscode-bazel
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 145 units with 2,041 lines of code in units (51.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (89 lines of code)
    • 8 simple units (219 lines of code)
    • 135 very simple units (1,733 lines of code)
0% | 0% | 4% | 10% | 84%
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% | 0% | 4% | 10% | 84%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
bazel0% | 0% | 19% | 17% | 62%
debug-adapter0% | 0% | 0% | 8% | 91%
workspace-tree0% | 0% | 0% | 13% | 86%
completion-provider0% | 0% | 0% | 37% | 62%
buildifier0% | 0% | 0% | 8% | 91%
extension0% | 0% | 0% | 0% | 100%
codelens0% | 0% | 0% | 0% | 100%
symbols0% | 0% | 0% | 0% | 100%
definition0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export function parseExitCode()
in src/bazel/bazel_exit_code.ts
44 20 2
export function exitCodeToUserString()
in src/bazel/bazel_exit_code.ts
45 18 1
export function getBuildifierFileType()
in src/buildifier/buildifier.ts
25 10 1
24 8 1
export function getBazelRuleIcon()
in src/workspace-tree/icons.ts
22 7 1
40 7 2
public getChildren()
in src/workspace-tree/bazel_workspace_tree_provider.ts
16 6 1
public provideCompletionItems()
in src/completion-provider/bazel_completion_provider.ts
33 6 2
constructor()
in src/bazel/query_location.ts
17 6 1
protected async variablesRequest()
in src/debug-adapter/client.ts
42 6 2
export function checkBuildifierIsAvailable()
in src/buildifier/buildifier_availability.ts
27 5 0
export async function buildifierLint()
in src/buildifier/buildifier.ts
35 5 3
export async function buildifierLint()
in src/buildifier/buildifier.ts
30 5 3
export async function buildifierLint()
in src/buildifier/buildifier.ts
25 5 3
private consumeChunk()
in src/debug-adapter/connection.ts
23 5 1
protected async stackTraceRequest()
in src/debug-adapter/client.ts
31 5 2
constructor()
in src/buildifier/buildifier_diagnostics_manager.ts
21 4 0
function executeBuildifier()
in src/buildifier/buildifier.ts
28 4 3
function shouldTreatBuildifierErrorAsSuccess()
in src/buildifier/buildifier.ts
12 4 1
public async provideDefinition()
in src/definition/bazel_goto_definition_provider.ts
28 4 3