From 4b1e5e25a25c6d80e9947a23dbba25875084465a Mon Sep 17 00:00:00 2001 From: Marjukka Niinioja Date: Mon, 29 Jun 2026 16:42:28 +0300 Subject: [PATCH] Report duplicate method resources as warnings --- scripts/test-method-content-integrity.mjs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/test-method-content-integrity.mjs b/scripts/test-method-content-integrity.mjs index 9d8b077..18bb126 100644 --- a/scripts/test-method-content-integrity.mjs +++ b/scripts/test-method-content-integrity.mjs @@ -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()) { @@ -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 { @@ -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.");