File tree Expand file tree Collapse file tree 3 files changed +86
-0
lines changed
Expand file tree Collapse file tree 3 files changed +86
-0
lines changed Original file line number Diff line number Diff line change 2222from .rule_200 import rule_200
2323from .rule_400 import rule_400
2424from .rule_401 import rule_401
25+ from .rule_402 import rule_402
26+ from .rule_403 import rule_403
2527from .rule_600 import rule_600
Original file line number Diff line number Diff line change 1+ # -*- coding: utf-8 -*-
2+
3+
4+ from vsg import token
5+ from vsg .rules import multiline_array_alignment as Rule
6+
7+ lTokenPairs = []
8+ lTokenPairs .append ([token .signal_declaration .assignment_operator , token .signal_declaration .semicolon ])
9+
10+
11+ class rule_402 (Rule ):
12+ """
13+ This rule checks the alignment of multiline signal initializations that contain arrays.
14+
15+ |configuring_multiline_indent_rules_link|
16+
17+ .. NOTE:: The structure of multiline array signal initializations is handled by the rule `signal_403 <signal_rules.html#signal-403>`_.
18+
19+ **Violation**
20+
21+ .. code-block:: vhdl
22+
23+ signal rom : romq_type :=
24+ (
25+ 0,
26+ 65535,
27+ 32768
28+ );
29+
30+ **Fix**
31+
32+ .. code-block:: vhdl
33+
34+ signal rom : romq_type :=
35+ (
36+ 0,
37+ 65535,
38+ 32768
39+ );
40+ """
41+
42+ def __init__ (self ):
43+ super ().__init__ (lTokenPairs )
44+ self .assignment_operator = token .signal_declaration .assignment_operator
Original file line number Diff line number Diff line change 1+ # -*- coding: utf-8 -*-
2+
3+ from vsg import token
4+ from vsg .rules import multiline_structure as Rule
5+
6+ lTokenPairs = []
7+ lTokenPairs .append ([token .signal_declaration .assignment_operator , token .signal_declaration .semicolon ])
8+
9+
10+ class rule_403 (Rule ):
11+ """
12+ This rule checks the structure of multiline signal initializations that contain arrays.
13+
14+ |configuring_array_multiline_structure_rules_link|
15+
16+ .. NOTE:: The indenting of multiline array signal initializations is handled by the rule `signal_402 <signal_rules.html#signal-402>`_.
17+
18+ **Violation**
19+
20+ .. code-block:: vhdl
21+
22+ signal rom : romq_type := (0, 65535, 32768);
23+
24+ **Fix**
25+
26+ .. code-block:: vhdl
27+
28+ signal rom : romq_type :=
29+ (
30+ 0,
31+ 65535,
32+ 32768
33+ );
34+ """
35+
36+ def __init__ (self ):
37+ super ().__init__ (lTokenPairs )
38+ self .assignment_operator = token .signal_declaration .assignment_operator
39+ self .semicolon = token .signal_declaration .semicolon
40+ self .phase = 5
You can’t perform that action at this time.
0 commit comments