vhdl-style-guide/vsg/rules/if_statement/rule_030.py

40 lines
798 B
Python

from vsg.rules import blank_line_below_line_ending_with_token
from vsg import token
lTokens = []
lTokens.append(token.if_statement.semicolon)
class rule_030(blank_line_below_line_ending_with_token):
'''
This rule checks a single blank line after the **end if**.
In the case of nested **if** statements, the rule will be enfoced on the last **end if**.
|configuring_blank_lines_link|
**Violation**
.. code-block:: vhdl
if (A = '1') then
B <= '0';
end if;
C <= '1';
**Fix**
.. code-block:: vhdl
if (A = '1') then
B <= '0';
end if;
C <= '1';
'''
def __init__(self):
blank_line_below_line_ending_with_token.__init__(self, 'if', '030', lTokens)
self.lHierarchyLimits = [0]