MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / deadCodeHeadline

Function deadCodeHeadline

ui/src/lib/deadcode-model.ts:35–44  ·  view source on GitHub ↗
(payload: WireDeadCode | null)

Source from the content-addressed store, hash-verified

33
34/** The one-line summary above the list. */
35export function deadCodeHeadline(payload: WireDeadCode | null): string {
36 if (!payload) return '';
37 const { rows } = payload;
38 if (rows.total === 0) return 'Nothing on this list.';
39 const lines = payload.groups.reduce((sum, group) => sum + group.lines, 0);
40 const shown = rows.truncated
41 ? `${rows.shown} of ${rows.total} ${noun(rows.total, 'symbol')}`
42 : plural(rows.total, 'symbol');
43 return `${shown} in ${plural(payload.groups.length, 'file')} · ${plural(lines, 'line')}`;
44}
45
46/**
47 * "2 478 of 2 498 candidates were left off" — the number that gives the list

Callers

nothing calls this directly

Calls 2

pluralFunction · 0.90
nounFunction · 0.85

Tested by

no test coverage detected