angular / dev-infra
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 561 units with 6,577 lines of code in units (55.0% of code).
    • 0 very long units (0 lines of code)
    • 11 long units (731 lines of code)
    • 77 medium size units (2,235 lines of code)
    • 129 small units (1,863 lines of code)
    • 344 very small units (1,748 lines of code)
0% | 11% | 33% | 28% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 11% | 34% | 28% | 26%
js0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ng-dev/pr0% | 26% | 25% | 19% | 28%
ng-dev/commit-message0% | 25% | 38% | 16% | 20%
ng-dev/ts-circular-dependencies0% | 26% | 20% | 41% | 11%
ng-dev/pullapprove0% | 38% | 37% | 0% | 23%
github-actions/lock-closed0% | 76% | 0% | 16% | 7%
ng-dev/misc0% | 58% | 23% | 0% | 17%
ng-dev/format0% | 22% | 49% | 7% | 20%
ng-dev/caretaker0% | 13% | 35% | 27% | 23%
ng-dev/release0% | 0% | 43% | 28% | 28%
ng-dev/utils0% | 0% | 27% | 35% | 37%
github-actions/slash-commands0% | 0% | 55% | 38% | 5%
bazel/benchmark0% | 0% | 62% | 25% | 12%
bazel/browsers0% | 0% | 54% | 15% | 29%
bazel/api-golden0% | 0% | 75% | 16% | 8%
tools/local-actions0% | 0% | 52% | 15% | 31%
github-actions/commit-message-based-labels0% | 0% | 92% | 0% | 7%
bazel/http-server0% | 0% | 35% | 50% | 14%
github-actions/feature-request0% | 0% | 0% | 62% | 37%
tslint-rules0% | 0% | 0% | 72% | 27%
github-actions0% | 0% | 0% | 53% | 46%
ng-dev/ngbot0% | 0% | 0% | 65% | 35%
ng-dev/ci0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function validateCommitAndCollectErrors()
in ng-dev/commit-message/validate.ts
89 26 0
export async function rebasePr()
in ng-dev/pr/rebase/index.ts
77 14 2
export async function discoverNewConflictsForPr()
in ng-dev/pr/discover-new-conflicts/index.ts
76 14 2
export function main()
in ng-dev/ts-circular-dependencies/index.ts
71 10 3
export function verify()
in ng-dev/pullapprove/verify.ts
69 7 0
async merge()
in ng-dev/pr/merge/task.ts
62 17 2
override async merge()
in ng-dev/pr/merge/strategies/api-merge.ts
62 16 1
async function run()
in github-actions/lock-closed/lib/main.ts
62 10 0
async function handler()
in ng-dev/misc/update-yarn/cli.ts
60 4 0
52 7 1
export async function updateCaretakerTeamViaPrompt()
in ng-dev/caretaker/handoff/update-github-team.ts
51 6 0
async function _prepareBenchpressSetup()
in bazel/benchmark/driver-utilities/perf_util.ts
50 4 0
export async function printActiveReleaseTrains()
in ng-dev/release/versioning/print-active-trains.ts
48 16 2
async function handleMergeResult()
in ng-dev/pr/merge/index.ts
48 12 2
override async merge()
in ng-dev/pr/merge/strategies/autosquash-merge.ts
47 6 1
protected async verifyPassingGithubStatus()
in ng-dev/release/publish/actions.ts
42 5 1
async function handler()
in ng-dev/release/set-dist-tag/cli.ts
41 14 1
export async function getPendingPrs()
in ng-dev/utils/github.ts
40 3 2
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