vhdl-style-guide/vsg/rules/function/rule_501.py

32 lines
598 B
Python

from vsg.rules import token_case as Rule
from vsg import token
lTokens = []
lTokens.append(token.function_specification.return_keyword)
class rule_501(Rule):
'''
This rule checks the **return** keyword has proper case.
|configuring_uppercase_and_lowercase_rules_link|
**Violation**
.. code-block:: vhdl
function overflow (a: integer) RETURN integer is
**Fix**
.. code-block:: vhdl
function overflow (a: integer) return integer is
'''
def __init__(self):
Rule.__init__(self, lTokens)
self.groups.append('case::keyword')