MCPcopy Create free account
hub / github.com/code-pushup/cli / formatIssueSeverities

Function formatIssueSeverities

packages/utils/src/lib/reports/formatting.ts:211–218  ·  view source on GitHub ↗
(
  issues: Pick<Issue, 'severity'>[],
)

Source from the content-addressed store, hash-verified

209 * @returns Formatted string like "3 errors, 5 warnings, 2 infos"
210 */
211export function formatIssueSeverities(
212 issues: Pick<Issue, 'severity'>[],
213): string {
214 const severityCounts = countOccurrences(
215 issues.map(({ severity }) => severity),
216 );
217 return formatSeverityCounts(severityCounts);
218}
219
220/**
221 * Wraps HTML tags in backticks to prevent markdown parsers

Callers 3

toAuditFunction · 0.90
toAuditOutputFunction · 0.90

Calls 2

countOccurrencesFunction · 0.85
formatSeverityCountsFunction · 0.85

Tested by

no test coverage detected