Refactoring for code climate:
1) Added check.py to hold all checks.
checks from rule.py will be moved here
2) Moved _check_indent to check.indent
This commit is contained in:
parent
330304581c
commit
a4304575fc
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
import re
|
||||
|
||||
def indent(self, oLine, iLineNumber):
|
||||
'''Adds a violation if the indent of the line does not match the desired level.'''
|
||||
if not re.match('^\s{' + str(self.indentSize * oLine.indentLevel) + '}\S', oLine.line):
|
||||
self.add_violation(iLineNumber)
|
||||
|
|
@ -69,11 +69,6 @@ class rule():
|
|||
self.dFix = {}
|
||||
self.dFix['violations'] = {}
|
||||
|
||||
def _check_indent(self, oLine, iLineNumber):
|
||||
'''Adds a violation if the indent of the line does not match the desired level.'''
|
||||
if not re.match('^\s{' + str(self.indentSize * oLine.indentLevel) + '}\S', oLine.line):
|
||||
self.add_violation(iLineNumber)
|
||||
|
||||
def _fix_indent(self, oLine):
|
||||
'''Fixes indent violations.'''
|
||||
oLine.update_line(' '*oLine.indentLevel*self.indentSize + oLine.line.lstrip())
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
from vsg.rules.architecture import architecture_rule
|
||||
|
||||
from vsg import check
|
||||
|
||||
class rule_001(architecture_rule):
|
||||
'''
|
||||
|
|
@ -16,7 +16,7 @@ class rule_001(architecture_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isArchitectureKeyword:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.architecture import architecture_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_007(architecture_rule):
|
||||
|
|
@ -14,7 +15,7 @@ class rule_007(architecture_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isArchitectureBegin:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.architecture import architecture_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_008(architecture_rule):
|
||||
|
|
@ -14,7 +15,7 @@ class rule_008(architecture_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isEndArchitecture:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.case import case_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_001(case_rule):
|
||||
|
|
@ -14,7 +15,7 @@ class rule_001(case_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isCaseKeyword or oLine.isCaseWhenKeyword or oLine.isEndCaseKeyword:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.comment import comment_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_001(comment_rule):
|
||||
|
|
@ -15,7 +16,7 @@ class rule_001(comment_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isComment:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.component import component_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_001(component_rule):
|
||||
|
|
@ -17,7 +18,7 @@ class rule_001(component_rule):
|
|||
lFailureLines = []
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isComponentDeclaration:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.component import component_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_009(component_rule):
|
||||
|
|
@ -14,7 +15,7 @@ class rule_009(component_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isComponentEnd:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.concurrent import concurrent_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_001(concurrent_rule):
|
||||
|
|
@ -16,7 +17,7 @@ class rule_001(concurrent_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isConcurrentBegin:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.constant import constant_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_001(constant_rule):
|
||||
|
|
@ -16,7 +17,7 @@ class rule_001(constant_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isConstant:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
|
||||
from vsg.rules.entity import entity_rule
|
||||
from vsg import check
|
||||
|
||||
import re
|
||||
|
||||
|
||||
class rule_001(entity_rule):
|
||||
|
|
@ -16,7 +19,7 @@ class rule_001(entity_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isEntityDeclaration:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.entity import entity_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_009(entity_rule):
|
||||
|
|
@ -16,7 +17,7 @@ class rule_009(entity_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isEndEntityDeclaration:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.for_loop import for_loop_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_001(for_loop_rule):
|
||||
|
|
@ -16,7 +17,7 @@ class rule_001(for_loop_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isForLoopKeyword or oLine.isForLoopEnd:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.function import function_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_001(function_rule):
|
||||
|
|
@ -16,7 +17,7 @@ class rule_001(function_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isFunctionKeyword or oLine.isFunctionBegin or oLine.isFunctionEnd or oLine.isFunctionReturn:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.generate import generate_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_001(generate_rule):
|
||||
|
|
@ -14,7 +15,7 @@ class rule_001(generate_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isGenerateKeyword or oLine.isGenerateBegin or oLine.isGenerateEnd:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.generic import generic_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_002(generic_rule):
|
||||
|
|
@ -14,7 +15,7 @@ class rule_002(generic_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isGenericKeyword:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.generic import generic_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_004(generic_rule):
|
||||
|
|
@ -14,7 +15,7 @@ class rule_004(generic_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isGenericDeclaration and not oLine.isEndGenericMap:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.generic import generic_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_008(generic_rule):
|
||||
|
|
@ -16,7 +17,7 @@ class rule_008(generic_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isEndGenericMap and not oLine.isGenericDeclaration:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.if_statement import if_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_001(if_rule):
|
||||
|
|
@ -14,7 +15,7 @@ class rule_001(if_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isIfKeyword or oLine.isElseIfKeyword or oLine.isEndIfKeyword or oLine.isElseKeyword:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.instantiation import instantiation_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_001(instantiation_rule):
|
||||
|
|
@ -16,7 +17,7 @@ class rule_001(instantiation_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isInstantiationDeclaration or oLine.isInstantiationPortAssignment or oLine.isInstantiationPortEnd or oLine.isInstantiationPortKeyword or oLine.isInstantiationGenericAssignment or oLine.isInstantiationGenericEnd or oLine.isInstantiationGenericKeyword:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.library import library_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_001(library_rule):
|
||||
|
|
@ -16,7 +17,7 @@ class rule_001(library_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isLibrary:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.library import library_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_008(library_rule):
|
||||
|
|
@ -16,7 +17,7 @@ class rule_008(library_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isLibraryUse:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.package import package_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_001(package_rule):
|
||||
|
|
@ -16,7 +17,7 @@ class rule_001(package_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isPackageKeyword or oLine.isPackageEnd:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.port import port_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_002(port_rule):
|
||||
|
|
@ -16,7 +17,7 @@ class rule_002(port_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isPortKeyword:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.port import port_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_004(port_rule):
|
||||
|
|
@ -16,7 +17,7 @@ class rule_004(port_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isPortDeclaration and not oLine.isEndPortMap:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.port import port_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_015(port_rule):
|
||||
|
|
@ -16,7 +17,7 @@ class rule_015(port_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isEndPortMap and not oLine.isPortDeclaration:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.process import process_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_001(process_rule):
|
||||
|
|
@ -16,7 +17,7 @@ class rule_001(process_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isProcessKeyword:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.process import process_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_003(process_rule):
|
||||
|
|
@ -16,7 +17,7 @@ class rule_003(process_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isProcessBegin:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.process import process_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_006(process_rule):
|
||||
|
|
@ -16,7 +17,7 @@ class rule_006(process_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isEndProcess:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.sequential import sequential_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_001(sequential_rule):
|
||||
|
|
@ -16,7 +17,7 @@ class rule_001(sequential_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isSequential:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.signal import signal_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_001(signal_rule):
|
||||
|
|
@ -16,7 +17,7 @@ class rule_001(signal_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isSignal:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.type import type_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_001(type_rule):
|
||||
|
|
@ -16,7 +17,7 @@ class rule_001(type_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isTypeKeyword:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.type import type_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_005(type_rule):
|
||||
|
|
@ -16,7 +17,7 @@ class rule_005(type_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.insideType and not oLine.isTypeKeyword:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.variable import variable_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_001(variable_rule):
|
||||
|
|
@ -16,7 +17,7 @@ class rule_001(variable_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isVariable:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
from vsg.rules.variable_assignment import variable_assignment_rule
|
||||
from vsg import check
|
||||
|
||||
|
||||
class rule_001(variable_assignment_rule):
|
||||
|
|
@ -14,7 +15,7 @@ class rule_001(variable_assignment_rule):
|
|||
def analyze(self, oFile):
|
||||
for iLineNumber, oLine in enumerate(oFile.lines):
|
||||
if oLine.isVariableAssignment:
|
||||
self._check_indent(oLine, iLineNumber)
|
||||
check.indent(self, oLine, iLineNumber)
|
||||
|
||||
def _fix_violations(self, oFile):
|
||||
for iLineNumber in self.violations:
|
||||
|
|
|
|||
Loading…
Reference in New Issue