Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion scripts/test-method-content-integrity.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const localeDirs = readdirSync("src/data/method", { withFileTypes: true })
.filter((entry) => entry.isDirectory())
.map((entry) => entry.name);
const findings = [];
const warnings = [];
const lifecycleStages = new Set(["strategy", "architecture", "design", "delivery", "publishing", "improving"]);

function collectMatchingStringValues(node, pattern, results = new Set()) {
Expand Down Expand Up @@ -93,7 +94,7 @@ for (const station of stationGroups) {
}

if (seenResources.has(resourceId)) {
findings.push(
warnings.push(
`Station ${station.id} contains duplicate resource reference "${resourceId}" at indexes ${seenResources.get(resourceId)} and ${index}.`
);
} else {
Expand Down Expand Up @@ -236,4 +237,11 @@ if (findings.length > 0) {
process.exit(1);
}

if (warnings.length > 0) {
console.log("Method content validation warnings:");
for (const warning of warnings) {
console.log(`- ${warning}`);
}
}

console.log("Method content validation passed.");
Loading