From b21c44d76838fb7306ff92ff9b7b32db6bb2fa69 Mon Sep 17 00:00:00 2001 From: Jeremiah C Leary Date: Fri, 8 Dec 2017 06:21:51 -0600 Subject: [PATCH] Updates for issue #55 Removed comment_002. This rule has been superceeded by specific rules checking for alignment of comments. --- vsg/rules/comment/__init__.py | 2 +- vsg/rules/comment/rule_002.py | 41 ----------------------------------- 2 files changed, 1 insertion(+), 42 deletions(-) delete mode 100644 vsg/rules/comment/rule_002.py diff --git a/vsg/rules/comment/__init__.py b/vsg/rules/comment/__init__.py index 868fa0e1..b920f1a7 100644 --- a/vsg/rules/comment/__init__.py +++ b/vsg/rules/comment/__init__.py @@ -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 diff --git a/vsg/rules/comment/rule_002.py b/vsg/rules/comment/rule_002.py deleted file mode 100644 index 86db69b9..00000000 --- a/vsg/rules/comment/rule_002.py +++ /dev/null @@ -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)