File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed
Expand file tree Collapse file tree 1 file changed +52
-0
lines changed 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 (
5+ align_tokens_in_region_between_tokens_unless_between_tokens as Rule ,
6+ )
7+
8+ lAlign = []
9+ lAlign .append (token .element_association .assignment )
10+
11+ lUnless = []
12+
13+ oStartToken = token .variable_declaration .assignment_operator
14+ oEndToken = token .variable_declaration .semicolon
15+
16+
17+ class rule_400 (Rule ):
18+ """
19+ This rule checks the alignment of assignment keywords in variable declarations.
20+
21+ |configuring_keyword_alignment_rules_link|
22+
23+ **Violation**
24+
25+ .. code-block:: vhdl
26+
27+ variable v_default_values : t_address_en := (
28+ c_address_control => false,
29+ c_address_data => true,
30+ others => false
31+ );
32+
33+ **Fix**
34+
35+ .. code-block:: vhdl
36+
37+ variable v_default_values : t_address_en := (
38+ c_address_control => false,
39+ c_address_data => true,
40+ others => false
41+ );
42+ """
43+
44+ def __init__ (self ):
45+ super ().__init__ (lAlign , oStartToken , oEndToken , lUnless )
46+ self .solution = "Align => ."
47+ self .configuration .remove ("if_control_statements_ends_group" )
48+ self .configuration .remove ("case_control_statements_ends_group" )
49+ self .configuration .remove ("loop_control_statements_ends_group" )
50+ self .configuration .remove ("separate_generic_port_alignment" )
51+ self .configuration .append ("aggregate_parens_ends_group" )
52+ self .configuration .append ("ignore_single_line_aggregates" )
You can’t perform that action at this time.
0 commit comments