Adjusting subphase for constant_012 and constant_014 to ensure they run last in alignments.

This commit is contained in:
Jeremiah Leary 2020-11-27 08:19:19 -06:00
parent 31690f66ce
commit 2be4bd6a01
5 changed files with 15 additions and 5 deletions

View File

@ -32,6 +32,7 @@ class rule_012(rule.Rule):
rule.Rule.__init__(self, 'constant', '012')
self.solution = 'Align one space after assignment operator'
self.phase = 5
self.subphase = 4
self.lTokenPairs = lTokenPairs
self.bExcludeLastToken = False

View File

@ -32,6 +32,7 @@ class rule_014(rule.Rule):
rule.Rule.__init__(self, 'constant', '014')
self.solution = 'Align one space after assignment operator'
self.phase = 5
self.subphase = 4
self.lTokenPairs = lTokenPairs
self.bExcludeLastToken = False

View File

@ -3,6 +3,9 @@ architecture RTL of FIFO is
constant con1 : integer := a + b + c + d;
constant con1 : integer :=
a + b + c + d;
constant con2 : integer := a + b +
c + d;
@ -24,14 +27,15 @@ architecture RTL of FIFO is
-- Violations
constant con1 : integer := a + b + c + d;
constant con2 : integer := a + b +
c + d;
constant con2 : integer := a + b +
c + d;
constant con1 : integer :=
a + b + c + d;
constant con3 : integer :=
(
0,

View File

@ -3,6 +3,9 @@ architecture RTL of FIFO is
constant con1 : integer := a + b + c + d;
constant con1 : integer :=
a + b + c + d;
constant con2 : integer := a + b +
c + d;
@ -24,14 +27,15 @@ architecture RTL of FIFO is
-- Violations
constant con1 : integer := a + b + c + d;
constant con2 : integer := a + b +
c + d;
constant con2 : integer := a + b +
c + d;
constant con1 : integer :=
a + b + c + d;
constant con3 : integer :=
(
0,

View File

@ -26,7 +26,7 @@ class test_constant_rule(unittest.TestCase):
self.assertEqual(oRule.name, 'constant')
self.assertEqual(oRule.identifier, '014')
lExpected = [30, 33]
lExpected = [31, 34, 37]
oRule.analyze(self.oFile)
self.assertEqual(lExpected, utils.extract_violation_lines_from_violation_object(oRule.violations))