vhdl-style-guide/vsg/rules/entity/rule_015.py

34 lines
751 B
Python

# -*- coding: utf-8 -*-
from vsg.rules import insert_token_right_of_token_if_it_does_not_exist_before_token
from vsg.token import entity_declaration as token
class rule_015(insert_token_right_of_token_if_it_does_not_exist_before_token):
"""
This rule checks for the keyword **entity** in the **end entity** statement.
|configuring_optional_items_link|
**Violation**
.. code-block:: vhdl
end fifo;
end;
**Fix**
.. code-block:: vhdl
end entity fifo;
end entity;
"""
def __init__(self):
super().__init__(token.end_entity_keyword("entity"), token.end_keyword, token.semicolon)
self.solution = "*entity* keyword"
self.groups.append("structure::optional")