Why is this an issue?

Sharing some naming conventions is a key point to make it possible for a team to efficiently collaborate. This rule allows to check that all instance names match a provided regular expression.

A specific pattern can be added to the regular expression to check that the instance name contains the name of the entity/component/configuration it instantiates.

How to fix it

Code examples

Noncompliant code example

With default regular expression: ^i_{COMPONENT_NAME}_[0-9]+$

architecture a of e is
begin
  i_my_entity : entity my_entity port map(a); -- Noncompliant: Missing instance number at the end
  i_my_wrong_entity_1 : entity my_entity port map(a); -- Noncompliant: Wrong name of entity in instance name
  i_my_wrong_component_1 : my_component port map(a); -- Noncompliant: Wrong name of component in instance name
  i_my_wrong_configuration_1 : configuration my_configuration; -- Noncompliant: Wrong name of configuration in instance name
end;

Compliant solution

With default regular expression: ^i_{COMPONENT_NAME}_[0-9]+$

architecture a of e is
begin
  i_my_entity_1 : entity my_entity port map(a);
  i_my_entity_2 : entity my_entity port map(a);
  i_my_component_1 : component my_component port map(a);
  i_my_configuration_1 : configuration my_configuration;
end;