parent
2838dcb6ae
commit
9242dc60da
|
|
@ -202,10 +202,9 @@ def _set_indent(iToken, lTokens):
|
|||
|
||||
|
||||
def _analyze_align_paren_no(iFirstLine, iLastLine, lParens, iIndentStep, dActualIndent, bStartsWithParen):
|
||||
# print('--> _analyze_align_paren_no <-' + '-'*70)
|
||||
print('--> _analyze_align_paren_no <-' + '-'*70)
|
||||
dExpectedIndent = {}
|
||||
dExpectedIndent[iFirstLine] = dActualIndent[iFirstLine]
|
||||
# print(iIndent)
|
||||
if bStartsWithParen:
|
||||
iFirstIndent = dActualIndent[iFirstLine]
|
||||
else:
|
||||
|
|
@ -213,10 +212,11 @@ def _analyze_align_paren_no(iFirstLine, iLastLine, lParens, iIndentStep, dActual
|
|||
|
||||
iIndent = iFirstIndent
|
||||
|
||||
print(iIndent)
|
||||
iParens = 0
|
||||
|
||||
for iLine in range(iFirstLine, iLastLine + 1):
|
||||
# print('--> ' + str(iLine) + ' <--------------------------')
|
||||
print('--> ' + str(iLine) + ' <--------------------------')
|
||||
|
||||
lTemp = []
|
||||
for dParen in lParens:
|
||||
|
|
@ -241,7 +241,7 @@ def _analyze_align_paren_no(iFirstLine, iLastLine, lParens, iIndentStep, dActual
|
|||
iIndent = iFirstIndent + iParens * iIndentStep
|
||||
else:
|
||||
iIndent = iFirstIndent + iParens * iIndentStep + iIndentStep
|
||||
# iIndent = iFirstIndent + iParens * iIndentStep
|
||||
# iIndent = iFirstIndent + iParens * iIndentStep
|
||||
else:
|
||||
if iParens == 0:
|
||||
iIndent = iFirstIndent + iParens * iIndentStep
|
||||
|
|
@ -255,6 +255,7 @@ def _analyze_align_paren_no(iFirstLine, iLastLine, lParens, iIndentStep, dActual
|
|||
|
||||
# print(f'indent = {iIndent} | iPerens = {iParens}')
|
||||
dExpectedIndent[iLine + 1] = iIndent
|
||||
print(dExpectedIndent)
|
||||
|
||||
return dExpectedIndent
|
||||
|
||||
|
|
|
|||
|
|
@ -16,4 +16,11 @@ begin
|
|||
n_foo <= resize(unsigned(I_FOO) +
|
||||
unsigned(I_BAR), q_foo'length);
|
||||
|
||||
O_FOO <=
|
||||
(
|
||||
1 => func1(std_logic_vector(G_GEN1), G_GEN2),
|
||||
2 => func2(func3(G_GEN3), G_GEN3),
|
||||
3 => func4(G_GEN4)
|
||||
);
|
||||
|
||||
end architecture RTL;
|
||||
|
|
|
|||
|
|
@ -16,4 +16,11 @@ begin
|
|||
n_foo <= resize(unsigned(I_FOO) +
|
||||
unsigned(I_BAR), q_foo'length);
|
||||
|
||||
O_FOO <=
|
||||
(
|
||||
1 => func1(std_logic_vector(G_GEN1), G_GEN2),
|
||||
2 => func2(func3(G_GEN3), G_GEN3),
|
||||
3 => func4(G_GEN4)
|
||||
);
|
||||
|
||||
end architecture RTL;
|
||||
|
|
|
|||
|
|
@ -16,4 +16,11 @@ begin
|
|||
n_foo <= resize(unsigned(I_FOO) +
|
||||
unsigned(I_BAR), q_foo'length);
|
||||
|
||||
O_FOO <=
|
||||
(
|
||||
1 => func1(std_logic_vector(G_GEN1), G_GEN2),
|
||||
2 => func2(func3(G_GEN3), G_GEN3),
|
||||
3 => func4(G_GEN4)
|
||||
);
|
||||
|
||||
end architecture RTL;
|
||||
|
|
|
|||
|
|
@ -16,4 +16,11 @@ begin
|
|||
n_foo <= resize(unsigned(I_FOO) +
|
||||
unsigned(I_BAR), q_foo'length);
|
||||
|
||||
O_FOO <=
|
||||
(
|
||||
1 => func1(std_logic_vector(G_GEN1), G_GEN2),
|
||||
2 => func2(func3(G_GEN3), G_GEN3),
|
||||
3 => func4(G_GEN4)
|
||||
);
|
||||
|
||||
end architecture RTL;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class test_concurrent_rule(unittest.TestCase):
|
|||
self.assertEqual(oRule.name, 'concurrent')
|
||||
self.assertEqual(oRule.identifier, '003')
|
||||
|
||||
lExpected = [14, 17]
|
||||
lExpected = [14, 17, 20, 21, 22, 23, 24]
|
||||
|
||||
oRule.analyze(self.oFile)
|
||||
self.assertEqual(lExpected, utils.extract_violation_lines_from_violation_object(oRule.violations))
|
||||
|
|
@ -61,7 +61,7 @@ class test_concurrent_rule(unittest.TestCase):
|
|||
oRule.align_left = 'yes'
|
||||
oRule.align_paren = 'no'
|
||||
|
||||
lExpected = [8, 11, 14, 17]
|
||||
lExpected = [8, 11, 14, 17, 20, 21, 22, 23, 24]
|
||||
|
||||
oRule.analyze(self.oFile)
|
||||
self.assertEqual(lExpected, utils.extract_violation_lines_from_violation_object(oRule.violations))
|
||||
|
|
@ -85,7 +85,7 @@ class test_concurrent_rule(unittest.TestCase):
|
|||
oRule.align_left = 'yes'
|
||||
oRule.align_paren = 'yes'
|
||||
|
||||
lExpected = [8, 11, 14, 17]
|
||||
lExpected = [8, 11, 14, 17, 20, 21, 22, 23, 24]
|
||||
|
||||
oRule.analyze(self.oFile)
|
||||
self.assertEqual(lExpected, utils.extract_violation_lines_from_violation_object(oRule.violations))
|
||||
|
|
|
|||
Loading…
Reference in New Issue