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) {
|
||||
const allContracts = [];
|
||||
const bySubsystem = {};
|
||||
const parseErrors = [];
|
||||
|
||||
for (const sub of subsystemMap.subsystems) {
|
||||
bySubsystem[sub.name] = [];
|
||||
@@ -150,12 +151,12 @@ function extractAllContracts(subsystemMap, srcRoot) {
|
||||
allContracts.push(...contracts);
|
||||
bySubsystem[sub.name].push(...contracts);
|
||||
} 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