.. _configuring-blank-lines: Configuring Blank Lines ----------------------- There are rules which will check for blank lines either above or below a line. These rules are designed to improve readability by separating code using blank lines. There are several options to these rules: .. |style| replace:: :code:`style` .. |no_blank_line| replace:: :code:`no_blank_line` .. |require_blank_line| replace:: :code:`require_blank_line` .. |require_blank_line_unless_pragma| replace:: :code:`require_blank_line_unless_pragma` .. |style__no_blank_line| replace:: :code:`no_blank_line` = Removes blank lines on the line above or below .. |style__require_blank_line| replace:: :code:`require_blank_line` = Requires a blank line on the line above or below .. |style__require_blank_line_unless_pragma| replace:: :code:`require_blank_line_unless_pragma` = Requires a blank line on the line above or below unless the line has a pragma .. |style_values| replace:: :code:`no_blank_line`, :code:`require_blank_line`, :code:`require_blank_line_unless_pragma` .. |style_default| replace:: Rule dependent +-------------------------+------------------------------------+-----------------+----------------------------------------------+ | Option | Values | Default | Description | +=========================+====================================+=================+==============================================+ | |style| | |no_blank_line| | |style_default| | * |style__no_blank_line| | | | |require_blank_line| | | * |style__require_blank_line| | | | |require_blank_line_unless_pragma| | | * |style__require_blank_line_unless_pragma| | +-------------------------+------------------------------------+-----------------+----------------------------------------------+ This is an example of how to configure the options. .. code-block:: yaml rule : architecture_015: style : require_blank_line .. WARNING:: It is important to be aware these rules may conflict with rules that enforce rules on previous lines. This can occur when a below rule is applied and then on the next line a previous rule applies. Resolve any conflicts by changing the configuration of either rule. Example: |style| set to |require_blank_line| ############################################ The following code would fail with this option: .. code-Block:: vhdl architecture rtl of fifo is -- Comment architecture rtl of fifo is signal s_sig1 : std_logic; The following code would pass with this option: .. code-block:: vhdl architecture rtl of fifo is -- Comment architecture rtl of fifo is signal s_sig1 : std_logic; Example: |style| set to |no_blank_line| ####################################### The following code would fail with this option: .. code-Block:: vhdl architecture rtl of fifo is -- Comment architecture rtl of fifo is signal s_sig1 : std_logic; The following code would pass with this option: .. code-block:: vhdl architecture rtl of fifo is -- Comment architecture rtl of fifo is signal s_sig1 : std_logic; Example: |style| set to |require_blank_line_unless_pragma| ########################################################## The following code would fail with this option: .. code-Block:: vhdl architecture rtl of fifo is -- synthesis translate_off architecture rtl of fifo is signal s_sig1 : std_logic; The following code would pass with this option: .. code-block:: vhdl architecture rtl of fifo is -- synthesis translate_off architecture rtl of fifo is signal s_sig1 : std_logic; Rules Enforcing Blank Lines ########################### * `architecture_015 `_ * `architecture_016 `_ * `architecture_017 `_ * `architecture_018 `_ * `architecture_200 `_ * `block_201 `_ * `block_202 `_ * `block_203 `_ * `block_204 `_ * `block_205 `_ * `case_009 `_ * `case_010 `_ * `case_200 `_ * `component_016 `_ * `component_018 `_ * `constant_200 `_ * `context_023 `_ * `context_024 `_ * `context_025 `_ * `entity_016 `_ * `entity_200 `_ * `entity_202 `_ * `entity_203 `_ * `generate_003 `_ * `if_030 `_ * `instantiation_019 `_ * `loop_statement_201 `_ * `loop_statement_203 `_ * `package_011 `_ * `package_012 `_ * `package_body_201 `_ * `package_body_202 `_ * `package_body_203 `_ * `port_001 `_ * `port_map_200 `_ * `pragma_401 <../pragma_rules.html#pragma-401>`_ * `pragma_403 <../pragma_rules.html#pragma-403>`_ * `process_011 `_ * `process_021 `_ * `process_022 `_ * `process_023 `_ * `process_026 `_ * `process_027 `_ * `record_type_definition_200 `_ * `signal_200 `_ * `subprogram_body_201 `_ * `subprogram_body_202 `_ * `subprogram_body_203 `_ * `subprogram_body_204 `_ * `subprogram_body_205 `_ * `type_011 `_ * `type_200 `_