Updates for issue #55
Removed comment_002. This rule has been superceeded by specific rules checking for alignment of comments.
This commit is contained in:
parent
a606421723
commit
b21c44d768
|
|
@ -10,6 +10,6 @@ class comment_rule(rule.rule):
|
|||
|
||||
|
||||
from rule_001 import rule_001
|
||||
#from rule_002 import rule_002
|
||||
|
||||
from rule_003 import rule_003
|
||||
from rule_004 import rule_004
|
||||
|
|
|
|||
|
|
@ -1,41 +0,0 @@
|
|||
|
||||
from vsg.rules.comment import comment_rule
|
||||
|
||||
|
||||
# class rule_002(comment_rule):
|
||||
# '''Case rule 002 checks for the proper alignment of comments.'''
|
||||
#
|
||||
# def __init__(self):
|
||||
# comment_rule.__init__(self)
|
||||
# self.identifier = '002'
|
||||
# self.solution = 'Ensure proper alignment of comment with previous line.'
|
||||
# self.phase = 5
|
||||
#
|
||||
# def analyze(self, oFile):
|
||||
# for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
# if iLineNumber > 0:
|
||||
# oPreviousLine = oFile.lines[iLineNumber - 1]
|
||||
# if not oLine.isComment and oLine.hasComment:
|
||||
# if oLine.isCaseWhenKeyword:
|
||||
# if not oPreviousLine.isComment and oPreviousLine.hasComment:
|
||||
# if not oLine.commentColumn == oPreviousLine.commentColumn:
|
||||
# self.add_violation(iLineNumber)
|
||||
# if oPreviousLine.isComment:
|
||||
# if not oPreviousLine.commentColumn == (oPreviousLine.indentLevel * self.indentSize) and \
|
||||
# not oPreviousLine.commentColumn == ((oPreviousLine.indentLevel - 1) * self.indentSize):
|
||||
# if not oLine.commentColumn == oPreviousLine.commentColumn:
|
||||
# self.add_violation(iLineNumber)
|
||||
# else:
|
||||
# if not oPreviousLine.isComment and oPreviousLine.hasComment:
|
||||
# if not oLine.commentColumn == oPreviousLine.commentColumn:
|
||||
# self.add_violation(iLineNumber)
|
||||
# if oPreviousLine.isComment:
|
||||
# if not oPreviousLine.commentColumn == (oPreviousLine.indentLevel * self.indentSize):
|
||||
# if not oLine.commentColumn == oPreviousLine.commentColumn:
|
||||
# self.add_violation(iLineNumber)
|
||||
# if oLine.isComment:
|
||||
# if oPreviousLine.hasComment:
|
||||
# if not oPreviousLine.isComment:
|
||||
# if not oLine.commentColumn == oPreviousLine.commentColumn:
|
||||
# if not oLine.commentColumn == (oLine.indentLevel * self.indentSize):
|
||||
# self.add_violation(iLineNumber)
|
||||
Loading…
Reference in New Issue