How to use the vsg.fix function in vsg

To help you get started, we’ve selected a few vsg examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jeremiah-c-leary / vhdl-style-guide / vsg / rules / process / rule_002.py View on Github external
def _fix_violations(self, oFile):
        for dViolation in self.violations:
            fix.enforce_one_space_after_word(self, utils.get_violating_line(oFile, dViolation), 'process')
github jeremiah-c-leary / vhdl-style-guide / vsg / rules / function / rule_001.py View on Github external
def _fix_violations(self, oFile):
        for dViolation in self.violations:
            fix.indent(self, utils.get_violating_line(oFile, dViolation))
github jeremiah-c-leary / vhdl-style-guide / vsg / rules / component / rule_007.py View on Github external
def _fix_violations(self, oFile):
        for dViolation in self.violations:
            oLine = utils.get_violating_line(oFile, dViolation)
            fix.enforce_one_space_before_word(self, oLine, 'is')
github jeremiah-c-leary / vhdl-style-guide / vsg / rules / case_rule.py View on Github external
def _fix_violations(self, oFile):
        for iLineNumber in self.violations:
            for word in self.words_to_fix:
                if self.case == 'lower':
                    fix_function = fix.lower_case
                else:
                    fix_function = fix.upper_case

                fix_function(self, oFile.lines[iLineNumber], word)
github jeremiah-c-leary / vhdl-style-guide / vsg / rules / case / rule_021.py View on Github external
def _fix_violations(self, oFile):
        for dViolation in self.violations:
            iLineNumber = utils.get_violation_linenumber(dViolation)
            oFile.lines[iLineNumber].indentLevel = dViolation['indent']
            fix.indent(self, oFile.lines[iLineNumber])
github jeremiah-c-leary / vhdl-style-guide / vsg / rules / single_space_before_character_rule.py View on Github external
def _fix_violations(self, oFile):
        for dViolation in self.violations:
            oLine = utils.get_violating_line(oFile, dViolation)
            fix.enforce_one_space_before_word(self, oLine, self.sWord)
github jeremiah-c-leary / vhdl-style-guide / vsg / rules / single_space_after_character_rule.py View on Github external
def _fix_violations(self, oFile):
        for dViolation in self.violations:
            oLine = utils.get_violating_line(oFile, dViolation)
            fix.enforce_one_space_after_word(self, oLine, self.sWord)