How to use the vsg.rules.keyword_alignment_rule 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 / generic / rule_015.py View on Github external
from vsg.rules import keyword_alignment_rule


class rule_015(keyword_alignment_rule):
    '''
    Generic rule 015 ensures the alignment of the := operator for every
    generic in the entity.
    '''

    def __init__(self):
        keyword_alignment_rule.__init__(self, 'generic', '015')
        self.solution = 'Inconsistent alignment of ":=" in generic declaration of entity.'
        self.sKeyword = ':='
        self.sStartGroupTrigger = 'isGenericKeyword'
        self.sEndGroupTrigger = 'isEndGenericMap'
        self.lLineTriggers = ['isGenericDeclaration']
github jeremiah-c-leary / vhdl-style-guide / vsg / rules / instantiation / rule_029.py View on Github external
from vsg.rules import keyword_alignment_rule


class rule_029(keyword_alignment_rule):
    '''
    Instantiation rule 029 ensures the alignment of inline comments in an instantiation.
    '''

    def __init__(self):
        keyword_alignment_rule.__init__(self, 'instantiation', '029')
        self.solution = 'Inconsistent alignment of comments in instantiation.'
        self.sKeyword = '--'
        self.sStartGroupTrigger = 'isInstantiationDeclaration'
        self.sEndGroupTrigger = 'isInstantiationPortEnd'
        self.lLineTriggers = ['hasInlineComment']

        self.separate_generic_port_alignment = True
        self.configuration.append('separate_generic_port_alignment')

        self.configuration_triggers += [{'name': 'separate_generic_port_alignment', 'triggers': ['isInstantiationGenericEnd']}]
github jeremiah-c-leary / vhdl-style-guide / vsg / rules / entity / rule_017.py View on Github external
def __init__(self):
        keyword_alignment_rule.__init__(self, 'entity', '017')
        self.solution = 'Inconsistent alignment of ":" in generic or port declaration of entity.'
        self.sKeyword = ':'
        self.sStartGroupTrigger = 'isEntityDeclaration'
        self.sEndGroupTrigger = 'isEndEntityDeclaration'
        self.lLineTriggers = ['isGenericDeclaration', 'isPortDeclaration']

        self.separate_generic_port_alignment = True
        self.configuration.append('separate_generic_port_alignment')

        self.configuration_triggers += [{'name': 'separate_generic_port_alignment', 'triggers': ['isEndGenericMap']}]
github jeremiah-c-leary / vhdl-style-guide / vsg / rules / concurrent / rule_006.py View on Github external
def __init__(self):
        keyword_alignment_rule.__init__(self, 'concurrent', '006')
        self.solution = 'Inconsistent alignment of "<=" in group of lines.'
        self.sKeyword = '<='
        self.sStartGroupTrigger = 'isArchitectureBegin'
        self.sEndGroupTrigger = 'isEndArchitecture'
        self.lLineTriggers = ['insideConcurrent']
github jeremiah-c-leary / vhdl-style-guide / vsg / rules / component / rule_020.py View on Github external
def __init__(self):
        keyword_alignment_rule.__init__(self, 'component', '020')
        self.solution = 'Inconsistent alignment of comments in a component declaration.'
        self.sKeyword = '--'
        self.sStartGroupTrigger = 'isComponentDeclaration'
        self.sEndGroupTrigger = 'isComponentEnd'
        self.lLineTriggers = ['hasInlineComment']
        self.phase = 6

        self.separate_generic_port_alignment = True
        self.configuration.append('separate_generic_port_alignment')

        self.configuration_triggers += [{'name': 'separate_generic_port_alignment', 'triggers': ['isEndGenericMap']}]