vhdl-style-guide/vsg/rules/context/rule_010.py

18 lines
557 B
Python

from vsg import parser
from vsg.rules import move_item_next_to_another_item_rule
class rule_010(move_item_next_to_another_item_rule):
'''
Checks the context keyword is on the same line as the end context keyword.
'''
def __init__(self):
move_item_next_to_another_item_rule.__init__(self, 'context', '010', parser.context_end_context_keyword, parser.context_end_identifier)
self.solution = None
self.subphase = 2
self.regionBegin = parser.context_keyword
self.regionEnd = parser.context_semicolon