bazelbuild / rules_nodejs
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 544 units with 8,360 lines of code in units (33.7% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (143 lines of code)
    • 36 medium complex units (2,220 lines of code)
    • 78 simple units (2,068 lines of code)
    • 428 very simple units (3,929 lines of code)
0% | 1% | 26% | 24% | 46%
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
js0% | 2% | 28% | 21% | 47%
ts0% | 1% | 26% | 26% | 45%
go0% | 0% | 16% | 28% | 55%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
internal/linker0% | 15% | 24% | 15% | 43%
packages/concatjs0% | 0% | 32% | 22% | 44%
internal/npm_install0% | 0% | 22% | 25% | 51%
internal/node0% | 0% | 34% | 40% | 25%
packages/create0% | 0% | 63% | 0% | 36%
internal/pkg_npm0% | 0% | 53% | 0% | 46%
packages/jasmine0% | 0% | 74% | 0% | 25%
packages/rollup0% | 0% | 50% | 0% | 49%
packages/terser0% | 0% | 28% | 35% | 35%
packages/esbuild0% | 0% | 54% | 0% | 45%
internal/runfiles0% | 0% | 20% | 36% | 42%
packages/runfiles0% | 0% | 22% | 35% | 42%
packages/worker0% | 0% | 0% | 47% | 52%
internal/coverage0% | 0% | 0% | 95% | 4%
packages/typescript0% | 0% | 0% | 46% | 53%
packages/node-patches0% | 0% | 0% | 49% | 50%
internal/generated_file_test0% | 0% | 0% | 76% | 23%
scripts0% | 0% | 0% | 0% | 100%
internal/pkg_web0% | 0% | 0% | 0% | 100%
packages/protractor0% | 0% | 0% | 0% | 100%
packages/cypress0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
async function linkModules()
in internal/linker/link_node_modules.ts
68 27 2
function linkModules()
in internal/linker/index.js
75 27 2
async function generatePackageBuildFiles()
in internal/npm_install/index.js
74 25 1
function()
in internal/node/require_patch.js
116 25 4
disableStrictDeps: isUndefined()
in packages/concatjs/internal/tsc_wrapped/tsconfig.ts
64 24 1
async function generatePackageBuildFiles()
in internal/npm_install/generate_build_file.ts
69 23 1
suppressTsconfigOverrideWarnings: isUndefined()
in packages/concatjs/internal/tsc_wrapped/tsconfig.ts
61 23 1
tsickle: isUndefined()
in packages/concatjs/internal/tsc_wrapped/tsconfig.ts
58 22 1
export async function main()
in internal/linker/link_node_modules.ts
85 21 2
function main()
in internal/linker/index.js
90 21 2
googmodule: isUndefined()
in packages/concatjs/internal/tsc_wrapped/tsconfig.ts
55 21 1
devmodeTargetOverride: isUndefined()
in packages/concatjs/internal/tsc_wrapped/tsconfig.ts
52 20 1
export async function createProgramAndEmit()
in packages/concatjs/internal/tsc_wrapped/tsc_wrapped.ts
104 19 5
function main()
in internal/pkg_npm/packager.js
79 17 1
function printPackageLegacy()
in internal/npm_install/generate_build_file.ts
99 17 1
function printPackageLegacy()
in internal/npm_install/index.js
90 17 1
async function main()
in packages/jasmine/jasmine_runner.js
76 16 1
function isBlackListed()
in packages/concatjs/internal/tsetse/rules/check_return_value_rule.ts
50 16 2
func main()
in packages/concatjs/devserver/main.go
73 15 0
function isAllowlistedNamedDeclaration()
in packages/concatjs/internal/tsetse/util/ast_tools.ts
15 15 1