Skip to content

Commit c2fa867

Browse files
committed
Issue#1512: Added docs for new rule to enforce alignment of assignment operators within variable declarations.
1 parent c761b12 commit c2fa867

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

docs/configuring_keyword_alignment_rules.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -992,3 +992,4 @@ Rules Enforcing Keyword Alignment
992992
* `subprogram_body_400 <subprogram_body_rules.html#subprogram-body-400>`_
993993
* `subprogram_body_401 <subprogram_body_rules.html#subprogram-body-401>`_
994994
* `type_400 <type_rules.html#type-400>`_
995+
* `variable_400 <variable_rules.html#variable-400>`_

docs/rule_groups/alignment_rule_group.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ Rules Enforcing Alignment Rule Group
7979
* `subprogram_body_401 <../subprogram_body_rules.html#subprogram-body-401>`_
8080
* `type_400 <../type_rules.html#type-400>`_
8181
* `variable_400 <../variable_rules.html#variable-400>`_
82+
* `variable_401 <../variable_rules.html#variable-401>`_
8283
* `variable_assignment_004 <../variable_assignment_rules.html#variable-assignment-004>`_
8384
* `variable_assignment_400 <../variable_assignment_rules.html#variable-assignment-400>`_
8485
* `variable_assignment_401 <../variable_assignment_rules.html#variable-assignment-401>`_

docs/variable_rules.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,35 @@ This rule checks alignment of multiline constraints in variable declarations.
418418
element2(3 downto 0)
419419
);
420420
421+
variable_401
422+
############
423+
424+
|phase_5| |error| |alignment|
425+
426+
This rule checks the alignment of assignment keywords in variable declarations.
427+
428+
|configuring_keyword_alignment_rules_link|
429+
430+
**Violation**
431+
432+
.. code-block:: vhdl
433+
434+
variable v_default_values : t_address_en := (
435+
c_address_control => false,
436+
c_address_data => true,
437+
others => false
438+
);
439+
440+
**Fix**
441+
442+
.. code-block:: vhdl
443+
444+
variable v_default_values : t_address_en := (
445+
c_address_control => false,
446+
c_address_data => true,
447+
others => false
448+
);
449+
421450
variable_500
422451
############
423452

0 commit comments

Comments
 (0)