( events: CompilerWarningRenderItem[], options?: DiagnosticFormattingOptions, )
| 496 | } |
| 497 | |
| 498 | export function formatGroupedWarnings( |
| 499 | events: CompilerWarningRenderItem[], |
| 500 | options?: DiagnosticFormattingOptions, |
| 501 | ): string { |
| 502 | const heading = `Warnings (${events.length}):`; |
| 503 | const lines = [heading, '']; |
| 504 | |
| 505 | for (const event of events) { |
| 506 | lines.push(formatHumanCompilerWarningEvent(event, options)); |
| 507 | lines.push(''); |
| 508 | } |
| 509 | |
| 510 | while (lines.at(-1) === '') { |
| 511 | lines.pop(); |
| 512 | } |
| 513 | |
| 514 | return lines.join('\n'); |
| 515 | } |
| 516 | |
| 517 | export function formatHumanCompilerErrorEvent( |
| 518 | event: CompilerErrorRenderItem, |
no test coverage detected