Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Element association inside constant declaration #926

Closed
erick166 opened this issue Mar 2, 2023 · 3 comments
Closed

Element association inside constant declaration #926

erick166 opened this issue Mar 2, 2023 · 3 comments
Labels

Comments

@erick166
Copy link

erick166 commented Mar 2, 2023

Environment
VHDL Style Guide (VSG) version: 3.14.0

Describe the bug
The rule element_association_100 checks for spaces between the others keyword and the => assignment inside a multi-line constant declaration.

To Reproduce

constant C_ADDRESS_CONTROL : natural := 0;
constant C_ADDRESS_DATA    : natural := 1;
type t_address_en is array (0 to 31) of boolean;

constant C_DEFAULT_VALUES : t_address_en := (
  C_ADDRESS_CONTROL => false,
  C_ADDRESS_DATA    => true,
  others            => false
);

Expected behavior
The => assignment should have the same alignment as the other elements inside the constant declaration.

@erick166 erick166 added the bug label Mar 2, 2023
@jeremiah-c-leary
Copy link
Owner

Good Morning @erick166 ,

You can control the acceptable whitespace using the following configuration:

  rule:
    element_association_100:
      number_of_spaces: '>=1'

This will allow more than more space after the others keyword.

I am working on an alignment rule for constant declarations as part of issue #999

Let me know if the above configuration works for you or if there is more work to be done.

Thanks,

--Jeremy

@erick166
Copy link
Author

Hi,

Yes, that configuration works, thanks!

@jeremiah-c-leary
Copy link
Owner

Awesome...I will close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

2 participants