angular / dev-infra
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 561 units with 6,577 lines of code in units (55.0% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (89 lines of code)
    • 11 medium complex units (549 lines of code)
    • 29 simple units (938 lines of code)
    • 520 very simple units (5,001 lines of code)
0% | 1% | 8% | 14% | 76%
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% | 8% | 14% | 75%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ng-dev/commit-message0% | 25% | 9% | 13% | 51%
ng-dev/pr0% | 0% | 36% | 14% | 48%
ng-dev/release0% | 0% | 6% | 8% | 84%
ng-dev/ts-circular-dependencies0% | 0% | 0% | 41% | 58%
ng-dev/format0% | 0% | 0% | 45% | 54%
ng-dev/pullapprove0% | 0% | 0% | 38% | 61%
ng-dev/caretaker0% | 0% | 0% | 17% | 82%
github-actions/lock-closed0% | 0% | 0% | 76% | 23%
bazel/api-golden0% | 0% | 0% | 46% | 53%
github-actions/commit-message-based-labels0% | 0% | 0% | 92% | 7%
bazel/http-server0% | 0% | 0% | 35% | 64%
ng-dev/utils0% | 0% | 0% | 2% | 97%
github-actions/slash-commands0% | 0% | 0% | 10% | 89%
tslint-rules0% | 0% | 0% | 13% | 86%
github-actions/feature-request0% | 0% | 0% | 3% | 96%
bazel/browsers0% | 0% | 0% | 0% | 100%
bazel/benchmark0% | 0% | 0% | 0% | 100%
ng-dev/misc0% | 0% | 0% | 0% | 100%
tools/local-actions0% | 0% | 0% | 0% | 100%
github-actions0% | 0% | 0% | 0% | 100%
ng-dev/ngbot0% | 0% | 0% | 0% | 100%
ng-dev/ci0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function validateCommitAndCollectErrors()
in ng-dev/commit-message/validate.ts
89 26 0
async merge()
in ng-dev/pr/merge/task.ts
62 17 2
export async function printActiveReleaseTrains()
in ng-dev/release/versioning/print-active-trains.ts
48 16 2
function normalizeGithubCheckState()
in ng-dev/pr/common/fetch-pull-request.ts
25 16 2
override async merge()
in ng-dev/pr/merge/strategies/api-merge.ts
62 16 1
async function handler()
in ng-dev/release/set-dist-tag/cli.ts
41 14 1
export async function discoverNewConflictsForPr()
in ng-dev/pr/discover-new-conflicts/index.ts
76 14 2
export async function rebasePr()
in ng-dev/pr/rebase/index.ts
77 14 2
export function assertValidReleaseConfig()
in ng-dev/release/config/index.ts
37 13 1
function parseInternal()
in ng-dev/commit-message/parse.ts
35 12 1
export function assertChangesAllowForTargetLabel()
in ng-dev/pr/common/validation/validations.ts
38 12 4
async function handleMergeResult()
in ng-dev/pr/merge/index.ts
48 12 2
export function main()
in ng-dev/ts-circular-dependencies/index.ts
71 10 3
async run()
in ng-dev/release/publish/index.ts
39 10 0
export async function assertActiveLtsBranch()
in ng-dev/pr/common/targeting/lts-branch.ts
39 10 3
function isIssue()
in github-actions/feature-request/src/octokit.ts
14 10 1
async function run()
in github-actions/lock-closed/lib/main.ts
62 10 0
private _bazelMiddleware()
in bazel/http-server/server.ts
33 10 2
private _resolveFileSpecifier()
in ng-dev/ts-circular-dependencies/analyzer.ts
19 9 2
async function isPullRequestClosedWithAssociatedCommit()
in ng-dev/release/publish/pull-request-state.ts
23 8 2