vsg.rule_list¶
This is one of two classes you will use when incorporating vsg into another python program.
-
class
vsg.rule_list.
rule_list
(oVhdlFile, oSeverityList, sLocalRulesDirectory=None)¶ Contains a list of all rules to be checked. It loads all base rules. Localized rules are loaded if specified.
Parameters:
oVhdlFile: (vhdlFile object)
oSeverityList: (severity list object)
sLocalRulesDirectory: (string) (optional)
-
check_rules
(bAllPhases=False, lSkipPhase=None)¶ Analyzes all rules in increasing phase order. If there is a violation in a phase, analysis is halted.
Parameters:
bAllPhases : (boolean) lSkipPhase : (list of integers)
-
configure
(oConfig)¶ Configures individual rules based on dictionary passed.
Parameters:
configurationFile: (dictionary)
-
extract_junit_testcase
(sVhdlFileName)¶ Creates JUnit XML file listing all violations found.
Parameters:
sVhdlFileName (string)Returns: (junit testcase object)
-
extract_violation_dictionary
()¶ Creates a dictionary of violations which were found.
Returns: (dictionary)
-
fix
(iFixPhase=7, lSkipPhase=None, dFixOnly=None)¶ Applies fixes to all violations found.
Parameters:
iFixPhase : (integer)
lSkipPhases : (list of integers)
dFixOnly : (fix list dictionary)
-
get_configuration
()¶ Returns a dictionary with every rule and how it is configured.
Parameters:
NoneReturns: (dictionary)
-
get_rules_in_phase
(iPhaseNumber)¶ Returns a list of rules in a given phase.
Parameters:
iPhaseNumber : (integer)Returns: (list of rule objects)
-
get_rules_in_subphase
(lRules, iSubPhase)¶ Returns a list of rules in a given subphase.
Parameters:
lRules : (list of rule objects)
iSubPhase : (integer)
Returns: (list of rule objects)
-
report_violations
(sOutputFormat)¶ Prints out violations to stdout.
Parameters:
sOutputFormat (string)
-