Skip to content

Commit 84fa229

Browse files
committed
Merge remote-tracking branch 'origin/master' into issue-1492
2 parents df74d35 + f621642 commit 84fa229

File tree

982 files changed

+4251
-1232
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

982 files changed

+4251
-1232
lines changed

docs/architecture_rules.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,7 @@ architecture_025
516516
This rule checks for valid names for the architecture.
517517
Typical architecture names are: RTL, EMPTY, and BEHAVE.
518518
This rule allows the user to restrict what can be used for an architecture name.
519+
Note that regular expressions are accepted in the **names** field.
519520

520521
.. NOTE:: This rule is disabled by default.
521522
You can enable and configure the names using the following configuration.
@@ -531,6 +532,7 @@ This rule allows the user to restrict what can be used for an architecture name.
531532
- rtl
532533
- empty
533534
- behave
535+
- my_pattern.*
534536
535537
**Violation**
536538

docs/configuring.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Configuring
1919
configuring_indent_rules.rst
2020
configuring_keyword_alignment_rules.rst
2121
configuring_length_rules.rst
22+
configuring_library_and_package_name_restriction_rules.rst
2223
configuring_move_token_rules.rst
2324
configuring_multiline_assert_rule.rst
2425
configuring_multiline_constraint_rules.rst

docs/configuring_disabled_rules.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,9 @@ Rules Disabled by Default
5959
* `generic_map_601 <generic_map_rules.html#generic-map-601>`_
6060
* `instantiation_600 <instantiation_rules.html#instantiation-600>`_
6161
* `instantiation_601 <instantiation_rules.html#instantiation-601>`_
62-
6362
* `interface_incomplete_type_declaration_600 <../interface_incomplete_type_declaration_rules.html#interface-incomplete-type-declaration-600>`_
6463
* `interface_incomplete_type_declaration_601 <../interface_incomplete_type_declaration_rules.html#interface-incomplete-type-declaration-601>`_
65-
64+
* `library_012 <library_rules.html#library-012>`_
6665
* `loop_statement_006 <loop_statement_rules.html#loop-statement-006>`_
6766
* `loop_statement_007 <loop_statement_rules.html#loop-statement-007>`_
6867
* `loop_statement_600 <loop_statement_rules.html#loop-statement-600>`_
@@ -102,6 +101,7 @@ Rules Disabled by Default
102101
* `type_100 <type_rules.html#type-100>`_
103102
* `type_200 <type_rules.html#type-200>`_
104103
* `type_600 <type_rules.html#type-600>`_
104+
* `use_clause_001 <use_clause_rules.html#use-clause-001>`_
105105
* `variable_012 <variable_rules.html#variable-012>`_
106106
* `variable_100 <variable_rules.html#variable-100>`_
107107
* `variable_600 <variable_rules.html#variable-600>`_
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
2+
.. _configuring-library-and-package-name-restriction-rules:
3+
4+
Configuring Library and Package Name Restriction Rules
5+
------------------------------------------------------
6+
7+
There are rules which will check for invalid package names in library and use clauses.
8+
These rules are disabled by default and must be enabled before they will perform any checks.
9+
10+
There is one option for these rules:
11+
12+
.. |names| replace::
13+
:code:`names`
14+
15+
.. |default| replace::
16+
:code:`std_logic_arith` for **use_clause_001**. None for **library_012**
17+
18+
.. |values__names| replace::
19+
List of strings
20+
21+
.. |action__names| replace::
22+
Search for libraries and packages with the user defined names
23+
24+
+--------------------------------------+-----------------+-----------+------------------------------------------------+
25+
| Option | Values | Default | Description |
26+
+======================================+=================+===========+================================================+
27+
| |names| | |values__names| | |default| | * |action__names| |
28+
+--------------------------------------+-----------------+-----------+------------------------------------------------+
29+
30+
This is an example of how to configure the option.
31+
32+
.. code-block:: yaml
33+
34+
rule :
35+
library_012:
36+
names:
37+
- "work"
38+
- "std_logic_arith"
39+
40+
.. NOTE:: All examples below are using the rule **use_clause_001**.
41+
42+
Example: |names| set to list ["std_logic_arith"]
43+
################################################
44+
45+
The following code would fail with this option:
46+
47+
.. code-Block:: vhdl
48+
49+
library ieee;
50+
use ieee.std_logic_arith.all;
51+
52+
Example: |names| set to ["std_logic_arith", "my_package"]
53+
##############################################
54+
55+
The following code would fail three times with this option:
56+
57+
.. code-block:: vhdl
58+
59+
library ieee;
60+
use ieee.std_logic_arith.all;
61+
62+
library work;
63+
use work.my_package.all;
64+
65+
66+
Rules Enforcing Valid Names
67+
###########################
68+
69+
* `library_012 <library_rules.html#library-012>`_
70+
* `use_clause_001 <use_clause_rules.html#use-clause-001>`_

docs/configuring_type_of_instantiations.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ This is an example of how to configure these options.
4141
.. code-block:: yaml
4242
4343
rule :
44-
instantiation_010:
44+
instantiation_034:
4545
method: 'component'
4646
4747
Example: |method| set to |component_option|

docs/configuring_vhdl_reserved_words.rst

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,14 @@ These rules provide the following options:
2828
.. |standard__2008| replace::
2929
:code:`2008` = Use reserved keywords from 2008 standard
3030

31+
.. |standard__2019| replace::
32+
:code:`2019` = Use reserved keywords from 2019 standard
33+
3134
.. |standard__all| replace::
3235
:code:`all` = Use reserved keywords from all standards
3336

3437
.. |values| replace::
35-
:code:`1987`, :code:`1993`, :code:`2000`, :code:`2002`, :code:`2008`
38+
:code:`1987`, :code:`1993`, :code:`2000`, :code:`2002`, :code:`2008`, :code:`2019`
3639

3740
.. |default_value| replace::
3841
:code:`all`
@@ -45,6 +48,7 @@ These rules provide the following options:
4548
| | | | * |standard__2000| |
4649
| | | | * |standard__2002| |
4750
| | | | * |standard__2008| |
51+
| | | | * |standard__2019| |
4852
| | | | * |standard__all| |
4953
+----------------------+----------+-----------------+----------------------------+
5054

@@ -96,6 +100,19 @@ The :code:`context` keyword is a reserved word in the 2008 standard.
96100
end entity;
97101
98102
103+
Example: |standard_option| set to :code:`2019`
104+
##############################################
105+
106+
The :code:`private` keyword is a reserved word in the 2019 standard.
107+
108+
**Violation**
109+
110+
.. code-block:: yaml
111+
112+
entity private is
113+
end entity;
114+
115+
99116
Rules Enforcing Optional Items
100117
##############################
101118

docs/configuring_whitespace_rules.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,12 @@ Rules Enforcing Whitespace
191191
* `external_variable_name_102 <external_variable_name_rules.html#external-variable-name-102>`_
192192
* `external_variable_name_103 <external_variable_name_rules.html#external-variable-name-103>`_
193193
* `external_variable_name_104 <external_variable_name_rules.html#external-variable-name-104>`_
194+
* `file_open_information_100 <file_open_information_rules.html#file-open-information-100>`_
195+
* `file_open_information_101 <file_open_information_rules.html#file-open-information-101>`_
196+
* `file_open_information_102 <file_open_information_rules.html#file-open-information-102>`_
197+
* `file_open_information_103 <file_open_information_rules.html#file-open-information-103>`_
194198
* `file_100 <file_rules.html#file-100>`_
199+
* `file_101 <file_rules.html#file-101>`_
195200
* `function_100 <function_rules.html#function-100>`_
196201
* `function_101 <function_rules.html#function-101>`_
197202
* `generate_002 <generate_rules.html#generate-002>`_
@@ -210,6 +215,8 @@ Rules Enforcing Whitespace
210215
* `if_004 <if_rules.html#if-004>`_
211216
* `if_005 <if_rules.html#if-005>`_
212217
* `if_015 <if_rules.html#if-015>`_
218+
* `index_subtype_definition_100 <index_subtype_definition_rules.html#index-subtype-definition-100>`_
219+
* `index_subtype_definition_101 <index_subtype_definition_rules.html#index-subtype-definition-101>`_
213220
* `instantiation_002 <instantiation_rules.html#instantiation-002>`_
214221
* `instantiation_003 <instantiation_rules.html#instantiation-003>`_
215222
* `instantiation_032 <instantiation_rules.html#instantiation-032>`_
@@ -247,6 +254,8 @@ Rules Enforcing Whitespace
247254
* `process_014 <process_rules.html#process-014>`_
248255
* `process_024 <process_rules.html#process-024>`_
249256
* `process_025 <process_rules.html#process-025>`_
257+
* `range_constraint_100 <range_constraint_rules.html#range-constraint-100>`_
258+
* `range_constraint_101 <range_constraint_rules.html#range-constraint-101>`_
250259
* `record_type_definition_100 <record_type_definition_rules.html#record-type-definition-100>`_
251260
* `record_type_definition_101 <record_type_definition_rules.html#record-type-definition-101>`_
252261
* `report_statement_100 <report_statement_rules.html#report-statement-100>`_
@@ -289,3 +298,5 @@ Rules Enforcing Whitespace
289298
* `variable_assignment_002 <variable_assignment_rules.html#variable-assignment-002>`_
290299
* `variable_assignment_003 <variable_assignment_rules.html#variable-assignment-003>`_
291300
* `whitespace_007 <whitespace_rules.html#whitespace-007>`_
301+
* `whitespace_102 <whitespace_rules.html#whitespace-102>`_
302+
* `whitespace_103 <whitespace_rules.html#whitespace-103>`_

docs/file_open_information_rules.rst

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,90 @@
33
File Open Information Rules
44
---------------------------
55

6+
file_open_information_100
7+
#########################
8+
9+
|phase_2| |error| |whitespace|
10+
11+
This rule checks for a single space before the **open** keyword.
12+
13+
|configuring_whitespace_rules_link|
14+
15+
**Violation**
16+
17+
.. code-block:: vhdl
18+
19+
file defaultImage : load_file_type open read_mode is load_file_name;
20+
21+
**Fix**
22+
23+
.. code-block:: vhdl
24+
25+
file defaultImage : load_file_type open read_mode is load_file_name;
26+
27+
file_open_information_101
28+
#########################
29+
30+
|phase_2| |error| |whitespace|
31+
32+
This rule checks for a single space after the **open** keyword.
33+
34+
|configuring_whitespace_rules_link|
35+
36+
**Violation**
37+
38+
.. code-block:: vhdl
39+
40+
file defaultImage : load_file_type open read_mode is load_file_name;
41+
42+
**Fix**
43+
44+
.. code-block:: vhdl
45+
46+
file defaultImage : load_file_type open read_mode is load_file_name;
47+
48+
file_open_information_102
49+
#########################
50+
51+
|phase_2| |error| |whitespace|
52+
53+
This rule checks for a single space before the **is** keyword.
54+
55+
|configuring_whitespace_rules_link|
56+
57+
**Violation**
58+
59+
.. code-block:: vhdl
60+
61+
file defaultImage : load_file_type open read_mode is load_file_name;
62+
63+
**Fix**
64+
65+
.. code-block:: vhdl
66+
67+
file defaultImage : load_file_type open read_mode is load_file_name;
68+
69+
file_open_information_103
70+
#########################
71+
72+
|phase_2| |error| |whitespace|
73+
74+
This rule checks for a single space after the **is** keyword.
75+
76+
|configuring_whitespace_rules_link|
77+
78+
**Violation**
79+
80+
.. code-block:: vhdl
81+
82+
file defaultImage : load_file_type open read_mode is load_file_name;
83+
84+
**Fix**
85+
86+
.. code-block:: vhdl
87+
88+
file defaultImage : load_file_type open read_mode is load_file_name;
89+
690
file_open_information_500
791
#########################
892

docs/file_rules.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,27 @@ This rule checks for a single space before the identifier.
9292
9393
**Fix**
9494

95+
.. code-block:: vhdl
96+
97+
file defaultImage : load_file_type open read_mode is load_file_name;
98+
99+
file_101
100+
########
101+
102+
|phase_2| |error| |whitespace|
103+
104+
This rule checks for a single space after the identifier.
105+
106+
|configuring_whitespace_rules_link|
107+
108+
**Violation**
109+
110+
.. code-block:: vhdl
111+
112+
file defaultImage : load_file_type open read_mode is load_file_name;
113+
114+
**Fix**
115+
95116
.. code-block:: vhdl
96117
97118
file defaultImage : load_file_type open read_mode is load_file_name;

docs/index_subtype_definition_rules.rst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,48 @@
33
Index Subtype Definition Rules
44
------------------------------
55

6+
index_subtype_definition_100
7+
############################
8+
9+
|phase_2| |error| |whitespace|
10+
11+
This rule checks for a single space before the **range** keyword.
12+
13+
|configuring_whitespace_rules_link|
14+
15+
**Violation**
16+
17+
.. code-block:: vhdl
18+
19+
type my_array is array (natural range <>) of integer;
20+
21+
**Fix**
22+
23+
.. code-block:: vhdl
24+
25+
type my_array is array (natural range <>) of integer;
26+
27+
index_subtype_definition_101
28+
############################
29+
30+
|phase_2| |error| |whitespace|
31+
32+
This rule checks for a single space after the **range** keyword.
33+
34+
|configuring_whitespace_rules_link|
35+
36+
**Violation**
37+
38+
.. code-block:: vhdl
39+
40+
type my_array is array (natural range <>) of integer;
41+
42+
**Fix**
43+
44+
.. code-block:: vhdl
45+
46+
type my_array is array (natural range <>) of integer;
47+
648
index_subtype_definition_500
749
############################
850

0 commit comments

Comments
 (0)