jeremiah-c-leary / vhdl-style-guide

Style guide enforcement for VHDL
GNU General Public License v3.0
192 stars 39 forks source link

Add alignment rules for all constructs that can have generic maps. #1333

Open JHertz5 opened 1 week ago

JHertz5 commented 1 week ago

Is your feature request related to a problem? Please describe. There are four constructs that can have generic maps:

Of these, only the first has a rule that can enforce the alignment of generic maps (instantiation_001).

For example, the following code

package my_pkg_g is new my_pkg
generic map (
g_test => c_test
);

architecture rtl of test is

function my_func is new my_func
generic map (
g_test => c_test
);

begin

  cmp_g_test : component test
generic map (
g_test => c_test
);

  my_block : block is

    generic (
      g_test : boolean
    );
generic map (
g_test => c_test
);

  begin

  end block my_block;

end architecture rtl;

is fixed to

package my_pkg_g is new my_pkg
generic map (
g_test => c_test
);

architecture rtl of test is

function my_func is new my_func
generic map (
g_test => c_test
);

begin

  cmp_g_test : component test
    generic map (
      g_test => c_test
    );

  my_block : block is

    generic (
      g_test : boolean
    );
generic map (
g_test => c_test
);

  begin

  end block my_block;

end architecture rtl;

Note that only the component instantiation was fixed.

Describe the solution you'd like I would like rules equivalent to instantiation_001 for

This issue is split from #1319.