Skip to content

Commit 718e2e1

Browse files
committed
Merge remote-tracking branch 'origin/master' into issue-1488
2 parents cb3c3f3 + 3cc968d commit 718e2e1

File tree

927 files changed

+3064
-1102
lines changed

Some content is hidden

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

927 files changed

+3064
-1102
lines changed

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_whitespace_rules.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,12 @@ Rules Enforcing Whitespace
189189
* `external_variable_name_102 <external_variable_name_rules.html#external-variable-name-102>`_
190190
* `external_variable_name_103 <external_variable_name_rules.html#external-variable-name-103>`_
191191
* `external_variable_name_104 <external_variable_name_rules.html#external-variable-name-104>`_
192+
* `file_open_information_100 <file_open_information_rules.html#file-open-information-100>`_
193+
* `file_open_information_101 <file_open_information_rules.html#file-open-information-101>`_
194+
* `file_open_information_102 <file_open_information_rules.html#file-open-information-102>`_
195+
* `file_open_information_103 <file_open_information_rules.html#file-open-information-103>`_
192196
* `file_100 <file_rules.html#file-100>`_
197+
* `file_101 <file_rules.html#file-101>`_
193198
* `function_100 <function_rules.html#function-100>`_
194199
* `function_101 <function_rules.html#function-101>`_
195200
* `generate_002 <generate_rules.html#generate-002>`_

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/library_rules.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,23 @@ This rule checks the **use** keyword is on its own line.
275275
context c1 is library ieee;
276276
use ieee.std_logic_1164.all; end context c1;
277277
278+
library_012
279+
###########
280+
281+
|phase_7| |disabled| |error| |unfixable| |naming|
282+
283+
This rule checks for libraries that have been restricted by the user.
284+
285+
|configuring_library_and_package_name_restriction_rules_link|
286+
287+
.. NOTE:: This rule is disabled by default.
288+
289+
**Violation**
290+
291+
.. code-block:: vhdl
292+
293+
library bad_lib;
294+
278295
library_500
279296
###########
280297

docs/links.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,6 @@
100100

101101
.. |configuring_comment_indenting_link| replace::
102102
Refer to :ref:`configuring-comment-indenting` for configuration options.
103+
104+
.. |configuring_library_and_package_name_restriction_rules_link| replace::
105+
Refer to :ref:`configuring-library-and-package-name-restriction-rules` for configuration options.

docs/port_rules.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,7 @@ This rule checks for missing modes in port declarations.
566566
WR_EN : std_logic;
567567
RD_EN : std_logic;
568568
OVERFLOW : std_logic;
569+
V_TEST : some_view;
569570
DATA : inout std_logic
570571
);
571572
@@ -577,6 +578,7 @@ This rule checks for missing modes in port declarations.
577578
WR_EN : in std_logic;
578579
RD_EN : in std_logic;
579580
OVERFLOW : out std_logic;
581+
V_TEST : view some_view;
580582
DATA : inout std_logic
581583
);
582584

docs/process_rules.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ event configuration
805805
edge configuration
806806
^^^^^^^^^^^^^^^^^^
807807

808-
.. NOTE:: Configuration this by setting the *'clock'* attribute to *'edge'*
808+
.. NOTE:: Configure this by setting the *'clock'* attribute to *'edge'*.
809809

810810
.. code-block:: json
811811

0 commit comments

Comments
 (0)