vhdl-style-guide/vsg/rules/loop_statement/rule_001.py

33 lines
647 B
Python

# -*- coding: utf-8 -*-
from vsg.rules import (
insert_carriage_return_after_token_if_it_is_not_followed_by_a_comment,
)
from vsg.token import loop_statement as token
lTokens = []
lTokens.append(token.loop_keyword)
class rule_001(insert_carriage_return_after_token_if_it_is_not_followed_by_a_comment):
"""
This rule checks for code after the **loop** keyword.
**Violation**
.. code-block:: vhdl
loop a <= b;
**Fix**
.. code-block:: vhdl
loop
a <= b;
"""
def __init__(self):
super().__init__(lTokens)
self.solution = "Move code after **loop** to the next line."