Skip to content

New rule needed for signal declration using records to initialize. #1503

@ungultig1

Description

@ungultig1

Environment
Windows 11, newest vsg

Describe the bug
similar to the constant_400 rule, there must be also a rule for the signal declration assigning record and a default value:

Recap constant_400 rule:

Violation

constant c_default_values : t_address_en := (
  c_address_control => false,
  c_address_data => true,
  others => false
);

Fix

constant c_default_values : t_address_en := (
  c_address_control => false,
  c_address_data     => true,
  others                   => false
);

To Reproduce
Steps to reproduce the behavior with singal assigning record:

Violation

signal mySignal  : t_address_en := (
  c_address_control => false,
  c_address_data => true,
  others => false
);

Fix

constant mySignal  : t_address_en := (
  c_address_control => false,
  c_address_data     => true,
  others                   => false
);

Expected behavior
Expected behaviour as rule constant_400, also considering correct format behaviour for comments inside the declreation, as well as the open/close scopes.

Screenshots
Outcome atm:

Image

Expecting:

Image

Thank you.

Ps.: could you also explain the tox.ini?
Exectuing this, and build the project, is it the same behaviour as installing with "setup.py" prior? it confused me..

Metadata

Metadata

Assignees

Labels

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions