Skip to content

Commit 5ba7d3a

Browse files
committed
Issue#1510: Added docs for new rules to handle multiline variable initialisations.
1 parent 67e1fdb commit 5ba7d3a

File tree

7 files changed

+67
-2
lines changed

7 files changed

+67
-2
lines changed

docs/configuring_array_multiline_structure_rules.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,4 +566,5 @@ Rules Enforcing Array Multiline Structure Rules
566566
* `concurrent_012 <concurrent_rules.html#concurrent-012>`_
567567
* `constant_016 <constant_rules.html#constant-016>`_
568568
* `sequential_009 <sequential_rules.html#sequential-009>`_
569+
* `variable_403 <variable_rules.html#variable-403>`_
569570
* `variable_assignment_008 <variable_assignment_rules.html#variable-assignment-008>`_

docs/configuring_multiline_indent_rules.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,5 +128,6 @@ Rules Enforcing Multiline Indent Rules
128128
* `sequential_402 <sequential_rules.html#sequential-402>`_
129129
* `signal_400 <signal_rules.html#signal-400>`_
130130
* `variable_400 <signal_rules.html#variable-400>`_
131+
* `variable_402 <signal_rules.html#variable-402>`_
131132
* `variable_assignment_004 <variable_assignment_rules.html#variable-assignment-004>`_
132133
* `variable_assignment_401 <variable_assignment_rules.html#variable-assignment-401>`_

docs/rule_groups/alignment_rule_group.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ Rules Enforcing Alignment Rule Group
8080
* `type_400 <../type_rules.html#type-400>`_
8181
* `variable_400 <../variable_rules.html#variable-400>`_
8282
* `variable_401 <../variable_rules.html#variable-401>`_
83+
* `variable_402 <../variable_rules.html#variable-402>`_
8384
* `variable_assignment_004 <../variable_assignment_rules.html#variable-assignment-004>`_
8485
* `variable_assignment_400 <../variable_assignment_rules.html#variable-assignment-400>`_
8586
* `variable_assignment_401 <../variable_assignment_rules.html#variable-assignment-401>`_

docs/rule_groups/structure_rule_group.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ Rules Enforcing Structure Rule Group
189189
* `variable_015 <../variable_rules.html#variable-015>`_
190190
* `variable_017 <../variable_rules.html#variable-017>`_
191191
* `variable_018 <../variable_rules.html#variable-018>`_
192+
* `variable_403 <../variable_rules.html#variable-403>`_
192193
* `variable_assignment_006 <../variable_assignment_rules.html#variable-assignment-006>`_
193194
* `variable_assignment_007 <../variable_assignment_rules.html#variable-assignment-007>`_
194195
* `variable_assignment_008 <../variable_assignment_rules.html#variable-assignment-008>`_

docs/variable_rules.rst

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,67 @@ This rule checks the alignment of assignment keywords in variable declarations.
472472
others => false
473473
);
474474
475+
variable_402
476+
############
477+
478+
|phase_5| |error| |alignment|
479+
480+
This rule checks the alignment of multiline variable initializations that contain arrays.
481+
482+
|configuring_multiline_indent_rules_link|
483+
484+
.. NOTE:: The structure of multiline array variables is handled by the rule `variable_403 <variable_rules.html#variable-403>`_.
485+
486+
**Violation**
487+
488+
.. code-block:: vhdl
489+
490+
variable rom : romq_type :=
491+
(
492+
0,
493+
65535,
494+
32768
495+
);
496+
497+
**Fix**
498+
499+
.. code-block:: vhdl
500+
501+
variable rom : romq_type :=
502+
(
503+
0,
504+
65535,
505+
32768
506+
);
507+
508+
variable_403
509+
############
510+
511+
|phase_5| |error| |structure|
512+
513+
This rule checks the structure of multiline variable initializations that contain arrays.
514+
515+
|configuring_array_multiline_structure_rules_link|
516+
517+
.. NOTE:: The indenting of multiline array variables is handled by the rule `variable_402 <variable_rules.html#variable-402>`_.
518+
519+
**Violation**
520+
521+
.. code-block:: vhdl
522+
523+
variable rom : romq_type := (0, 65535, 32768);
524+
525+
**Fix**
526+
527+
.. code-block:: vhdl
528+
529+
variable rom : romq_type :=
530+
(
531+
0,
532+
65535,
533+
32768
534+
);
535+
475536
variable_500
476537
############
477538

vsg/rules/variable/rule_402.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class rule_402(Rule):
1212
"""
13-
This rule checks the alignment of multiline variables that contain arrays.
13+
This rule checks the alignment of multiline variable initializations that contain arrays.
1414
1515
|configuring_multiline_indent_rules_link|
1616

vsg/rules/variable/rule_403.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
class rule_403(Rule):
1111
"""
12-
This rule checks the structure of multiline variables that contain arrays.
12+
This rule checks the structure of multiline variable initializations that contain arrays.
1313
1414
|configuring_array_multiline_structure_rules_link|
1515

0 commit comments

Comments
 (0)