diff --git a/docs/rule_groups.rst b/docs/rule_groups.rst index 9c364d18..123250db 100644 --- a/docs/rule_groups.rst +++ b/docs/rule_groups.rst @@ -1,48 +1,20 @@ Rule Groups =========== -Rule groups allow for easier configuration of rules that perform similar functions. -Using rule groups can make upgrading VSG versions easier as new rules are added. +.. toctree:: + :maxdepth: 1 -The following is a list of the rule groups: + rule_groups/overview.rst + rule_groups/alignment_rule_group.rst + rule_groups/blank_line_rule_group.rst + rule_groups/case_rule_group.rst + rule_groups/case_keyword_rule_group.rst + rule_groups/case_label_rule_group.rst + rule_groups/case_name_rule_group.rst + rule_groups/length_rule_group.rst + rule_groups/indent_rule_group.rst + rule_groups/naming_rule_group.rst + rule_groups/structure_rule_group.rst + rule_groups/structure_optional_rule_group.rst + rule_groups/whitespace_rule_group.rst -+-------------------------+---------------------------------------------------------+ -| Group | Description | -+-------------------------+---------------------------------------------------------+ -| alignment | Horizontal alignment rules. | -+-------------------------+---------------------------------------------------------+ -| blank_line | Vertical alignment rules. | -+-------------------------+---------------------------------------------------------+ -| case | All rules involving lower and upper casing. | -+-------------------------+---------------------------------------------------------+ -| case::keyword | Casing rules for VHDL keywords. | -+-------------------------+---------------------------------------------------------+ -| case::label | Casing rules for labels. | -+-------------------------+---------------------------------------------------------+ -| case::name | Casing rules for identifiers, etc... | -+-------------------------+---------------------------------------------------------+ -| length | Rules restricting length. | -+-------------------------+---------------------------------------------------------+ -| indent | Rules involving line indents. | -+-------------------------+---------------------------------------------------------+ -| naming | Rules for constraining how identifiers etc.. are named. | -+-------------------------+---------------------------------------------------------+ -| structure | Rules dictating the structure of the code. | -+-------------------------+---------------------------------------------------------+ -| structure::optional | Rules for optional VHDL language items. | -+-------------------------+---------------------------------------------------------+ -| whitespace | Rules for managing whitespace. | -+-------------------------+---------------------------------------------------------+ - -Subgroups ---------- - -Groups with double colons (::) are considered subgroups. -This allows for finer control of group rules. - -For example, the case of keywords, labels and names can be set independently. - -Configuring Groups ------------------- - -Refer to the section `Configuring a Rule Group `_ for information on how to configure rule groups. diff --git a/docs/rule_groups/alignment_rule_group.rst b/docs/rule_groups/alignment_rule_group.rst new file mode 100644 index 00000000..215fdc69 --- /dev/null +++ b/docs/rule_groups/alignment_rule_group.rst @@ -0,0 +1,82 @@ + +Alignment Rule Group +____________________ + +Rules Enforcing Alignment Rule Group +#################################### + +* `after_002 `_ +* `architecture_026 `_ +* `architecture_027 `_ +* `architecture_029 `_ +* `architecture_400 `_ +* `assert_400 `_ +* `block_400 `_ +* `block_401 `_ +* `block_402 `_ +* `case_011 `_ +* `case_generate_statement_400 `_ +* `component_017 `_ +* `component_020 `_ +* `concurrent_003 `_ +* `concurrent_006 `_ +* `concurrent_008 `_ +* `concurrent_009 `_ +* `concurrent_400 `_ +* `concurrent_401 `_ +* `constant_012 `_ +* `constant_014 `_ +* `declarative_part_400 `_ +* `entity_017 `_ +* `entity_018 `_ +* `entity_020 `_ +* `function_012 `_ +* `function_015 `_ +* `generate_400 `_ +* `generate_401 `_ +* `generate_402 `_ +* `generate_403 `_ +* `generate_404 `_ +* `generate_405 `_ +* `if_009 `_ +* `instantiation_010 `_ +* `instantiation_029 `_ +* `library_009 `_ +* `package_019 `_ +* `package_400 `_ +* `package_401 `_ +* `package_402 `_ +* `package_body_400 `_ +* `package_body_401 `_ +* `package_body_402 `_ +* `procedure_010 `_ +* `procedure_401 `_ +* `procedure_410 `_ +* `procedure_411 `_ +* `procedure_412 `_ +* `procedure_call_400 `_ +* `procedure_call_401 `_ +* `process_020 `_ +* `process_028 `_ +* `process_031 `_ +* `process_033 `_ +* `process_034 `_ +* `process_035 `_ +* `process_400 `_ +* `process_401 `_ +* `report_statement_400 `_ +* `selected_assignment_400 `_ +* `sequential_004 `_ +* `sequential_400 `_ +* `sequential_401 `_ +* `sequential_402 `_ +* `signal_012 `_ +* `signal_400 `_ +* `subprogram_body_400 `_ +* `subprogram_body_401 `_ +* `type_400 `_ +* `variable_400 `_ +* `variable_assignment_004 `_ +* `variable_assignment_400 `_ +* `variable_assignment_401 `_ + diff --git a/docs/rule_groups/blank_line_rule_group.rst b/docs/rule_groups/blank_line_rule_group.rst new file mode 100644 index 00000000..6244804c --- /dev/null +++ b/docs/rule_groups/blank_line_rule_group.rst @@ -0,0 +1,87 @@ + +Blank Line Rule Group +--------------------- + +Rules Enforcing Blank Line Rule Group +##################################### + +* `architecture_003 `_ +* `architecture_015 `_ +* `architecture_016 `_ +* `architecture_017 `_ +* `architecture_018 `_ +* `architecture_200 `_ +* `block_200 `_ +* `block_201 `_ +* `block_202 `_ +* `block_203 `_ +* `block_204 `_ +* `block_205 `_ +* `case_007 `_ +* `case_009 `_ +* `case_010 `_ +* `case_200 `_ +* `case_201 `_ +* `component_003 `_ +* `component_016 `_ +* `component_018 `_ +* `concurrent_010 `_ +* `context_003 `_ +* `context_023 `_ +* `context_024 `_ +* `context_025 `_ +* `entity_003 `_ +* `entity_016 `_ +* `entity_200 `_ +* `entity_201 `_ +* `entity_202 `_ +* `entity_203 `_ +* `function_006 `_ +* `generate_003 `_ +* `generate_004 `_ +* `generic_019 `_ +* `if_006 `_ +* `if_007 `_ +* `if_008 `_ +* `if_010 `_ +* `if_011 `_ +* `if_030 `_ +* `if_031 `_ +* `instantiation_004 `_ +* `instantiation_019 `_ +* `library_003 `_ +* `library_007 `_ +* `loop_statement_200 `_ +* `loop_statement_201 `_ +* `loop_statement_202 `_ +* `loop_statement_203 `_ +* `package_003 `_ +* `package_011 `_ +* `package_012 `_ +* `package_body_200 `_ +* `package_body_201 `_ +* `package_body_202 `_ +* `package_body_203 `_ +* `port_001 `_ +* `port_022 `_ +* `port_024 `_ +* `port_map_200 `_ +* `procedure_200 `_ +* `process_011 `_ +* `process_015 `_ +* `process_021 `_ +* `process_022 `_ +* `process_023 `_ +* `process_026 `_ +* `process_027 `_ +* `record_type_definition_200 `_ +* `record_type_definition_201 `_ +* `subprogram_body_201 `_ +* `subprogram_body_202 `_ +* `subprogram_body_203 `_ +* `subprogram_body_204 `_ +* `subprogram_body_205 `_ +* `type_010 `_ +* `type_011 `_ +* `whitespace_200 `_ + diff --git a/docs/rule_groups/case_keyword_rule_group.rst b/docs/rule_groups/case_keyword_rule_group.rst new file mode 100644 index 00000000..7717f051 --- /dev/null +++ b/docs/rule_groups/case_keyword_rule_group.rst @@ -0,0 +1,136 @@ + +Case::Keyword Rule Group +------------------------ + +Rules Enforcing Case::Keyword Rule Group +######################################## + +* `alias_declaration_500 `_ +* `alias_declaration_501 `_ +* `architecture_004 `_ +* `architecture_009 `_ +* `architecture_019 `_ +* `architecture_020 `_ +* `architecture_021 `_ +* `architecture_028 `_ +* `attribute_500 `_ +* `attribute_declaration_500 `_ +* `attribute_specification_500 `_ +* `attribute_specification_502 `_ +* `attribute_specification_503 `_ +* `block_501 `_ +* `block_502 `_ +* `block_503 `_ +* `block_504 `_ +* `block_505 `_ +* `case_014 `_ +* `case_015 `_ +* `case_016 `_ +* `case_017 `_ +* `case_018 `_ +* `case_generate_alternative_500 `_ +* `case_generate_alternative_501 `_ +* `case_generate_statement_500 `_ +* `case_generate_statement_501 `_ +* `component_004 `_ +* `component_006 `_ +* `component_010 `_ +* `component_014 `_ +* `conditional_expressions_500 `_ +* `conditional_expressions_501 `_ +* `conditional_waveforms_500 `_ +* `conditional_waveforms_501 `_ +* `constant_002 `_ +* `context_004 `_ +* `context_013 `_ +* `context_014 `_ +* `context_015 `_ +* `context_ref_003 `_ +* `entity_004 `_ +* `entity_006 `_ +* `entity_010 `_ +* `entity_014 `_ +* `entity_500 `_ +* `entity_specification_500 `_ +* `entity_specification_501 `_ +* `exponent_500 `_ +* `file_002 `_ +* `for_generate_statement_500 `_ +* `for_generate_statement_501 `_ +* `function_004 `_ +* `function_005 `_ +* `function_013 `_ +* `function_014 `_ +* `function_502 `_ +* `generate_009 `_ +* `generate_010 `_ +* `generate_500 `_ +* `generate_501 `_ +* `generic_009 `_ +* `generic_017 `_ +* `generic_map_001 `_ +* `ieee_500 `_ +* `if_generate_statement_500 `_ +* `if_generate_statement_501 `_ +* `if_generate_statement_502 `_ +* `if_generate_statement_503 `_ +* `if_025 `_ +* `if_026 `_ +* `if_027 `_ +* `if_028 `_ +* `if_029 `_ +* `if_034 `_ +* `instantiation_027 `_ +* `instantiation_031 `_ +* `iteration_scheme_500 `_ +* `iteration_scheme_501 `_ +* `library_004 `_ +* `library_005 `_ +* `logical_operator_500 `_ +* `loop_statement_500 `_ +* `loop_statement_501 `_ +* `loop_statement_502 `_ +* `package_004 `_ +* `package_006 `_ +* `package_013 `_ +* `package_018 `_ +* `package_body_500 `_ +* `package_body_501 `_ +* `package_body_503 `_ +* `package_body_504 `_ +* `package_body_505 `_ +* `package_body_506 `_ +* `port_017 `_ +* `port_018 `_ +* `port_019 `_ +* `port_map_001 `_ +* `procedure_008 `_ +* `procedure_009 `_ +* `procedure_500 `_ +* `procedure_502 `_ +* `procedure_503 `_ +* `procedure_504 `_ +* `procedure_505 `_ +* `procedure_call_501 `_ +* `process_004 `_ +* `process_005 `_ +* `process_008 `_ +* `process_009 `_ +* `process_013 `_ +* `range_001 `_ +* `range_002 `_ +* `record_type_definition_500 `_ +* `record_type_definition_501 `_ +* `record_type_definition_502 `_ +* `report_statement_500 `_ +* `report_statement_501 `_ +* `selected_assignment_500 `_ +* `selected_assignment_501 `_ +* `selected_assignment_502 `_ +* `selected_assignment_503 `_ +* `signal_002 `_ +* `type_002 `_ +* `type_013 `_ +* `use_clause_503 `_ +* `variable_002 `_ + diff --git a/docs/rule_groups/case_label_rule_group.rst b/docs/rule_groups/case_label_rule_group.rst new file mode 100644 index 00000000..f5b6b095 --- /dev/null +++ b/docs/rule_groups/case_label_rule_group.rst @@ -0,0 +1,18 @@ + +Case::Label Rule Group +---------------------- + +Rules Enforcing Case::Label Rule Group +###################################### + +* `block_500 `_ +* `block_506 `_ +* `generate_005 `_ +* `generate_012 `_ +* `instantiation_008 `_ +* `loop_statement_503 `_ +* `loop_statement_504 `_ +* `procedure_call_500 `_ +* `process_017 `_ +* `process_019 `_ + diff --git a/docs/rule_groups/case_name_rule_group.rst b/docs/rule_groups/case_name_rule_group.rst new file mode 100644 index 00000000..b0b62c92 --- /dev/null +++ b/docs/rule_groups/case_name_rule_group.rst @@ -0,0 +1,47 @@ + +Case::Name Rule Group +--------------------- + +Rules Enforcing Case::Name Rule Group +##################################### + +* `alias_declaration_502 `_ +* `architecture_011 `_ +* `architecture_013 `_ +* `architecture_014 `_ +* `attribute_declaration_501 `_ +* `attribute_declaration_502 `_ +* `attribute_specification_501 `_ +* `component_008 `_ +* `component_012 `_ +* `constant_004 `_ +* `context_012 `_ +* `context_016 `_ +* `context_ref_500 `_ +* `context_ref_501 `_ +* `entity_008 `_ +* `entity_012 `_ +* `entity_specification_503 `_ +* `function_017 `_ +* `function_506 `_ +* `generic_007 `_ +* `generic_map_002 `_ +* `instantiation_009 `_ +* `instantiation_028 `_ +* `library_500 `_ +* `package_008 `_ +* `package_010 `_ +* `package_body_502 `_ +* `package_body_507 `_ +* `port_010 `_ +* `port_map_002 `_ +* `procedure_501 `_ +* `procedure_506 `_ +* `signal_004 `_ +* `type_004 `_ +* `type_500 `_ +* `use_clause_500 `_ +* `use_clause_501 `_ +* `use_clause_502 `_ +* `variable_004 `_ + diff --git a/docs/rule_groups/case_rule_group.rst b/docs/rule_groups/case_rule_group.rst new file mode 100644 index 00000000..d0073bd3 --- /dev/null +++ b/docs/rule_groups/case_rule_group.rst @@ -0,0 +1,197 @@ + +Case Rule Group +--------------- + +Rules Enforcing Case Rule Group +############################### + +* `alias_declaration_500 `_ +* `alias_declaration_501 `_ +* `alias_declaration_502 `_ +* `alias_declaration_503 `_ +* `architecture_004 `_ +* `architecture_009 `_ +* `architecture_011 `_ +* `architecture_013 `_ +* `architecture_014 `_ +* `architecture_019 `_ +* `architecture_020 `_ +* `architecture_021 `_ +* `architecture_028 `_ +* `architecture_600 `_ +* `architecture_601 `_ +* `attribute_500 `_ +* `attribute_declaration_500 `_ +* `attribute_declaration_501 `_ +* `attribute_declaration_502 `_ +* `attribute_specification_500 `_ +* `attribute_specification_501 `_ +* `attribute_specification_502 `_ +* `attribute_specification_503 `_ +* `block_500 `_ +* `block_501 `_ +* `block_502 `_ +* `block_503 `_ +* `block_504 `_ +* `block_505 `_ +* `block_506 `_ +* `case_014 `_ +* `case_015 `_ +* `case_016 `_ +* `case_017 `_ +* `case_018 `_ +* `case_generate_alternative_500 `_ +* `case_generate_alternative_501 `_ +* `case_generate_statement_500 `_ +* `case_generate_statement_501 `_ +* `component_004 `_ +* `component_006 `_ +* `component_008 `_ +* `component_010 `_ +* `component_012 `_ +* `component_014 `_ +* `conditional_expressions_500 `_ +* `conditional_expressions_501 `_ +* `conditional_waveforms_500 `_ +* `conditional_waveforms_501 `_ +* `constant_002 `_ +* `constant_004 `_ +* `constant_013 `_ +* `context_004 `_ +* `context_012 `_ +* `context_013 `_ +* `context_014 `_ +* `context_015 `_ +* `context_016 `_ +* `context_ref_003 `_ +* `context_ref_500 `_ +* `context_ref_501 `_ +* `entity_004 `_ +* `entity_006 `_ +* `entity_008 `_ +* `entity_010 `_ +* `entity_012 `_ +* `entity_014 `_ +* `entity_500 `_ +* `entity_600 `_ +* `entity_specification_500 `_ +* `entity_specification_501 `_ +* `entity_specification_503 `_ +* `exponent_500 `_ +* `file_002 `_ +* `for_generate_statement_500 `_ +* `for_generate_statement_501 `_ +* `function_004 `_ +* `function_005 `_ +* `function_010 `_ +* `function_013 `_ +* `function_014 `_ +* `function_017 `_ +* `function_502 `_ +* `function_506 `_ +* `generate_005 `_ +* `generate_009 `_ +* `generate_010 `_ +* `generate_012 `_ +* `generate_500 `_ +* `generate_501 `_ +* `generic_007 `_ +* `generic_009 `_ +* `generic_017 `_ +* `generic_map_001 `_ +* `generic_map_002 `_ +* `ieee_500 `_ +* `if_generate_statement_500 `_ +* `if_generate_statement_501 `_ +* `if_generate_statement_502 `_ +* `if_generate_statement_503 `_ +* `if_025 `_ +* `if_026 `_ +* `if_027 `_ +* `if_028 `_ +* `if_029 `_ +* `if_034 `_ +* `instantiation_008 `_ +* `instantiation_009 `_ +* `instantiation_027 `_ +* `instantiation_028 `_ +* `instantiation_031 `_ +* `iteration_scheme_500 `_ +* `iteration_scheme_501 `_ +* `library_004 `_ +* `library_005 `_ +* `library_500 `_ +* `logical_operator_500 `_ +* `loop_statement_500 `_ +* `loop_statement_501 `_ +* `loop_statement_502 `_ +* `loop_statement_503 `_ +* `loop_statement_504 `_ +* `package_004 `_ +* `package_006 `_ +* `package_008 `_ +* `package_010 `_ +* `package_013 `_ +* `package_018 `_ +* `package_body_500 `_ +* `package_body_501 `_ +* `package_body_502 `_ +* `package_body_503 `_ +* `package_body_504 `_ +* `package_body_505 `_ +* `package_body_506 `_ +* `package_body_507 `_ +* `port_010 `_ +* `port_017 `_ +* `port_018 `_ +* `port_019 `_ +* `port_map_001 `_ +* `port_map_002 `_ +* `procedure_007 `_ +* `procedure_008 `_ +* `procedure_009 `_ +* `procedure_500 `_ +* `procedure_501 `_ +* `procedure_502 `_ +* `procedure_503 `_ +* `procedure_504 `_ +* `procedure_505 `_ +* `procedure_506 `_ +* `procedure_507 `_ +* `procedure_call_500 `_ +* `procedure_call_501 `_ +* `process_004 `_ +* `process_005 `_ +* `process_008 `_ +* `process_009 `_ +* `process_013 `_ +* `process_017 `_ +* `process_019 `_ +* `range_001 `_ +* `range_002 `_ +* `record_type_definition_500 `_ +* `record_type_definition_501 `_ +* `record_type_definition_502 `_ +* `report_statement_500 `_ +* `report_statement_501 `_ +* `selected_assignment_500 `_ +* `selected_assignment_501 `_ +* `selected_assignment_502 `_ +* `selected_assignment_503 `_ +* `signal_002 `_ +* `signal_004 `_ +* `signal_014 `_ +* `subtype_002 `_ +* `type_002 `_ +* `type_004 `_ +* `type_013 `_ +* `type_014 `_ +* `type_500 `_ +* `use_clause_500 `_ +* `use_clause_501 `_ +* `use_clause_502 `_ +* `use_clause_503 `_ +* `variable_002 `_ +* `variable_004 `_ +* `variable_011 `_ + diff --git a/docs/rule_groups/deleteme.sed b/docs/rule_groups/deleteme.sed new file mode 100644 index 00000000..71fca9fe --- /dev/null +++ b/docs/rule_groups/deleteme.sed @@ -0,0 +1,3 @@ +/#.*>/ { + s/-/_/g +} diff --git a/docs/rule_groups/indent_rule_group.rst b/docs/rule_groups/indent_rule_group.rst new file mode 100644 index 00000000..27569807 --- /dev/null +++ b/docs/rule_groups/indent_rule_group.rst @@ -0,0 +1,92 @@ + +Indent Rule Group +----------------- + +Rules Enforcing Indent Rule Group +################################# + +* `alias_declaration_300 `_ +* `architecture_001 `_ +* `architecture_007 `_ +* `architecture_008 `_ +* `assert_001 `_ +* `attribute_declaration_300 `_ +* `attribute_specification_300 `_ +* `block_300 `_ +* `block_301 `_ +* `block_302 `_ +* `case_001 `_ +* `case_013 `_ +* `comment_010 `_ +* `component_001 `_ +* `component_009 `_ +* `concurrent_001 `_ +* `constant_001 `_ +* `context_001 `_ +* `context_020 `_ +* `context_ref_001 `_ +* `entity_001 `_ +* `entity_009 `_ +* `entity_300 `_ +* `exit_statement_300 `_ +* `file_001 `_ +* `function_001 `_ +* `function_008 `_ +* `function_016 `_ +* `function_300 `_ +* `generate_001 `_ +* `generate_006 `_ +* `generate_007 `_ +* `generate_016 `_ +* `generate_018 `_ +* `generic_002 `_ +* `generic_004 `_ +* `generic_008 `_ +* `if_generate_statement_300 `_ +* `if_generate_statement_301 `_ +* `if_001 `_ +* `if_012 `_ +* `if_013 `_ +* `if_014 `_ +* `instantiation_001 `_ +* `iteration_scheme_300 `_ +* `iteration_scheme_301 `_ +* `library_001 `_ +* `library_008 `_ +* `loop_statement_300 `_ +* `loop_statement_301 `_ +* `loop_statement_302 `_ +* `package_001 `_ +* `package_015 `_ +* `package_body_300 `_ +* `package_body_301 `_ +* `port_002 `_ +* `port_004 `_ +* `port_015 `_ +* `procedure_001 `_ +* `procedure_002 `_ +* `procedure_003 `_ +* `procedure_004 `_ +* `procedure_005 `_ +* `procedure_006 `_ +* `procedure_call_300 `_ +* `procedure_call_301 `_ +* `procedure_call_302 `_ +* `process_001 `_ +* `process_003 `_ +* `process_006 `_ +* `record_type_definition_300 `_ +* `record_type_definition_301 `_ +* `report_statement_300 `_ +* `selected_assignment_300 `_ +* `sequential_001 `_ +* `signal_001 `_ +* `subtype_001 `_ +* `type_001 `_ +* `type_005 `_ +* `type_012 `_ +* `type_016 `_ +* `variable_001 `_ +* `variable_assignment_001 `_ +* `wait_001 `_ + diff --git a/docs/rule_groups/length_rule_group.rst b/docs/rule_groups/length_rule_group.rst new file mode 100644 index 00000000..a8bc4a62 --- /dev/null +++ b/docs/rule_groups/length_rule_group.rst @@ -0,0 +1,11 @@ + +Length Rule Group +----------------- + +Rules Enforcing Length Rule Group +################################# + +* `length_001 `_ +* `length_002 `_ +* `length_003 `_ + diff --git a/docs/rule_groups/naming_rule_group.rst b/docs/rule_groups/naming_rule_group.rst new file mode 100644 index 00000000..7a790d5b --- /dev/null +++ b/docs/rule_groups/naming_rule_group.rst @@ -0,0 +1,51 @@ + +Naming Rule Group +----------------- + +Rules Enforcing Naming Rule Group +################################# + +* `alias_declaration_600 `_ +* `alias_declaration_601 `_ +* `architecture_025 `_ +* `block_600 `_ +* `block_601 `_ +* `constant_015 `_ +* `constant_600 `_ +* `generate_017 `_ +* `generate_600 `_ +* `generic_020 `_ +* `generic_600 `_ +* `generic_map_600 `_ +* `generic_map_601 `_ +* `instantiation_600 `_ +* `instantiation_601 `_ +* `loop_statement_600 `_ +* `loop_statement_601 `_ +* `package_016 `_ +* `package_017 `_ +* `package_body_600 `_ +* `package_body_601 `_ +* `port_011 `_ +* `port_025 `_ +* `port_600 `_ +* `port_601 `_ +* `port_602 `_ +* `port_603 `_ +* `port_604 `_ +* `port_605 `_ +* `port_606 `_ +* `port_607 `_ +* `port_608 `_ +* `port_609 `_ +* `process_036 `_ +* `process_600 `_ +* `signal_008 `_ +* `signal_600 `_ +* `subtype_004 `_ +* `subtype_600 `_ +* `type_015 `_ +* `type_600 `_ +* `variable_012 `_ +* `variable_600 `_ + diff --git a/docs/rule_groups/overview.rst b/docs/rule_groups/overview.rst new file mode 100644 index 00000000..dbb5dc3a --- /dev/null +++ b/docs/rule_groups/overview.rst @@ -0,0 +1,49 @@ +Overview +======== + +Rule groups allow for easier configuration of rules that perform similar functions. +Using rule groups can make upgrading VSG versions easier as new rules are added. + +The following is a list of the rule groups: + ++-------------------------+---------------------------------------------------------+ +| Group | Description | ++-------------------------+---------------------------------------------------------+ +| alignment | Horizontal alignment rules. | ++-------------------------+---------------------------------------------------------+ +| blank_line | Vertical alignment rules. | ++-------------------------+---------------------------------------------------------+ +| case | All rules involving lower and upper casing. | ++-------------------------+---------------------------------------------------------+ +| case::keyword | Casing rules for VHDL keywords. | ++-------------------------+---------------------------------------------------------+ +| case::label | Casing rules for labels. | ++-------------------------+---------------------------------------------------------+ +| case::name | Casing rules for identifiers, etc... | ++-------------------------+---------------------------------------------------------+ +| length | Rules restricting length. | ++-------------------------+---------------------------------------------------------+ +| indent | Rules involving line indents. | ++-------------------------+---------------------------------------------------------+ +| naming | Rules for constraining how identifiers etc.. are named. | ++-------------------------+---------------------------------------------------------+ +| structure | Rules dictating the structure of the code. | ++-------------------------+---------------------------------------------------------+ +| structure::optional | Rules for optional VHDL language items. | ++-------------------------+---------------------------------------------------------+ +| whitespace | Rules for managing whitespace. | ++-------------------------+---------------------------------------------------------+ + +Subgroups +--------- + +Groups with double colons (::) are considered subgroups. +This allows for finer control of group rules. + +For example, the case of keywords, labels and names can be set independently. + +Configuring Groups +------------------ + +Refer to the section `Configuring a Rule Group `_ for information on how to configure rule groups. + diff --git a/docs/rule_groups/structure_optional_rule_group.rst b/docs/rule_groups/structure_optional_rule_group.rst new file mode 100644 index 00000000..d9fca182 --- /dev/null +++ b/docs/rule_groups/structure_optional_rule_group.rst @@ -0,0 +1,20 @@ + +Structure::Optional Rule Group +------------------------------ + +Rules Enforcing Structure::Optional Rule Group +############################################## + +* `architecture_010 `_ +* `architecture_024 `_ +* `block_002 `_ +* `block_007 `_ +* `component_021 `_ +* `context_021 `_ +* `context_022 `_ +* `entity_019 `_ +* `generate_011 `_ +* `instantiation_033 `_ +* `process_012 `_ +* `record_type_definition_005 `_ + diff --git a/docs/rule_groups/structure_rule_group.rst b/docs/rule_groups/structure_rule_group.rst new file mode 100644 index 00000000..a6eab66a --- /dev/null +++ b/docs/rule_groups/structure_rule_group.rst @@ -0,0 +1,170 @@ + +Structure Rule Group +-------------------- + +Rules Enforcing Structure Rule Group +#################################### + +* `after_001 `_ +* `after_003 `_ +* `alias_declaration_001 `_ +* `architecture_005 `_ +* `architecture_006 `_ +* `architecture_010 `_ +* `architecture_024 `_ +* `assert_002 `_ +* `assert_003 `_ +* `assert_004 `_ +* `assert_005 `_ +* `block_001 `_ +* `block_002 `_ +* `block_003 `_ +* `block_004 `_ +* `block_005 `_ +* `block_006 `_ +* `block_007 `_ +* `block_comment_001 `_ +* `block_comment_002 `_ +* `block_comment_003 `_ +* `case_012 `_ +* `case_019 `_ +* `case_020 `_ +* `comment_011 `_ +* `component_005 `_ +* `component_019 `_ +* `component_021 `_ +* `concurrent_005 `_ +* `concurrent_007 `_ +* `concurrent_011 `_ +* `concurrent_012 `_ +* `constant_007 `_ +* `constant_016 `_ +* `constant_017 `_ +* `context_005 `_ +* `context_006 `_ +* `context_007 `_ +* `context_008 `_ +* `context_009 `_ +* `context_010 `_ +* `context_011 `_ +* `context_021 `_ +* `context_022 `_ +* `context_ref_005 `_ +* `entity_005 `_ +* `entity_015 `_ +* `entity_019 `_ +* `entity_021 `_ +* `entity_022 `_ +* `entity_023 `_ +* `entity_024 `_ +* `entity_025 `_ +* `entity_026 `_ +* `entity_027 `_ +* `entity_028 `_ +* `entity_029 `_ +* `function_009 `_ +* `generate_011 `_ +* `generate_015 `_ +* `generate_019 `_ +* `generic_010 `_ +* `generic_013 `_ +* `generic_016 `_ +* `generic_018 `_ +* `generic_021 `_ +* `generic_map_003 `_ +* `generic_map_004 `_ +* `generic_map_005 `_ +* `generic_map_008 `_ +* `if_002 `_ +* `if_020 `_ +* `if_021 `_ +* `if_022 `_ +* `if_023 `_ +* `if_024 `_ +* `if_035 `_ +* `if_036 `_ +* `instantiation_005 `_ +* `instantiation_012 `_ +* `instantiation_023 `_ +* `instantiation_033 `_ +* `instantiation_034 `_ +* `instantiation_035 `_ +* `library_010 `_ +* `library_011 `_ +* `loop_statement_001 `_ +* `loop_statement_002 `_ +* `loop_statement_003 `_ +* `loop_statement_004 `_ +* `loop_statement_005 `_ +* `loop_statement_006 `_ +* `loop_statement_007 `_ +* `package_005 `_ +* `package_007 `_ +* `package_014 `_ +* `package_body_001 `_ +* `package_body_002 `_ +* `package_body_003 `_ +* `port_012 `_ +* `port_013 `_ +* `port_014 `_ +* `port_016 `_ +* `port_021 `_ +* `port_023 `_ +* `port_026 `_ +* `port_027 `_ +* `port_map_003 `_ +* `port_map_004 `_ +* `port_map_005 `_ +* `port_map_008 `_ +* `port_map_009 `_ +* `procedure_011 `_ +* `procedure_call_001 `_ +* `procedure_call_002 `_ +* `procedure_call_003 `_ +* `process_010 `_ +* `process_012 `_ +* `process_016 `_ +* `process_018 `_ +* `process_029 `_ +* `process_030 `_ +* `process_032 `_ +* `record_type_definition_001 `_ +* `record_type_definition_002 `_ +* `record_type_definition_003 `_ +* `record_type_definition_004 `_ +* `record_type_definition_005 `_ +* `record_type_definition_006 `_ +* `record_type_definition_007 `_ +* `report_statement_001 `_ +* `report_statement_002 `_ +* `selected_assignment_001 `_ +* `selected_assignment_002 `_ +* `selected_assignment_003 `_ +* `selected_assignment_004 `_ +* `selected_assignment_005 `_ +* `selected_assignment_006 `_ +* `selected_assignment_007 `_ +* `selected_assignment_008 `_ +* `selected_assignment_009 `_ +* `selected_assignment_010 `_ +* `selected_assignment_011 `_ +* `selected_assignment_012 `_ +* `sequential_006 `_ +* `sequential_007 `_ +* `sequential_008 `_ +* `sequential_009 `_ +* `signal_007 `_ +* `signal_015 `_ +* `signal_017 `_ +* `source_file_001 `_ +* `type_008 `_ +* `type_009 `_ +* `type_017 `_ +* `type_018 `_ +* `variable_007 `_ +* `variable_017 `_ +* `variable_assignment_006 `_ +* `variable_assignment_007 `_ +* `variable_assignment_008 `_ +* `when_001 `_ + diff --git a/docs/rule_groups/whitespace_rule_group.rst b/docs/rule_groups/whitespace_rule_group.rst new file mode 100644 index 00000000..08388808 --- /dev/null +++ b/docs/rule_groups/whitespace_rule_group.rst @@ -0,0 +1,141 @@ + +Alignment Rule Group +-------------------- + +Rules Enforcing Alignment Rule Group +#################################### + +* `alias_declaration_100 `_ +* `alias_declaration_101 `_ +* `alias_declaration_102 `_ +* `architecture_012 `_ +* `architecture_022 `_ +* `architecture_030 `_ +* `architecture_031 `_ +* `architecture_032 `_ +* `architecture_033 `_ +* `attribute_declaration_100 `_ +* `attribute_declaration_101 `_ +* `attribute_specification_100 `_ +* `attribute_specification_101 `_ +* `block_100 `_ +* `block_101 `_ +* `case_002 `_ +* `case_003 `_ +* `case_004 `_ +* `case_005 `_ +* `case_006 `_ +* `comment_004 `_ +* `comment_100 `_ +* `component_002 `_ +* `component_007 `_ +* `component_011 `_ +* `component_013 `_ +* `concurrent_002 `_ +* `concurrent_004 `_ +* `conditional_expressions_100 `_ +* `conditional_expressions_101 `_ +* `conditional_expressions_102 `_ +* `conditional_expressions_103 `_ +* `conditional_waveforms_100 `_ +* `conditional_waveforms_101 `_ +* `conditional_waveforms_102 `_ +* `conditional_waveforms_103 `_ +* `constant_005 `_ +* `constant_006 `_ +* `constant_010 `_ +* `constant_100 `_ +* `context_002 `_ +* `context_017 `_ +* `context_018 `_ +* `context_019 `_ +* `context_ref_002 `_ +* `element_association_100 `_ +* `element_association_101 `_ +* `entity_002 `_ +* `entity_007 `_ +* `entity_011 `_ +* `entity_013 `_ +* `entity_specification_100 `_ +* `entity_specification_101 `_ +* `function_100 `_ +* `function_101 `_ +* `generate_002 `_ +* `generate_008 `_ +* `generate_013 `_ +* `generate_014 `_ +* `generic_003 `_ +* `generic_005 `_ +* `generic_006 `_ +* `generic_014 `_ +* `generic_map_006 `_ +* `generic_map_007 `_ +* `if_003 `_ +* `if_004 `_ +* `if_005 `_ +* `if_015 `_ +* `instantiation_002 `_ +* `instantiation_003 `_ +* `instantiation_032 `_ +* `iteration_scheme_100 `_ +* `iteration_scheme_101 `_ +* `library_002 `_ +* `library_006 `_ +* `loop_statement_100 `_ +* `loop_statement_101 `_ +* `loop_statement_102 `_ +* `loop_statement_103 `_ +* `loop_statement_104 `_ +* `package_002 `_ +* `package_009 `_ +* `package_body_100 `_ +* `package_body_101 `_ +* `port_003 `_ +* `port_007 `_ +* `port_008 `_ +* `port_009 `_ +* `port_020 `_ +* `port_map_007 `_ +* `procedure_100 `_ +* `procedure_101 `_ +* `procedure_call_100 `_ +* `procedure_call_101 `_ +* `process_002 `_ +* `process_007 `_ +* `process_014 `_ +* `process_024 `_ +* `process_025 `_ +* `record_type_definition_100 `_ +* `record_type_definition_101 `_ +* `report_statement_100 `_ +* `report_statement_101 `_ +* `selected_assignment_100 `_ +* `selected_assignment_101 `_ +* `selected_assignment_102 `_ +* `selected_assignment_103 `_ +* `selected_assignment_104 `_ +* `selected_assignment_105 `_ +* `selected_assignment_106 `_ +* `selected_assignment_107 `_ +* `sequential_002 `_ +* `sequential_003 `_ +* `signal_005 `_ +* `signal_006 `_ +* `type_006 `_ +* `type_007 `_ +* `variable_005 `_ +* `variable_006 `_ +* `variable_assignment_002 `_ +* `variable_assignment_003 `_ +* `whitespace_001 `_ +* `whitespace_002 `_ +* `whitespace_003 `_ +* `whitespace_004 `_ +* `whitespace_005 `_ +* `whitespace_006 `_ +* `whitespace_007 `_ +* `whitespace_008 `_ +* `whitespace_010 `_ +* `whitespace_011 `_ +* `whitespace_013 `_ + diff --git a/vsg/tests/rule_doc/test_rule_doc.py b/vsg/tests/rule_doc/test_rule_doc.py index 73726a8a..853885aa 100644 --- a/vsg/tests/rule_doc/test_rule_doc.py +++ b/vsg/tests/rule_doc/test_rule_doc.py @@ -99,6 +99,41 @@ class testDocGen(unittest.TestCase): self.assertEqual(lExpected, lActual) + def test_rule_group_links(self): + self.maxDiff = None + oVhdlFile = vhdlFile.vhdlFile(['']) + oRuleList = rule_list.rule_list(oVhdlFile, None, None) + lActual = [] + + dConfigurationFiles = {} + for oRule in oRuleList.rules: + for sGroup in oRule.groups: + dConfigurationFiles[sGroup] = [] + + for oRule in oRuleList.rules: + for sGroup in oRule.groups: + dConfigurationFiles[sGroup].append(oRule.unique_id) + + for sKey in list(dConfigurationFiles.keys()): + sFileName = sKey.replace('::', '_') + '_rule_group.rst' + sFullPathFileName = os.path.join(sResultsDir,'..','..','..','docs','rule_groups',sFileName) +# print(sFullPathFileName) + lFile = [] + utils.read_file(sFullPathFileName, lFile) + lActual = [] + bStartProcessing = False + for sLine in lFile: + if bStartProcessing: + if sLine.startswith('*'): + lLine = sLine.split() + lActual.append(lLine[1][1:]) + if sLine.startswith('Rules Enforcing'): + bStartProcessing = True +# print(dConfigurationFiles[sKey]) + self.assertEqual(dConfigurationFiles[sKey], lActual) + + + def test_alias_declaration_rules_doc(self): lExpected, lActual = compare_files('alias_declaration')