diff --git a/modules/rule_entity.py b/modules/rule_entity.py index 103b61c6..4b567f1e 100644 --- a/modules/rule_entity.py +++ b/modules/rule_entity.py @@ -396,6 +396,7 @@ class rule_018(entity_rule): for iLineNumber, sLine in enumerate(lines): if fEntityFound: if re.match('^\s*end', sLine.lower()): + fEntityFound = False if not re.match('^end', sLine.lower()): lFailureLines.append(iLineNumber + 1) if re.match('\s*entity', sLine.lower()): diff --git a/modules/tests/rule_entity/entity_test_input.vhd b/modules/tests/rule_entity/entity_test_input.vhd index 3ae00abd..6c1d98ad 100644 --- a/modules/tests/rule_entity/entity_test_input.vhd +++ b/modules/tests/rule_entity/entity_test_input.vhd @@ -105,5 +105,5 @@ end ENTITY1 architecture RTL of ENTITY1 is begin -end rtl; + end rtl;