Skip to content
This repository was archived by the owner on Oct 21, 2025. It is now read-only.

Commit 0628374

Browse files
authored
Merge pull request #148 from DataFlowAnalysis/typeFix
Fix: Nonexistant labelTypes shown as valid behavior
2 parents 5d9541f + aa4f104 commit 0628374

File tree

1 file changed

+1
-28
lines changed

1 file changed

+1
-28
lines changed

src/features/dfdElements/outputPortBehaviorValidation.ts

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -261,29 +261,6 @@ export class PortBehaviorValidator {
261261
if (typeValuePair === "") continue;
262262

263263
const inputLabelType = typeValuePair.split(".")[0].trim();
264-
const inputLabelTypeObject = this.labelTypeRegistry
265-
?.getLabelTypes()
266-
.find((type) => type.name === inputLabelType);
267-
if (!inputLabelTypeObject) {
268-
let idx = line.indexOf(inputLabelType);
269-
while (idx !== -1) {
270-
// Check that this is not a substring of another label type.
271-
if (
272-
// must start after a dot and end before a dot
273-
line[idx - 1] === "." &&
274-
line[idx + inputLabelType.length] === "."
275-
) {
276-
inputAccessErrors.push({
277-
line: lineNumber,
278-
message: `unknown label type: ${inputLabelType}`,
279-
colStart: idx,
280-
colEnd: idx + inputLabelType.length,
281-
});
282-
}
283-
284-
idx = line.indexOf(inputLabelType, idx + 1);
285-
}
286-
}
287264

288265
if (typeValuePair.indexOf(".") !== -1) {
289266
if (typeValuePair.split(".")[1] === null || typeValuePair.split(".")[1] === "") continue;
@@ -296,11 +273,7 @@ export class PortBehaviorValidator {
296273
let idx = line.indexOf(inputLabelType);
297274
while (idx !== -1) {
298275
// Check that this is not a substring of another label type.
299-
if (
300-
// must start after a dot and end before a dot
301-
line[idx - 1] === "." &&
302-
line[idx + inputLabelType.length] === "."
303-
) {
276+
if (line[idx + inputLabelType.length] === ".") {
304277
inputAccessErrors.push({
305278
line: lineNumber,
306279
message: `unknown label type: ${inputLabelType}`,

0 commit comments

Comments
 (0)