vhdl-style-guide/vsg/rules/concurrent/rule_009.py

41 lines
950 B
Python

from vsg.rules import multiline_conditional_alignment as Rule
from vsg import token
lTokenPairs = []
lTokenPairs.append([token.concurrent_conditional_signal_assignment.assignment, token.concurrent_conditional_signal_assignment.semicolon])
class rule_009(Rule):
'''
This rule checks alignment of multiline concurrent conditional signal statements.
|configuring_conditional_multiline_indent_rules_link|
**Violation**
.. code-block:: vhdl
wr_en <= '0' when q_wr_en = '1' else
'1';
w_foo <= I_FOO when ((I_BAR = '1') and
(I_CRUFT = '1')) else
'0';
**Fix**
.. code-block:: vhdl
wr_en <= '0' when q_wr_en = '1' else
'1';
w_foo <= I_FOO when ((I_BAR = '1') and
(I_CRUFT = '1')) else
'0';
'''
def __init__(self):
Rule.__init__(self, 'concurrent', '009', lTokenPairs)