Esempio n. 1
0
 def _fix_violations(self, oFile):
     for dViolation in self.violations[::-1]:
         iLineNumber = utils.get_violation_line_number(dViolation)
         for iSliceIndex in dViolation['slice_index'][::-1]:
             oLine = oFile.lines[iLineNumber]
             utils.copy_line(oFile, iLineNumber)
             _modify_existing_line(oLine, iSliceIndex)
             _modify_copied_line(oFile, iLineNumber, iSliceIndex,
                                 dViolation)
Esempio n. 2
0
 def _fix_violations(self, oFile):
     for iLineNumber in self.violations[::-1]:
         utils.copy_line(oFile, iLineNumber)
         oLine = oFile.lines[iLineNumber]
         oLine.update_line(oLine.line.split('(')[0] + ' (')
         oLine.isInstantiationGenericAssignment = False
         oLine = oFile.lines[iLineNumber + 1]
         oLine.update_line('  ' + oLine.line.split('(')[1])
         oLine.isInstantiationGenericKeyword = False
         oLine.indentLevel += 1
Esempio n. 3
0
 def _fix_violations(self, oFile):
     for iLineNumber in self.violations[::-1]:
         utils.copy_line(oFile, iLineNumber)
         oLine = oFile.lines[iLineNumber]
         oLine.update_line(oLine.line.split('(')[0] + '(')
         oLine.isFunctionParameter = False
         oLine = oFile.lines[iLineNumber + 1]
         oLine.update_line('  ' + oLine.line.split('(')[1])
         oLine.isFunctionKeyword = False
         oLine.indentLevel = oFile.lines[iLineNumber].indentLevel + 1
Esempio n. 4
0
 def _fix_violations(self, oFile):
     for iLineNumber in self.violations[::-1]:
         utils.copy_line(oFile, iLineNumber)
         oLine = oFile.lines[iLineNumber]
         oLine.update_line(extract_port_keyword(oLine.line))
         oLine = oFile.lines[iLineNumber + 1]
         oLine.update_line('    ' + extract_signal_definition(oLine.line))
         oLine.isPortKeyword = False
         oLine.isPortDeclaration = True
         oLine.insidePortMap = True
         oLine.indentLevel = oFile.lines[iLineNumber].indentLevel + 1
Esempio n. 5
0
 def _fix_violations(self, oFile):
     for iLineNumber in self.violations[::-1]:
         utils.copy_line(oFile, iLineNumber)
         oLine = oFile.lines[iLineNumber]
         oLine.update_line(oLine.line.split('(')[0] + ' (')
         oLine.isGenericDeclaration = False
         oLine = oFile.lines[iLineNumber + 1]
         oLine.update_line('  ' + oLine.line.split('(')[1])
         oLine.isGenericKeyword = False
         oLine.isGenericDeclaration = True
         oLine.insideGenericMap = True
         oLine.indentLevel = oFile.lines[iLineNumber].indentLevel + 1
Esempio n. 6
0
 def _fix_violations(self, oFile):
     for dViolation in self.violations[::-1]:
         iLineNumber = dViolation['lineNumber']
         utils.copy_line(oFile, iLineNumber)
         oLine = oFile.lines[iLineNumber]
         oLine.update_line(extract_generic_keyword(oLine.line))
         oLine.isGenericDeclaration = False
         oLine = oFile.lines[iLineNumber + 1]
         oLine.update_line('    ' + extract_generic_definition(oLine.line))
         oLine.isGenericKeyword = False
         oLine.isGenericDeclaration = True
         oLine.insideGenericMap = True
         oLine.indentLevel = oFile.lines[iLineNumber].indentLevel + 1