auto-claude: subtask-2-2 - Add INFO-SUPPRESSED section to report output

- Added lineForSuppressedFinding() to format suppressed findings
- Added INFO-SUPPRESSED section showing suppressed findings with reason and date
- Suppressed findings are not counted in summary (already filtered)
- Follows existing code patterns for report sections

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
David Abutbul
2026-02-16 15:45:35 +02:00
parent 9685db79d3
commit 17c0af8d9b
@@ -116,6 +116,14 @@ function lineForFinding(f) {
return `- ${id} ${title}${fixLine ? `\n ${fixLine}` : ""}`;
}
function lineForSuppressedFinding(f) {
const id = f?.checkId ?? "(no-checkId)";
const title = f?.title ?? "(no-title)";
const reason = f?.suppressionReason ?? "(no reason)";
const date = f?.suppressedAt ?? "(no date)";
return `- ${id} ${title}\n Suppressed: ${reason} (${date})`;
}
function render({ audit, deep, label, suppressedFindings = [] }) {
const now = new Date().toISOString();
const a = pickFindings(audit);
@@ -163,6 +171,15 @@ function render({ audit, deep, label, suppressedFindings = [] }) {
for (const e of errors) lines.push(`- ${e}`);
}
// Show suppressed findings
if (suppressedFindings.length) {
lines.push("");
lines.push("INFO-SUPPRESSED:");
for (const f of suppressedFindings) {
lines.push(lineForSuppressedFinding(f));
}
}
return lines.join("\n");
}