Make if rule 025 use case_rule as a base.

This commit is contained in:
Michał Kruszewski 2019-10-07 15:31:06 +02:00
parent b449cd7f47
commit 338d7cd3b5
1 changed files with 6 additions and 4 deletions

View File

@ -1,11 +1,13 @@
from vsg.rules import lower_case_rule
from vsg.rules import case_rule
from vsg import utils
class rule_025(lower_case_rule):
class rule_025(case_rule):
'''
If rule 001 checks the **if** keyword is lowercase.
If rule 025 checks the **if** keyword has proper case.
'''
def __init__(self):
lower_case_rule.__init__(self, 'if', '025', 'isIfKeyword', 'if')
case_rule.__init__(self, 'if', '025', 'isIfKeyword', utils.extract_first_word)
self.solution = 'Change if keyword to ' + self.case + 'case'