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

42 lines
997 B
Python

# -*- coding: utf-8 -*-
from vsg import token
from vsg.rules import remove_excessive_blank_lines_below_line_ending_with_token
lTokens = []
lTokens.append(token.if_statement.then_keyword)
lOverrides = []
lOverrides.append(token.case_statement.case_label)
lOverrides.append(token.case_statement.case_keyword)
lOverrides.append(token.loop_statement.loop_label)
lOverrides.append(token.loop_statement.loop_keyword)
lOverrides.append(token.iteration_scheme.while_keyword)
lOverrides.append(token.iteration_scheme.for_keyword)
class rule_006(remove_excessive_blank_lines_below_line_ending_with_token):
"""
This rule checks for blank lines after the **then** keyword.
**Violation**
.. code-block:: vhdl
if (a = '1') then
b <= '0'
**Fix**
.. code-block:: vhdl
if (a = '1') then
b <= '0'
"""
def __init__(self):
super().__init__(lTokens, iAllow=0, lOverrides=lOverrides)
self.configuration_documentation_link = None