Updates for issue #92
1) The end of port definition in a component was being tagged with insideEntity
This commit is contained in:
parent
4d7e47f4e2
commit
8e44d865e1
13
vsg/rule.py
13
vsg/rule.py
|
|
@ -51,7 +51,9 @@ class rule():
|
|||
def fix(self, oFile):
|
||||
self.analyze(oFile)
|
||||
self._fix_violations(oFile)
|
||||
self._clear_violations()
|
||||
self.violations = []
|
||||
self.dFix = {}
|
||||
self.dFix['violations'] = {}
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
return
|
||||
|
|
@ -59,10 +61,10 @@ class rule():
|
|||
def add_violation(self, lineNumber):
|
||||
self.violations.append(lineNumber)
|
||||
|
||||
def _clear_violations(self):
|
||||
self.violations = []
|
||||
self.dFix = {}
|
||||
self.dFix['violations'] = {}
|
||||
# def _clear_violations(self):
|
||||
# self.violations = []
|
||||
# self.dFix = {}
|
||||
# self.dFix['violations'] = {}
|
||||
|
||||
def _fix_indent(self, oLine):
|
||||
'''Fixes indent violations.'''
|
||||
|
|
@ -104,7 +106,6 @@ class rule():
|
|||
def _check_keyword_alignment(self, iStartGroupIndex, sKeyword, lGroup):
|
||||
iKeywordAlignment = None
|
||||
iMaximumKeywordColumn = 0
|
||||
|
||||
sViolationRange = str(iStartGroupIndex) + '-' + str(iStartGroupIndex + len(lGroup) - 1)
|
||||
self.dFix['violations'][sViolationRange] = {}
|
||||
self.dFix['violations'][sViolationRange]['line'] = {}
|
||||
|
|
|
|||
|
|
@ -30,5 +30,5 @@ class rule_014(port_rule):
|
|||
oFile.lines.insert(iLineNumber + 1, line.line(' );'))
|
||||
oFile.lines[iLineNumber + 1].isEndPortMap = True
|
||||
oFile.lines[iLineNumber + 1].insidePortMap = True
|
||||
oFile.lines[iLineNumber + 1].insideEntity = True
|
||||
oFile.lines[iLineNumber + 1].insideEntity = oFile.lines[iLineNumber].insideEntity
|
||||
oFile.lines[iLineNumber + 1].indentLevel = oFile.lines[iLineNumber].indentLevel - 1
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ class testFixRulePortMethods(unittest.TestCase):
|
|||
self.assertEqual(oFile.lines[30].indentLevel, oFile.lines[29].indentLevel)
|
||||
self.assertTrue(oFile.lines[31].insidePortMap)
|
||||
self.assertTrue(oFile.lines[31].isEndPortMap)
|
||||
self.assertTrue(oFile.lines[31].insideEntity)
|
||||
self.assertEqual(oFile.lines[31].insideEntity, oFile.lines[30].insideEntity)
|
||||
self.assertFalse(oFile.lines[31].isPortDeclaration)
|
||||
self.assertEqual(oFile.lines[31].indentLevel, oFile.lines[29].indentLevel - 1)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue