vhdl-style-guide/vsg/rules/generic_map/rule_007.py

42 lines
820 B
Python

# -*- coding: utf-8 -*-
from vsg import token
from vsg.rules.whitespace_between_token_pairs_bounded_by_tokens import Rule
lTokens = []
lTokens.append([token.association_element.assignment, token.association_element.actual_part])
lStart = token.generic_map_aspect.open_parenthesis
lEnd = token.generic_map_aspect.close_parenthesis
class rule_007(Rule):
"""
This rule checks for a single space after the **=>** keyword in generic maps.
|configuring_whitespace_rules_link|
**Violation**
.. code-block:: vhdl
generic map
(
WIDTH => 32,
DEPTH => 512
)
**Fix**
.. code-block:: vhdl
generic map
(
WIDTH => 32,
DEPTH => 512
)
"""
def __init__(self):
super().__init__(lTokens, lStart, lEnd)