MCPcopy Index your code
hub / github.com/angular/angular / formatDiagnostics

Method formatDiagnostics

packages/localize/tools/src/diagnostics.ts:39–51  ·  view source on GitHub ↗
(message: string)

Source from the content-addressed store, hash-verified

37 this.messages.push(...other.messages);
38 }
39 formatDiagnostics(message: string): string {
40 const errors = this.messages.filter((d) => d.type === 'error').map((d) => ' - ' + d.message);
41 const warnings = this.messages
42 .filter((d) => d.type === 'warning')
43 .map((d) => ' - ' + d.message);
44 if (errors.length) {
45 message += '\nERRORS:\n' + errors.join('\n');
46 }
47 if (warnings.length) {
48 message += '\nWARNINGS:\n' + warnings.join('\n');
49 }
50 return message;
51 }
52}

Callers 4

extractTranslationsFunction · 0.80
loadBundleMethod · 0.80
expectNoDiagnosticsFunction · 0.80

Calls 3

mapMethod · 0.80
joinMethod · 0.65
filterMethod · 0.45

Tested by

no test coverage detected