MCPcopy Create free account
hub / github.com/getsentry/XcodeBuildMCP / parseXcresultFailureMessage

Function parseXcresultFailureMessage

src/utils/xcresult-test-failures.ts:129–143  ·  view source on GitHub ↗
(raw: string)

Source from the content-addressed store, hash-verified

127}
128
129export function parseXcresultFailureMessage(raw: string): { message: string; location?: string } {
130 const [firstLine = '', ...continuationLines] = raw.split(/\r?\n/u);
131 const match = firstLine.match(/^(.+?):(\d+):\s*(.*)$/u);
132 if (match) {
133 const message = [match[3], ...continuationLines]
134 .join('\n')
135 .replace(/^failed\s*-\s*/u, '')
136 .replace(/:\s+(?=\/\/)/u, '\n');
137 return {
138 location: match[2] === '0' ? undefined : `${match[1]}:${match[2]}`,
139 message,
140 };
141 }
142 return { message: raw };
143}

Callers 2

walkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected