(summary)
| 44 | } |
| 45 | |
| 46 | function renderDeductions(summary) { |
| 47 | if (!summary.deductions || summary.deductions.length === 0) { |
| 48 | return "<p>No deductions were applied.</p>"; |
| 49 | } |
| 50 | |
| 51 | return `<ul>${summary.deductions |
| 52 | .map( |
| 53 | (entry) => |
| 54 | `<li><strong>-${escapeHtml(entry.penalty)} points</strong> <code>${escapeHtml(entry.id)}</code> [${escapeHtml(entry.status)}/${escapeHtml(entry.severity)}] ${escapeHtml(entry.message)}</li>`, |
| 55 | ) |
| 56 | .join("")}</ul>`; |
| 57 | } |
| 58 | |
| 59 | function renderCategoryDeductions(summary) { |
| 60 | if (!summary.categoryDeductions || summary.categoryDeductions.length === 0) { |
no test coverage detected