MCPcopy Index your code
hub / github.com/code-pushup/cli / logReport

Function logReport

packages/plugin-jsdocs/src/lib/runner/utils.ts:97–126  ·  view source on GitHub ↗
(report: Record<CoverageType, FileCoverage[]>)

Source from the content-addressed store, hash-verified

95}
96
97export function logReport(report: Record<CoverageType, FileCoverage[]>): void {
98 const typesCount = Object.keys(report).length;
99 logger.info(
100 `Collected documentation coverage for ${pluralizeToken('type', typesCount)} of ${pluralize('entity', typesCount)}`,
101 );
102 if (!logger.isVerbose()) {
103 return;
104 }
105
106 logger.debug(
107 formatAsciiTable({
108 columns: [
109 { key: 'type', label: 'Entity', align: 'left' },
110 { key: 'covered', label: 'Hits', align: 'right' },
111 { key: 'total', label: 'Found', align: 'right' },
112 { key: 'coverage', label: 'Coverage', align: 'right' },
113 ],
114 rows: objectToEntries(report)
115 .map(([type, files]) => {
116 const stats = aggregateCoverageStats(files);
117 return {
118 ...stats,
119 type: capitalize(type),
120 coverage: formatCoveragePercentage(stats),
121 };
122 })
123 .toSorted((a, b) => b.total - a.total),
124 }),
125 );
126}

Callers 1

processJsDocsFunction · 0.90

Calls 10

pluralizeTokenFunction · 0.90
pluralizeFunction · 0.90
formatAsciiTableFunction · 0.90
objectToEntriesFunction · 0.90
aggregateCoverageStatsFunction · 0.90
capitalizeFunction · 0.90
formatCoveragePercentageFunction · 0.90
infoMethod · 0.80
isVerboseMethod · 0.80
debugMethod · 0.45

Tested by

no test coverage detected