Skip to content

Commit d046272

Browse files
Issue#1409: Fixing crash with rules architecture_600 and architecture_601.
1 parent 399ef06 commit d046272

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

tests/architecture/rule_600_test_input.fixed.vhd

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,10 @@ begin
118118
);
119119

120120
end architecture;
121+
122+
-- Testing case where entity name is not detected
123+
architecture beh of test3 is
124+
125+
begin
126+
127+
end architecture beh;

tests/architecture/rule_600_test_input.vhd

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,10 @@ begin
118118
);
119119

120120
end architecture;
121+
122+
-- Testing case where entity name is not detected
123+
architecture beh of test3 is
124+
125+
begin
126+
127+
end architecture beh;

vsg/rules/consistent_interface_token_case.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ def analyze(self, oFile):
5656
lArchitectures = oFile.get_tokens_bounded_by(oStartToken, oEndToken)
5757
for oArchitecture in lArchitectures:
5858
oArchitecture.name = extract_entity_name(oArchitecture)
59-
lArchitectureInterfaces = lInterfaces[oArchitecture.name]
59+
60+
try:
61+
lArchitectureInterfaces = lInterfaces[oArchitecture.name]
62+
except KeyError:
63+
continue
64+
6065
lToi = extract_token_pairs(oArchitecture, lPairs)
6166
lToi.extend(extract_component_instantiation_actual_parts(oArchitecture, self.map_aspect_token))
6267
for oToi in lToi:

0 commit comments

Comments
 (0)