diff --git a/vsg/rules/__init__.py b/vsg/rules/__init__.py index c4fe7c32..a7040467 100644 --- a/vsg/rules/__init__.py +++ b/vsg/rules/__init__.py @@ -111,6 +111,7 @@ from vsg.rules import alias_declaration from vsg.rules import after from vsg.rules import aggregate from vsg.rules import architecture +from vsg.rules import array_constraint from vsg.rules import assert_statement from vsg.rules import attribute from vsg.rules import attribute_declaration diff --git a/vsg/rules/array_constraint/__init__.py b/vsg/rules/array_constraint/__init__.py new file mode 100644 index 00000000..c5c1c6e6 --- /dev/null +++ b/vsg/rules/array_constraint/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from .rule_500 import rule_500 diff --git a/vsg/rules/array_constraint/rule_500.py b/vsg/rules/array_constraint/rule_500.py new file mode 100644 index 00000000..8d7706ce --- /dev/null +++ b/vsg/rules/array_constraint/rule_500.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- + +from vsg import token +from vsg.rules import token_case + +lTokens = [] +lTokens.append(token.array_constraint.open_keyword) + + +class rule_500(token_case): + """ + This rule checks the **open** keyword in array constraints has the proper case. + + |configuring_uppercase_and_lowercase_rules_link| + + **Violation** + + .. code-block:: vhdl + + subtype t_my_array is t_array(OPEN)(t_range); + + + **Fix** + + .. code-block:: vhdl + + subtype t_my_array is t_array(open)(t_range); + """ + + def __init__(self): + super().__init__(lTokens) + self.groups.append("case::keyword")