Issue#1232: Added rule type_mark_500
This commit is contained in:
parent
973279f32d
commit
8e425b4591
|
|
@ -160,6 +160,7 @@ from vsg.rules import source_file
|
|||
from vsg.rules import subprogram_body
|
||||
from vsg.rules import subtype
|
||||
from vsg.rules import type_definition
|
||||
from vsg.rules import type_mark
|
||||
from vsg.rules import use_clause
|
||||
from vsg.rules import variable
|
||||
from vsg.rules import variable_assignment
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from .rule_500 import rule_500
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from vsg import token
|
||||
from vsg.rules import token_case_with_prefix_suffix
|
||||
|
||||
lTokens = []
|
||||
lTokens.append(token.type_mark.name)
|
||||
|
||||
|
||||
class rule_500(token_case_with_prefix_suffix):
|
||||
"""
|
||||
This rule checks that the name has proper case.
|
||||
|
||||
|configuring_uppercase_and_lowercase_rules_link|
|
||||
|
||||
**Violation**
|
||||
|
||||
.. code-block:: vhdl
|
||||
|
||||
subtype my_subtype is MY_EXTERNAL_TYPE range 10 to 20;
|
||||
|
||||
|
||||
**Fix**
|
||||
|
||||
.. code-block:: vhdl
|
||||
|
||||
subtype my_subtype is my_external_type range 10 to 20;
|
||||
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(lTokens)
|
||||
self.configuration.append("prefix_exceptions")
|
||||
self.configuration.append("suffix_exceptions")
|
||||
self.groups.append("case::name")
|
||||
Loading…
Reference in New Issue