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

Function parseFailureDiagnostic

src/utils/xcodebuild-line-parsers.ts:118–131  ·  view source on GitHub ↗
(line: string)

Source from the content-addressed store, hash-verified

116}
117
118export function parseFailureDiagnostic(line: string): ParsedFailureDiagnostic | null {
119 const match = line.match(/^(.*?):(\d+): error: -\[(.+?)\s+(.+?)\] : (.+)$/u);
120 if (!match) {
121 return null;
122 }
123 const [, filePath, lineNumber, suiteName, testName, message] = match;
124 return {
125 rawTestName: `-[${suiteName} ${testName}]`,
126 suiteName: normalizeSuiteName(suiteName),
127 testName,
128 location: lineNumber === '0' ? undefined : `${filePath}:${lineNumber}`,
129 message: message.replace(/^failed\s*-\s*/u, ''),
130 };
131}
132
133export function parseDurationMs(durationText?: string): number | undefined {
134 if (!durationText) {

Callers 1

processLineFunction · 0.90

Calls 1

normalizeSuiteNameFunction · 0.85

Tested by

no test coverage detected