Issue#1285: Added case rules for protected type body declarations.
This commit is contained in:
parent
7807bdf865
commit
c91f6eefe4
|
|
@ -0,0 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from .rule_500 import rule_500
|
||||
from .rule_501 import rule_501
|
||||
from .rule_502 import rule_502
|
||||
from .rule_503 import rule_503
|
||||
from .rule_504 import rule_504
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from vsg import token
|
||||
from vsg.rules import token_case
|
||||
|
||||
lTokens = []
|
||||
lTokens.append(token.protected_type_body.protected_keyword)
|
||||
|
||||
|
||||
class rule_500(token_case):
|
||||
"""
|
||||
This rule checks the **protected** keyword in **protected body** has proper case.
|
||||
|
||||
|configuring_uppercase_and_lowercase_rules_link|
|
||||
|
||||
**Violation**
|
||||
|
||||
.. code-block:: vhdl
|
||||
|
||||
type sharedcounter is PROTECTED body
|
||||
|
||||
**Fix**
|
||||
|
||||
.. code-block:: vhdl
|
||||
|
||||
type sharedcounter is protected body
|
||||
"""
|
||||
|
||||
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.protected_type_body.body_keyword)
|
||||
|
||||
|
||||
class rule_501(token_case):
|
||||
"""
|
||||
This rule checks the **body** keyword in **protected body** has proper case.
|
||||
|
||||
|configuring_uppercase_and_lowercase_rules_link|
|
||||
|
||||
**Violation**
|
||||
|
||||
.. code-block:: vhdl
|
||||
|
||||
type sharedcounter is protected BODY
|
||||
|
||||
**Fix**
|
||||
|
||||
.. code-block:: vhdl
|
||||
|
||||
type sharedcounter is protected body
|
||||
"""
|
||||
|
||||
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.protected_type_body.end_keyword)
|
||||
|
||||
|
||||
class rule_502(token_case):
|
||||
"""
|
||||
This rule checks the **end** keyword in **end protected body** has proper case.
|
||||
|
||||
|configuring_uppercase_and_lowercase_rules_link|
|
||||
|
||||
**Violation**
|
||||
|
||||
.. code-block:: vhdl
|
||||
|
||||
END protected body sharedcounter;
|
||||
|
||||
**Fix**
|
||||
|
||||
.. code-block:: vhdl
|
||||
|
||||
end protected body sharedcounter;
|
||||
"""
|
||||
|
||||
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.protected_type_body.end_protected_keyword)
|
||||
|
||||
|
||||
class rule_503(token_case):
|
||||
"""
|
||||
This rule checks the **protected** keyword in **end protected body** has proper case.
|
||||
|
||||
|configuring_uppercase_and_lowercase_rules_link|
|
||||
|
||||
**Violation**
|
||||
|
||||
.. code-block:: vhdl
|
||||
|
||||
end PROTECTED body sharedcounter;
|
||||
|
||||
**Fix**
|
||||
|
||||
.. code-block:: vhdl
|
||||
|
||||
end protected body sharedcounter;
|
||||
"""
|
||||
|
||||
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.protected_type_body.end_body_keyword)
|
||||
|
||||
|
||||
class rule_504(token_case):
|
||||
"""
|
||||
This rule checks the **body** keyword in **end protected body** has proper case.
|
||||
|
||||
|configuring_uppercase_and_lowercase_rules_link|
|
||||
|
||||
**Violation**
|
||||
|
||||
.. code-block:: vhdl
|
||||
|
||||
end protected BODY sharedcounter;
|
||||
|
||||
**Fix**
|
||||
|
||||
.. code-block:: vhdl
|
||||
|
||||
end protected body sharedcounter;
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(lTokens)
|
||||
self.groups.append("case::keyword")
|
||||
Loading…
Reference in New Issue