diff --git a/docs/configuring_uppercase_and_lowercase_rules.rst b/docs/configuring_uppercase_and_lowercase_rules.rst index 3997085f..bea0832b 100644 --- a/docs/configuring_uppercase_and_lowercase_rules.rst +++ b/docs/configuring_uppercase_and_lowercase_rules.rst @@ -482,6 +482,8 @@ Rules Enforcing Case * `selected_assignment_502 `_ * `selected_assignment_503 `_ +* `shift_operator_500 `_ + * `signal_002 `_ * `signal_004 `_ diff --git a/docs/rule_groups/case_keyword_rule_group.rst b/docs/rule_groups/case_keyword_rule_group.rst index 34419e35..4bcda731 100644 --- a/docs/rule_groups/case_keyword_rule_group.rst +++ b/docs/rule_groups/case_keyword_rule_group.rst @@ -160,6 +160,7 @@ Rules Enforcing Case::Keyword Rule Group * `selected_assignment_501 <../selected_assignment_rules.html#selected-assignment-501>`_ * `selected_assignment_502 <../selected_assignment_rules.html#selected-assignment-502>`_ * `selected_assignment_503 <../selected_assignment_rules.html#selected-assignment-503>`_ +* `shift_operator_500 <../shift_operator_rules.html#shift-operator-500>`_ * `signal_002 <../signal_rules.html#signal-002>`_ * `subtype_500 <../subtype_rules.html#subtype-500>`_ * `subtype_502 <../subtype_rules.html#subtype-502>`_ diff --git a/docs/rule_groups/case_rule_group.rst b/docs/rule_groups/case_rule_group.rst index cc7bf2f4..3a9968c9 100644 --- a/docs/rule_groups/case_rule_group.rst +++ b/docs/rule_groups/case_rule_group.rst @@ -217,6 +217,7 @@ Rules Enforcing Case Rule Group * `selected_assignment_501 <../selected_assignment_rules.html#selected-assignment-501>`_ * `selected_assignment_502 <../selected_assignment_rules.html#selected-assignment-502>`_ * `selected_assignment_503 <../selected_assignment_rules.html#selected-assignment-503>`_ +* `shift_operator_500 <../shift_operator_rules.html#shift-operator-500>`_ * `signal_002 <../signal_rules.html#signal-002>`_ * `signal_004 <../signal_rules.html#signal-004>`_ * `signal_014 <../signal_rules.html#signal-014>`_ diff --git a/docs/rule_groups/whitespace_rule_group.rst b/docs/rule_groups/whitespace_rule_group.rst index 60fc2065..7e52bd4c 100644 --- a/docs/rule_groups/whitespace_rule_group.rst +++ b/docs/rule_groups/whitespace_rule_group.rst @@ -182,3 +182,4 @@ Rules Enforcing Whitespace Rule Group * `whitespace_011 <../whitespace_rules.html#whitespace-011>`_ * `whitespace_013 <../whitespace_rules.html#whitespace-013>`_ * `whitespace_100 <../whitespace_rules.html#whitespace-100>`_ +* `whitespace_101 <../whitespace_rules.html#whitespace-101>`_ diff --git a/docs/rules.rst b/docs/rules.rst index b4d53004..be3afb76 100644 --- a/docs/rules.rst +++ b/docs/rules.rst @@ -75,6 +75,7 @@ The rules are divided into categories depending on the part of the VHDL code bei selected_assignment_rules.rst sequential_rules.rst signal_rules.rst + shift_operator_rules.rst source_file_rules.rst subprogram_body_rules.rst subtype_rules.rst diff --git a/docs/shift_operator_rules.rst b/docs/shift_operator_rules.rst new file mode 100644 index 00000000..bd8ab9ed --- /dev/null +++ b/docs/shift_operator_rules.rst @@ -0,0 +1,25 @@ +.. include:: includes.rst + +Shift Operator Rules +-------------------- + +shift_operator_500 +################## + +|phase_6| |error| |case| |case_keyword| + +This rule checks shift operators have proper case. + +|configuring_uppercase_and_lowercase_rules_link| + +**Violation** + +.. code-block:: vhdl + + a <= b SLL c; + +**Fix** + +.. code-block:: vhdl + + a <= b sll c; diff --git a/docs/whitespace_rules.rst b/docs/whitespace_rules.rst index f2cd04a3..9083c068 100644 --- a/docs/whitespace_rules.rst +++ b/docs/whitespace_rules.rst @@ -269,6 +269,27 @@ This rule checks for at least a single space before and after relational operato if readAddr >= writeAddr then if readAddr >= writeAddr then +whitespace_101 +############## + +|phase_2| |error| |whitespace| + +This rule checks for at least a single space before and after logical operators. + +**Violation** + +.. code-block:: vhdl + + if (a = '1')sll(b = '0') + if (a = '0')rol (b = '1') + +**Fix** + +.. code-block:: vhdl + + if (a = '1') sll (b = '0') + if (a = '0') rol (b = '1') + whitespace_200 ##############