.. _configuring-optional-items: Configuring Optional Items -------------------------- There are optional language items in VHDL. In the Language Reference Manual (LRM) they are denoted with square brackets []. Using many of these optional items improves the readability of VHDL code. However, it may not fit the current style of existing code bases. The rules checking the optional items can be configured to add or remove them. .. |action| replace:: :code:`action` .. |action__add| replace:: :code:`add` = Add the optional item. .. |action__remove| replace:: :code:`remove` = Remove the optional item. .. |values| replace:: :code:`add`, :code:`remove` .. |default_value| replace:: :code:`add` +----------------------+----------+-----------------+----------------------------+ | Option | Values | Default Value | Description | +======================+==========+=================+============================+ | |action| | |values| | |default_value| | * |action__add| | | | | | * |action__remove| | +----------------------+----------+-----------------+----------------------------+ This is an example of how to configure these options. .. code-block:: yaml rule : architecture_010: action: 'add' .. NOTE:: The following examples are using rule architecture_010. Example: |action| set to :code:`add` #################################### **Violation** .. code-block:: yaml architecture rtl of fifo is begin end fifo; **Violation** .. code-block:: yaml architecture rtl of fifo is begin end architecture fifo; Example: |action| set to :code:`remove` ####################################### **Violation** .. code-block:: yaml architecture rtl of fifo is begin end architecture fifo; **Violation** .. code-block:: yaml architecture rtl of fifo is begin end fifo; Rules Enforcing Optional Items ############################## * `architecture_010 `_ * `architecture_024 `_ * `block_002 `_ * `block_007 `_ * `component_021 `_ * `context_021 `_ * `context_022 `_ * `entity_015 `_ * `entity_019 `_ * `function_018 `_ * `generate_011 `_ * `instantiation_033 `_ * `loop_statement_007 `_ * `package_007 `_ * `package_014 `_ * `package_body_002 `_ * `package_body_003 `_ * `procedure_012 `_ * `process_012 `_ * `process_018 `_ * `record_type_definition_005 `_