MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / normalizeDiagnosticEntries

Function normalizeDiagnosticEntries

src/utils/diagnostics.ts:18–28  ·  view source on GitHub ↗
(inputs: readonly DiagnosticInput[] = [])

Source from the content-addressed store, hash-verified

16}
17
18function normalizeDiagnosticEntries(inputs: readonly DiagnosticInput[] = []): DiagnosticEntry[] {
19 return inputs.flatMap((input) => {
20 if (typeof input === 'string') {
21 const message = normalizeDiagnosticMessage(input);
22 return isNonEmptyText(message) ? [{ message }] : [];
23 }
24
25 const message = normalizeDiagnosticMessage(input.message);
26 return isNonEmptyText(message) ? [{ ...input, message }] : [];
27 });
28}
29
30export function nonEmptyLines(text: string): string[] {
31 return text.split(/\r?\n/).filter(isNonEmptyText);

Callers 1

createBasicDiagnosticsFunction · 0.85

Calls 2

isNonEmptyTextFunction · 0.85

Tested by

no test coverage detected