7B: Add parse error tracking (BMad review fix)
This commit is contained in:
@@ -135,6 +135,7 @@ function extractContracts(filePath, relFile) {
|
|||||||
function extractAllContracts(subsystemMap, srcRoot) {
|
function extractAllContracts(subsystemMap, srcRoot) {
|
||||||
const allContracts = [];
|
const allContracts = [];
|
||||||
const bySubsystem = {};
|
const bySubsystem = {};
|
||||||
|
const parseErrors = [];
|
||||||
|
|
||||||
for (const sub of subsystemMap.subsystems) {
|
for (const sub of subsystemMap.subsystems) {
|
||||||
bySubsystem[sub.name] = [];
|
bySubsystem[sub.name] = [];
|
||||||
@@ -150,12 +151,12 @@ function extractAllContracts(subsystemMap, srcRoot) {
|
|||||||
allContracts.push(...contracts);
|
allContracts.push(...contracts);
|
||||||
bySubsystem[sub.name].push(...contracts);
|
bySubsystem[sub.name].push(...contracts);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// Skip files that fail to parse
|
parseErrors.push({ file: relFile, error: err.message });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return { contracts: allContracts, bySubsystem };
|
return { contracts: allContracts, bySubsystem, parseErrors };
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user