diff --git a/cli/test_fixtures/validate_output_junit.xml b/cli/test_fixtures/validate_output_junit.xml index 52b86f9f..ab68ae6e 100644 --- a/cli/test_fixtures/validate_output_junit.xml +++ b/cli/test_fixtures/validate_output_junit.xml @@ -1,10 +1,10 @@ - + - @@ -16,6 +16,7 @@ + + diff --git a/package-lock.json b/package-lock.json index 088fa526..1ebe8333 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ "docs" ], "devDependencies": { + "link": "^2.1.1", "npm-run-all2": "^5.0.0" } }, @@ -16420,6 +16421,19 @@ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "license": "MIT" }, + "node_modules/link": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/link/-/link-2.1.1.tgz", + "integrity": "sha512-NV3AUVYBovJ6eVQcTeRoPnZSxzt2LOijNd+ugEZKRy/XeQlpTRhVRkuDv5kOlXwMAUx30vfUc7asRFb9RT65yg==", + "dev": true, + "license": "MIT", + "bin": { + "link": "dist/cli.js" + }, + "funding": { + "url": "https://github.com/privatenumber/link?sponsor=1" + } + }, "node_modules/load-tsconfig": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/load-tsconfig/-/load-tsconfig-0.2.5.tgz", diff --git a/package.json b/package.json index 49141caa..941ddef8 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "link:cli": "npm link --workspace cli" }, "devDependencies": { + "link": "^2.1.1", "npm-run-all2": "^5.0.0" } } diff --git a/shared/src/spectral/functions/architecture/interface-id-exists-on-node.ts b/shared/src/spectral/functions/architecture/interface-id-exists-on-node.ts index b93f147e..1cad5e75 100644 --- a/shared/src/spectral/functions/architecture/interface-id-exists-on-node.ts +++ b/shared/src/spectral/functions/architecture/interface-id-exists-on-node.ts @@ -17,7 +17,6 @@ export function interfaceIdExistsOnNode(input, _, context) { } const nodeId = input.node; - console.log('id: ', nodeId); const nodeMatch: object[] = JSONPath({ path: `$.nodes[?(@['unique-id'] == '${nodeId}')]`, json: context.document.data }); if (!nodeMatch || nodeMatch.length === 0) { // other rule will report undefined node diff --git a/shared/src/spectral/functions/pattern/interface-id-exists-on-node.ts b/shared/src/spectral/functions/pattern/interface-id-exists-on-node.ts index ce0ec058..15c5fea8 100644 --- a/shared/src/spectral/functions/pattern/interface-id-exists-on-node.ts +++ b/shared/src/spectral/functions/pattern/interface-id-exists-on-node.ts @@ -17,7 +17,6 @@ export function interfaceIdExistsOnNode(input, _, context) { } const nodeId = input.node; - console.log('id: ', nodeId); const nodeMatch: object[] = JSONPath({ path: `$.properties.nodes.prefixItems[?(@.properties['unique-id'].const == '${nodeId}')]`, json: context.document.data }); if (!nodeMatch || nodeMatch.length === 0) { // other rule will report undefined node diff --git a/shared/src/spectral/rules-pattern.ts b/shared/src/spectral/rules-pattern.ts index 370fef6b..d03fd1dd 100644 --- a/shared/src/spectral/rules-pattern.ts +++ b/shared/src/spectral/rules-pattern.ts @@ -111,7 +111,7 @@ const patternRules: RulesetDefinition = { function: interfaceIdExists, }, }, - 'referenced-interfaces-defined-on-correct-node-in-architecture': { + 'referenced-interfaces-defined-on-correct-node-in-pattern': { description: 'Connects relationships must reference interfaces that exist on the correct nodes', severity: 'error', message: '{{error}}',