vhdl-style-guide/vsg/rules/component/rule_002.py

30 lines
571 B
Python

# -*- coding: utf-8 -*-
from vsg.rules.whitespace_between_tokens import Rule
from vsg.token import component_declaration as token
class rule_002(Rule):
"""
This rule checks for a single space after the **component** keyword.
|configuring_whitespace_rules_link|
**Violation**
.. code-block:: vhdl
component fifo is
**Fix**
.. code-block:: vhdl
component fifo is
"""
def __init__(self):
Rule.__init__(self)
self.left_token = token.component_keyword
self.right_token = token.identifier