(finding: (typeof result.findings)[0])
| 32 | if (result.findings.length === 0) continue; |
| 33 | |
| 34 | const format = (finding: (typeof result.findings)[0]) => { |
| 35 | if (!verbose && finding.severity === "info") return; |
| 36 | const prefix = |
| 37 | finding.severity === "error" |
| 38 | ? c.error("✗") |
| 39 | : finding.severity === "warning" |
| 40 | ? c.warn("⚠") |
| 41 | : c.dim("ℹ"); |
| 42 | const fileLabel = multiFile ? c.dim(`[${file}] `) : ""; |
| 43 | const loc = |
| 44 | showElementId && finding.elementId ? ` ${c.accent(`[${finding.elementId}]`)}` : ""; |
| 45 | lines.push(` ${prefix} ${fileLabel}${c.bold(finding.code)}${loc}: ${finding.message}`); |
| 46 | if (finding.fixHint) lines.push(` ${c.dim(`Fix: ${finding.fixHint}`)}`); |
| 47 | }; |
| 48 | |
| 49 | if (errorsFirst) { |
| 50 | for (const f of result.findings) if (f.severity === "error") format(f); |
no test coverage detected