vsg.fix

This module contains functions for rules to fix issues.

vsg.fix.enforce_one_space_after_word(self, oLine, sWord)

Adds a space after a word.

Parameters:

self: (rule object)

oLine: (line object)

sWord: (string)

vsg.fix.enforce_one_space_before_word(self, oLine, sWord, fWholeWord=False)

Adds a space before word.

Parameters:

self: (rule object)

oLine: (line object)

sWord: (string)

vsg.fix.enforce_spaces_after_word(self, oLine, sWord, iSpaces)

Adds a space after a word.

Parameters:

self: (rule object)

oLine: (line object)

sWord: (string)

iSpaces: (integer)

vsg.fix.identifier_alignment(self, oFile)

Aligns identifiers and colons across multiple lines.

Parameters:

self: (rule object)

oFile: (vhdlFile object)

vsg.fix.indent(self, oLine)

Fixes indent violations.

Parameters:

self: (rule object)

oLine: (line object)

vsg.fix.insert_blank_line_above(self, oFile, iLineNumber)

This function inserts a blank line above the line specified by iLineNumber.

Parameters:

self: (rule object)

oFile: (vhdlFile object)

iLineNumber: (integer)

vsg.fix.insert_blank_line_below(self, oFile, iLineNumber)

This function inserts a blank line below the line specified by iLineNumber.

Parameters:

self: (rule object)

oFile: (vhdlFile object)

iLineNumber: (integer)

vsg.fix.keyword_alignment(self, oFile)

Aligns keywords across multiple lines.

Parameters:

self: (rule object)

oFile: (vhdlFile object)

vsg.fix.lower_case(oLine, sKeyword)

Changes word to lowercase.

Parameters:

self: (rule object)

oLine: (line object)

sKeyword: (string)

vsg.fix.multiline_alignment(self, oFile, iLineNumber)

Indents successive lines of multiline statements.

Parameters:

self: (rule object)

oFile: (vhdlFile object)

iLineNumber: (integer)

vsg.fix.remove_blank_lines_above(self, oFile, iLineNumber, sUnless=None)

This function removes blank lines above a linenumber. If sUnless is specified, a single blank line will be left if a line with the sUnless attribute is encountered.

Parameters:

self: (rule object)

oFile: (vhdlFile object)

iLineNumber: (integer)

sUnless: (string) (optional)

vsg.fix.remove_blank_lines_below(self, oFile, iLineNumber, sUnless=None)

This function removes blank lines below a linenumber. If sUnless is specified, a single blank line will be left if a line with the sUnless attribute is encountered.

Parameters:

self: (rule object)

oFile: (vhdlFile object)

iLineNumber: (integer)

sUnless: (string) (optional)

vsg.fix.replace_is_keyword(oFile, iLineNumber)

This function removes the is keyword from a line if it starts with is. If the line is empty, it is replaced with a blank line.

Parameters:

oFile: (vhdlFile object)

iLineNumber: (integer)

vsg.fix.upper_case(oLine, sKeyword)

Changes word to lowercase.

Parameters:

self: (rule object)

oLine: (line object)

sKeyword: (string)

vsg.fix.upper_case_with_parenthesis(self, oLine, sKeyword)

Changes word to lowercase.

Parameters:

self: (rule object)

oLine: (line object)

sKeyword: (string)