Issue#1341: Added rules delay_mechanism_500, delay_mechanism_501, delay_mechanism_502.
This commit is contained in:
parent
2545818344
commit
4d18d4d898
|
|
@ -130,6 +130,7 @@ from vsg.rules import constant
|
|||
from vsg.rules import context
|
||||
from vsg.rules import context_ref
|
||||
from vsg.rules import declarative_part
|
||||
from vsg.rules import delay_mechanism
|
||||
from vsg.rules import element_association
|
||||
from vsg.rules import entity
|
||||
from vsg.rules import entity_specification
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from .rule_500 import rule_500
|
||||
from .rule_501 import rule_501
|
||||
from .rule_502 import rule_502
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from vsg import token
|
||||
from vsg.rules import token_case
|
||||
|
||||
lTokens = []
|
||||
lTokens.append(token.delay_mechanism.transport_keyword)
|
||||
|
||||
|
||||
class rule_500(token_case):
|
||||
"""
|
||||
This rule checks the *transport* keyword has proper case.
|
||||
|
||||
|configuring_uppercase_and_lowercase_rules_link|
|
||||
|
||||
**Violation**
|
||||
|
||||
.. code-block:: vhdl
|
||||
|
||||
a <= TRANSPORT 1 after 10 ns;
|
||||
|
||||
**Fix**
|
||||
|
||||
.. code-block:: vhdl
|
||||
|
||||
a <= transport 1 after 10 ns;
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(lTokens)
|
||||
self.groups.append("case::keyword")
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from vsg import token
|
||||
from vsg.rules import token_case
|
||||
|
||||
lTokens = []
|
||||
lTokens.append(token.delay_mechanism.inertial_keyword)
|
||||
|
||||
|
||||
class rule_501(token_case):
|
||||
"""
|
||||
This rule checks the *inertial* keyword has proper case.
|
||||
|
||||
|configuring_uppercase_and_lowercase_rules_link|
|
||||
|
||||
**Violation**
|
||||
|
||||
.. code-block:: vhdl
|
||||
|
||||
a <= INERTIAL 1 after 10 ns;
|
||||
|
||||
**Fix**
|
||||
|
||||
.. code-block:: vhdl
|
||||
|
||||
a <= inertial 1 after 10 ns;
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(lTokens)
|
||||
self.groups.append("case::keyword")
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from vsg import token
|
||||
from vsg.rules import token_case
|
||||
|
||||
lTokens = []
|
||||
lTokens.append(token.delay_mechanism.reject_keyword)
|
||||
|
||||
|
||||
class rule_502(token_case):
|
||||
"""
|
||||
This rule checks the *reject* keyword has proper case.
|
||||
|
||||
|configuring_uppercase_and_lowercase_rules_link|
|
||||
|
||||
**Violation**
|
||||
|
||||
.. code-block:: vhdl
|
||||
|
||||
a <= REJECT 2ns inertial 1 after 10 ns;
|
||||
|
||||
**Fix**
|
||||
|
||||
.. code-block:: vhdl
|
||||
|
||||
a <= reject 2ns inertial 1 after 10 ns;
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(lTokens)
|
||||
self.groups.append("case::keyword")
|
||||
Loading…
Reference in New Issue