There are rules which will check for a whitespace between keywords or keywords and identifiers. The number of spaces can be configured to allow for multiple or no whitespaces.
There are a couple of options to these rules:
Option | Description |
---|---|
number_of_spaces | Determines the number of whitespace characters to allow. |
The number_of_spaces
option can accept several values:
Value | Description |
---|---|
[0-9][0-9]* | The number of spaces to enforce. |
>[0-9][0-9]* | The minimum number of spaces to enforce. |
>=[0-9][0-9]* | The minimum number of spaces to enforce. |
[0-9][0-9]*+ | The minimum number of spaces to enforce. |
These options combined with the values allow complete control over the number of whitespaces allowed.
rule :
architecture_012:
number_of_spaces: 1
In this example, the number of whitespaces between the keywords must be 1.
end architecture;
rule :
architecture_012:
number_of_spaces: 2
In this example, the number of whitespaces between the keywords must be 2.
end architecture;
rule :
signal_006:
number_of_spaces: '>=1'
In this example, there must be at least a single whitespace before the colon. All of these would not be a violation.
signal wr_en : std_logic;
signal wr_en : std_logic;
signal wr_en : std_logic;
The same result could be achieved using this yaml:
rule :
signal_006:
number_of_spaces: '1+'
- alias_declaration_100
- alias_declaration_101
- alias_declaration_102
- alias_declaration_103
- 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
- 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
- constant_101
- 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
- file_100
- 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_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
- signal_100
- signal_101
- signal_102
- subtype_100
- type_006
- type_007
- type_100
- variable_005
- variable_006
- variable_100
- variable_assignment_002
- variable_assignment_003
- whitespace_007