From 157926c19a8d2322e7828d53a987580ddc39b3aa Mon Sep 17 00:00:00 2001 From: JHertz5 Date: Tue, 22 Oct 2024 22:59:02 +0100 Subject: [PATCH] Issue#1285: Updated documentation for protected_type and protected_type_body rules. --- ...figuring_uppercase_and_lowercase_rules.rst | 10 ++ docs/protected_type_body_rules.rst | 109 ++++++++++++++++++ docs/protected_type_rules.rst | 67 +++++++++++ docs/rule_groups/case_keyword_rule_group.rst | 8 ++ docs/rule_groups/case_rule_group.rst | 8 ++ docs/rules.rst | 2 + 6 files changed, 204 insertions(+) create mode 100644 docs/protected_type_body_rules.rst create mode 100644 docs/protected_type_rules.rst diff --git a/docs/configuring_uppercase_and_lowercase_rules.rst b/docs/configuring_uppercase_and_lowercase_rules.rst index bffd546f..5cc27b2a 100644 --- a/docs/configuring_uppercase_and_lowercase_rules.rst +++ b/docs/configuring_uppercase_and_lowercase_rules.rst @@ -444,6 +444,16 @@ Rules Enforcing Case * `process_017 `_ * `process_019 `_ +* `protected_type_500 `_ +* `protected_type_501 `_ +* `protected_type_502 `_ +* `protected_type_body_500 `_ + +* `protected_type_body_501 `_ +* `protected_type_body_502 `_ +* `protected_type_body_503 `_ +* `protected_type_body_504 `_ + * `range_001 `_ * `range_002 `_ diff --git a/docs/protected_type_body_rules.rst b/docs/protected_type_body_rules.rst new file mode 100644 index 00000000..9e07ed3d --- /dev/null +++ b/docs/protected_type_body_rules.rst @@ -0,0 +1,109 @@ +.. include:: includes.rst + +Protected Type Body Rules +------------------------- + +protected_type_body_500 +####################### + +|phase_6| |error| |case| |case_keyword| + +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 + +protected_type_body_501 +####################### + +|phase_6| |error| |case| |case_keyword| + +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 + +protected_type_body_502 +####################### + +|phase_6| |error| |case| |case_keyword| + +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; + +protected_type_body_503 +####################### + +|phase_6| |error| |case| |case_keyword| + +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; + +protected_type_body_504 +####################### + +|phase_6| |error| |case| |case_keyword| + +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; diff --git a/docs/protected_type_rules.rst b/docs/protected_type_rules.rst new file mode 100644 index 00000000..03677848 --- /dev/null +++ b/docs/protected_type_rules.rst @@ -0,0 +1,67 @@ +.. include:: includes.rst + +Protected Type Rules +-------------------- + +protected_type_500 +################## + +|phase_6| |error| |case| |case_keyword| + +This rule checks the **protected** keyword has proper case. + +|configuring_uppercase_and_lowercase_rules_link| + +**Violation** + +.. code-block:: vhdl + + type sharedcounter is PROTECTED + +**Fix** + +.. code-block:: vhdl + + type sharedcounter is protected + +protected_type_501 +################## + +|phase_6| |error| |case| |case_keyword| + +This rule checks the **end** keyword in **end protected** has proper case. + +|configuring_uppercase_and_lowercase_rules_link| + +**Violation** + +.. code-block:: vhdl + + END protected sharedcounter; + +**Fix** + +.. code-block:: vhdl + + end protected sharedcounter; + +protected_type_502 +################## + +|phase_6| |error| |case| |case_keyword| + +This rule checks the **protected** keyword in **end protected** has proper case. + +|configuring_uppercase_and_lowercase_rules_link| + +**Violation** + +.. code-block:: vhdl + + end PROTECTED sharedcounter; + +**Fix** + +.. code-block:: vhdl + + end protected sharedcounter; diff --git a/docs/rule_groups/case_keyword_rule_group.rst b/docs/rule_groups/case_keyword_rule_group.rst index e38f1bee..dfa8135a 100644 --- a/docs/rule_groups/case_keyword_rule_group.rst +++ b/docs/rule_groups/case_keyword_rule_group.rst @@ -136,6 +136,14 @@ Rules Enforcing Case::Keyword Rule Group * `process_008 <../process_rules.html#process-008>`_ * `process_009 <../process_rules.html#process-009>`_ * `process_013 <../process_rules.html#process-013>`_ +* `protected_type_500 <../protected_type_rules.html#protected-type-500>`_ +* `protected_type_501 <../protected_type_rules.html#protected-type-501>`_ +* `protected_type_502 <../protected_type_rules.html#protected-type-502>`_ +* `protected_type_body_500 <../protected_type_rules.html#protected-type-body-500>`_ +* `protected_type_body_501 <../protected_type_rules.html#protected-type-body-501>`_ +* `protected_type_body_502 <../protected_type_rules.html#protected-type-body-502>`_ +* `protected_type_body_503 <../protected_type_rules.html#protected-type-body-503>`_ +* `protected_type_body_504 <../protected_type_rules.html#protected-type-body-504>`_ * `range_001 <../range_rules.html#range-001>`_ * `range_002 <../range_rules.html#range-002>`_ * `record_type_definition_500 <../record_type_definition_rules.html#record-type-definition-500>`_ diff --git a/docs/rule_groups/case_rule_group.rst b/docs/rule_groups/case_rule_group.rst index 1f7ed16f..f604f855 100644 --- a/docs/rule_groups/case_rule_group.rst +++ b/docs/rule_groups/case_rule_group.rst @@ -188,6 +188,14 @@ Rules Enforcing Case Rule Group * `process_013 <../process_rules.html#process-013>`_ * `process_017 <../process_rules.html#process-017>`_ * `process_019 <../process_rules.html#process-019>`_ +* `protected_type_500 <../protected_type_rules.html#protected-type-500>`_ +* `protected_type_501 <../protected_type_rules.html#protected-type-501>`_ +* `protected_type_502 <../protected_type_rules.html#protected-type-502>`_ +* `protected_type_body_500 <../protected_type_rules.html#protected-type-body-500>`_ +* `protected_type_body_501 <../protected_type_rules.html#protected-type-body-501>`_ +* `protected_type_body_502 <../protected_type_rules.html#protected-type-body-502>`_ +* `protected_type_body_503 <../protected_type_rules.html#protected-type-body-503>`_ +* `protected_type_body_504 <../protected_type_rules.html#protected-type-body-504>`_ * `range_001 <../range_rules.html#range-001>`_ * `range_002 <../range_rules.html#range-002>`_ * `record_type_definition_500 <../record_type_definition_rules.html#record-type-definition-500>`_ diff --git a/docs/rules.rst b/docs/rules.rst index 921c2b14..812c4cbe 100644 --- a/docs/rules.rst +++ b/docs/rules.rst @@ -62,6 +62,8 @@ The rules are divided into categories depending on the part of the VHDL code bei procedure_rules.rst procedure_call_rules.rst process_rules.rst + protected_type_rules.rst + protected_type_body_rules.rst range_rules.rst record_type_definition_rules.rst report_statement_rules.rst