Adjust prefix/suffix rules to lowercase.
This commit is contained in:
parent
e33c21d87a
commit
db485d1842
|
|
@ -303,10 +303,9 @@ constant_015
|
|||
############
|
||||
|
||||
This rule checks for valid prefixes on constant identifiers.
|
||||
The default constant prefix is *c\_*.
|
||||
|
||||
.. NOTE:: The default constant prefix is "c\_".
|
||||
|
||||
Refer to the section `Configuring Prefix and Suffix Rules <configuring_prefix_suffix.html>`_ for information on changing the allowed prefixes.
|
||||
Refer to the section `Configuring Prefix and Suffix Rules <configuring_prefix_suffix.html>`_ for information on changing the allowed prefixes.
|
||||
|
||||
**Violation**
|
||||
|
||||
|
|
|
|||
|
|
@ -336,19 +336,18 @@ generic_020
|
|||
###########
|
||||
|
||||
This rule checks for valid prefixes on generic identifiers.
|
||||
The default generic prefix is *g\_*.
|
||||
|
||||
.. NOTE:: The default generic prefix is "G\_".
|
||||
|
||||
Refer to the section `Configuring Prefix and Suffix Rules <configuring_prefix_suffix.html>`_ for information on changing the allowed prefixes.
|
||||
Refer to the section `Configuring Prefix and Suffix Rules <configuring_prefix_suffix.html>`_ for information on changing the allowed prefixes.
|
||||
|
||||
**Violation**
|
||||
|
||||
.. code-block:: vhdl
|
||||
|
||||
generic(MY_GEN : integer);
|
||||
generic(my_generic : integer);
|
||||
|
||||
**Fix**
|
||||
|
||||
.. code-block:: vhdl
|
||||
|
||||
generic(G_MY_GEN : integer);
|
||||
generic(g_my_generic : integer);
|
||||
|
|
|
|||
|
|
@ -247,20 +247,19 @@ port_011
|
|||
########
|
||||
|
||||
This rule checks for valid prefixes on port identifiers.
|
||||
The default port prefixes are: *i\_*, *o\_*, *io\_*.
|
||||
|
||||
.. NOTE:: The default port prefixes are "I\_", "O\_", "IO\_".
|
||||
|
||||
Refer to the section `Configuring Prefix and Suffix Rules <configuring_prefix_suffix.html>`_ for information on changing the allowed prefixes.
|
||||
Refer to the section `Configuring Prefix and Suffix Rules <configuring_prefix_suffix.html>`_ for information on changing the allowed prefixes.
|
||||
|
||||
**Violation**
|
||||
|
||||
.. code-block:: vhdl
|
||||
|
||||
port (
|
||||
WR_EN : in std_logic;
|
||||
RD_EN : in std_logic;
|
||||
OVERFLOW : out std_logic;
|
||||
DATA : inout std_logic
|
||||
wr_en : in std_logic;
|
||||
rd_en : in std_logic;
|
||||
overflow : out std_logic;
|
||||
data : inout std_logic
|
||||
);
|
||||
|
||||
|
||||
|
|
@ -269,10 +268,10 @@ This rule checks for valid prefixes on port identifiers.
|
|||
.. code-block:: vhdl
|
||||
|
||||
port (
|
||||
I_WR_EN : in std_logic;
|
||||
I_RD_EN : in std_logic;
|
||||
O_OVERFLOW : out std_logic;
|
||||
IO_DATA : inout std_logic
|
||||
i_wr_en : in std_logic;
|
||||
i_rd_en : in std_logic;
|
||||
o_overflow : out std_logic;
|
||||
io_data : inout std_logic
|
||||
);
|
||||
|
||||
port_012
|
||||
|
|
@ -620,20 +619,19 @@ port_025
|
|||
########
|
||||
|
||||
This rule checks for valid suffixes on port identifiers.
|
||||
The default port suffixes are *_i*, *_o*, *_io*.
|
||||
|
||||
.. NOTE:: The default port suffixes are "_I", "_O", "_IO".
|
||||
|
||||
Refer to the section `Configuring Prefix and Suffix Rules <configuring_prefix_suffix.html>`_ for information on changing the allowed suffixes.
|
||||
Refer to the section `Configuring Prefix and Suffix Rules <configuring_prefix_suffix.html>`_ for information on changing the allowed suffixes.
|
||||
|
||||
**Violation**
|
||||
|
||||
.. code-block:: vhdl
|
||||
|
||||
port (
|
||||
WR_EN : in std_logic;
|
||||
RD_EN : in std_logic;
|
||||
OVERFLOW : out std_logic;
|
||||
DATA : inout std_logic
|
||||
wr_en : in std_logic;
|
||||
rd_en : in std_logic;
|
||||
overflow : out std_logic;
|
||||
data : inout std_logic
|
||||
);
|
||||
|
||||
|
||||
|
|
@ -642,8 +640,8 @@ This rule checks for valid suffixes on port identifiers.
|
|||
.. code-block:: vhdl
|
||||
|
||||
port (
|
||||
WR_EN_I : in std_logic;
|
||||
RD_EN_I : in std_logic;
|
||||
OVERFLOW_O : out std_logic;
|
||||
DATA_IO : inout std_logic
|
||||
wr_en_i : in std_logic;
|
||||
rd_en_i : in std_logic;
|
||||
overflow_o : out std_logic;
|
||||
data_io : inout std_logic
|
||||
);
|
||||
|
|
|
|||
|
|
@ -151,10 +151,9 @@ signal_008
|
|||
##########
|
||||
|
||||
This rule checks for valid prefixes on signal identifiers.
|
||||
Default signal prefix is *s\_*.
|
||||
|
||||
.. NOTE:: Default signal prefix is "s\_".
|
||||
|
||||
Refer to the section `Configuring Prefix and Suffix Rules <configuring_prefix_suffix.html>`_ for information on changing the allowed prefixes.
|
||||
Refer to the section `Configuring Prefix and Suffix Rules <configuring_prefix_suffix.html>`_ for information on changing the allowed prefixes.
|
||||
|
||||
**Violation**
|
||||
|
||||
|
|
|
|||
|
|
@ -95,8 +95,7 @@ subtype_004
|
|||
###########
|
||||
|
||||
This rule checks for valid prefixes in user defined subtype identifiers.
|
||||
|
||||
.. NOTE:: The default new subtype prefix is "st\_".
|
||||
The default new subtype prefix is *st\_*.
|
||||
|
||||
Refer to the section `Configuring Prefix and Suffix Rules <configuring_prefix_suffix.html>`_ for information on changing the allowed prefixes.
|
||||
|
||||
|
|
|
|||
|
|
@ -314,10 +314,9 @@ type_015
|
|||
##########
|
||||
|
||||
This rule checks for valid prefixes in user defined type identifiers.
|
||||
The default new type prefix is *t\_*.
|
||||
|
||||
.. NOTE:: The default new type prefix is "t\_".
|
||||
|
||||
Refer to the section `Configuring Prefix and Suffix Rules <configuring_prefix_suffix.html>`_ for information on changing the allowed prefixes.
|
||||
Refer to the section `Configuring Prefix and Suffix Rules <configuring_prefix_suffix.html>`_ for information on changing the allowed prefixes.
|
||||
|
||||
**Violation**
|
||||
|
||||
|
|
|
|||
|
|
@ -219,10 +219,9 @@ variable_012
|
|||
############
|
||||
|
||||
This rule checks for valid prefixes on variable identifiers.
|
||||
The default variable prefix is *v\_*.
|
||||
|
||||
.. NOTE:: The default variable prefix is "v\_".
|
||||
|
||||
Refer to the section `Configuring Prefix and Suffix Rules <configuring_prefix_suffix.html>`_ for information on changing the allowed prefixes.
|
||||
Refer to the section `Configuring Prefix and Suffix Rules <configuring_prefix_suffix.html>`_ for information on changing the allowed prefixes.
|
||||
|
||||
**Violation**
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class rule_020(prefix_rule):
|
|||
|
||||
def __init__(self):
|
||||
prefix_rule.__init__(self, 'generic', '020', 'isGenericDeclaration')
|
||||
self.prefixes = ['G_']
|
||||
self.prefixes = ['g_']
|
||||
self.solution = 'Generic'
|
||||
|
||||
def _extract(self, oLine):
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class rule_011(prefix_rule):
|
|||
|
||||
def __init__(self):
|
||||
prefix_rule.__init__(self, 'port', '011', 'isPortDeclaration')
|
||||
self.prefixes = ['I_', 'O_', 'IO_']
|
||||
self.prefixes = ['i_', 'o_', 'io_']
|
||||
self.solution = 'Port'
|
||||
|
||||
def _extract(self, oLine):
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class rule_025(suffix_rule):
|
|||
|
||||
def __init__(self):
|
||||
suffix_rule.__init__(self, 'port', '025', 'isPortDeclaration')
|
||||
self.suffixes = ['_I', '_O', '_IO']
|
||||
self.suffixes = ['_i', '_o', '_io']
|
||||
self.solution = 'Port'
|
||||
|
||||
def _extract(self, oLine):
|
||||
|
|
|
|||
|
|
@ -379,7 +379,7 @@ class testRulePortMethods(unittest.TestCase):
|
|||
self.assertEqual(oRule.identifier, '025')
|
||||
self.assertTrue(oRule.disable)
|
||||
|
||||
lExpected = utils.add_violation_list([9,10,11,12,13,14,26,27,28,29,30,31,40,41,42,43,44,45,57,58,59,60,61,62,71,72,73,74,75,76,87,88,89,119,120,121,129,130,131,141,142,152,161,169,170,171,172,173,181,182,183,184,185])
|
||||
lExpected = utils.add_violation_list([9,10,11,12,13,14,26,27,28,29,30,31,40,41,42,43,44,45,57,58,59,60,61,62,71,72,73,74,75,76,87,88,89,99,100,101,119,120,121,129,130,131,141,142,152,161,169,170,171,172,173,181,182,183,184,185])
|
||||
oRule.analyze(oFile)
|
||||
self.assertEqual(oRule.violations, lExpected)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue