diff --git a/vsg/rules/move_token_next_to_another_token.py b/vsg/rules/move_token_next_to_another_token.py index 3c9ba8c7..7217c0e5 100644 --- a/vsg/rules/move_token_next_to_another_token.py +++ b/vsg/rules/move_token_next_to_another_token.py @@ -40,7 +40,8 @@ class move_token_next_to_another_token(rule_item.Rule): lToi = oFile.get_tokens_bounded_by(self.anchor_token, self.token_to_move) for oToi in lToi: lTokens = oToi.get_tokens() - if not utils.are_next_consecutive_token_types([self.anchor_token, parser.whitespace, self.token_to_move], 0, lTokens): + if not utils.are_next_consecutive_token_types([self.anchor_token, parser.whitespace, self.token_to_move], 0, lTokens) and \ + not utils.are_next_consecutive_token_types([self.anchor_token, self.token_to_move], 0, lTokens): self.add_violation(violation.New(oToi.get_line_number(), oToi, self.solution)) diff --git a/vsg/tests/instantiation/rule_025_test_input.fixed.vhd b/vsg/tests/instantiation/rule_025_test_input.fixed.vhd index f0336376..8fffdc0f 100644 --- a/vsg/tests/instantiation/rule_025_test_input.fixed.vhd +++ b/vsg/tests/instantiation/rule_025_test_input.fixed.vhd @@ -15,6 +15,18 @@ begin PORT_3 => w_port_3 ); + U_INST1 : INST1 + generic map ( + G_GEN_1 => 3, + G_GEN_2 => 4, + G_GEN_3 => 5 + ) + port map( + PORT_1 => w_port_1, + PORT_2 => w_port_2, + PORT_3 => w_port_3 + ); + -- Violations below U_INST1 : INST1 diff --git a/vsg/tests/instantiation/rule_025_test_input.vhd b/vsg/tests/instantiation/rule_025_test_input.vhd index 9709987e..32fc537e 100644 --- a/vsg/tests/instantiation/rule_025_test_input.vhd +++ b/vsg/tests/instantiation/rule_025_test_input.vhd @@ -15,6 +15,18 @@ begin PORT_3 => w_port_3 ); + U_INST1 : INST1 + generic map ( + G_GEN_1 => 3, + G_GEN_2 => 4, + G_GEN_3 => 5 + ) + port map( + PORT_1 => w_port_1, + PORT_2 => w_port_2, + PORT_3 => w_port_3 + ); + -- Violations below U_INST1 : INST1 diff --git a/vsg/tests/instantiation/rule_026_test_input.fixed.vhd b/vsg/tests/instantiation/rule_026_test_input.fixed.vhd index 9a0e2766..b185b64e 100644 --- a/vsg/tests/instantiation/rule_026_test_input.fixed.vhd +++ b/vsg/tests/instantiation/rule_026_test_input.fixed.vhd @@ -15,6 +15,18 @@ begin PORT_3 => w_port_3 ); + U_INST1 : INST1 + generic map( + G_GEN_1 => 3, + G_GEN_2 => 4, + G_GEN_3 => 5 + ) + port map ( + PORT_1 => w_port_1, + PORT_2 => w_port_2, + PORT_3 => w_port_3 + ); + -- Violations below U_INST1 : INST1 diff --git a/vsg/tests/instantiation/rule_026_test_input.vhd b/vsg/tests/instantiation/rule_026_test_input.vhd index 078551c8..27563c95 100644 --- a/vsg/tests/instantiation/rule_026_test_input.vhd +++ b/vsg/tests/instantiation/rule_026_test_input.vhd @@ -15,6 +15,18 @@ begin PORT_3 => w_port_3 ); + U_INST1 : INST1 + generic map( + G_GEN_1 => 3, + G_GEN_2 => 4, + G_GEN_3 => 5 + ) + port map ( + PORT_1 => w_port_1, + PORT_2 => w_port_2, + PORT_3 => w_port_3 + ); + -- Violations below U_INST1 : INST1 diff --git a/vsg/tests/instantiation/test_rule_025.py b/vsg/tests/instantiation/test_rule_025.py index 43acdf2f..f0e33e55 100644 --- a/vsg/tests/instantiation/test_rule_025.py +++ b/vsg/tests/instantiation/test_rule_025.py @@ -26,7 +26,7 @@ class test_instantiation_rule(unittest.TestCase): self.assertEqual(oRule.name, 'instantiation') self.assertEqual(oRule.identifier, '025') - lExpected = [26] + lExpected = [38] oRule.analyze(self.oFile) self.assertEqual(lExpected, utils.extract_violation_lines_from_violation_object(oRule.violations)) diff --git a/vsg/tests/instantiation/test_rule_026.py b/vsg/tests/instantiation/test_rule_026.py index 82bc15d8..0a6e9f3f 100644 --- a/vsg/tests/instantiation/test_rule_026.py +++ b/vsg/tests/instantiation/test_rule_026.py @@ -26,7 +26,7 @@ class test_instantiation_rule(unittest.TestCase): self.assertEqual(oRule.name, 'instantiation') self.assertEqual(oRule.identifier, '026') - lExpected = [21] + lExpected = [33] oRule.analyze(self.oFile) self.assertEqual(lExpected, utils.extract_violation_lines_from_violation_object(oRule.violations))