hackedteam/vector-edk

View on GitHub
BaseTools/Source/Python/Ecc/c.py

Summary

Maintainability
F
3 mos
Test Coverage

File c.py has 2201 lines of code (exceeds 250 allowed). Consider refactoring.
Open

## @file
# This file is used to be the c coding style checking of ECC tool
#
# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
Severity: Major
Found in BaseTools/Source/Python/Ecc/c.py - About 6 days to fix

    Function CheckFileHeaderDoxygenComments has a Cognitive Complexity of 97 (exceeds 5 allowed). Consider refactoring.
    Open

    def CheckFileHeaderDoxygenComments(FullFileName):
        ErrorMsgList = []
    
        FileID = GetTableID(FullFileName, ErrorMsgList)
        if FileID < 0:
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 1 day to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function GetVarInfo has a Cognitive Complexity of 95 (exceeds 5 allowed). Consider refactoring.
    Open

    def GetVarInfo(PredVarList, FuncRecord, FullFileName, IsFuncCall=False, TargetType=None, StarList=None):
    
        PredVar = PredVarList[0]
        FileID = GetTableID(FullFileName)
    
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 1 day to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function GetIdentifierList has a Cognitive Complexity of 90 (exceeds 5 allowed). Consider refactoring.
    Open

    def GetIdentifierList():
        IdList = []
        for comment in FileProfile.CommentList:
            IdComment = DataClass.IdentifierClass(-1, '', '', '', comment.Content, DataClass.MODEL_IDENTIFIER_COMMENT, -1, -1, comment.StartPos[0], comment.StartPos[1], comment.EndPos[0], comment.EndPos[1])
            IdList.append(IdComment)
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 1 day to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function CheckFunctionHeaderConsistentWithDoxygenComment has a Cognitive Complexity of 89 (exceeds 5 allowed). Consider refactoring.
    Open

    def CheckFunctionHeaderConsistentWithDoxygenComment(FuncModifier, FuncHeader, FuncStartLine, CommentStr, CommentStartLine, ErrorMsgList, CommentId= -1, TableName=''):
    
        ParamList = GetParamList(FuncHeader)
        CheckGeneralDoxygenCommentLayout(CommentStr, CommentStartLine, ErrorMsgList, CommentId, TableName)
        DescriptionStr = CommentStr
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 1 day to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function CheckDeclTypedefFormat has a Cognitive Complexity of 86 (exceeds 5 allowed). Consider refactoring.
    Open

    def CheckDeclTypedefFormat(FullFileName, ModelId):
        ErrorMsgList = []
    
        FileID = GetTableID(FullFileName, ErrorMsgList)
        if FileID < 0:
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 1 day to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function CheckPointerNullComparison has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring.
    Open

    def CheckPointerNullComparison(FullFileName):
        ErrorMsgList = []
    
        FileID = GetTableID(FullFileName, ErrorMsgList)
        if FileID < 0:
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 1 day to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function CheckBooleanValueComparison has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring.
    Open

    def CheckBooleanValueComparison(FullFileName):
        ErrorMsgList = []
    
        FileID = GetTableID(FullFileName, ErrorMsgList)
        if FileID < 0:
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 1 day to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function CheckNonBooleanValueComparison has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring.
    Open

    def CheckNonBooleanValueComparison(FullFileName):
        ErrorMsgList = []
    
        FileID = GetTableID(FullFileName, ErrorMsgList)
        if FileID < 0:
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 1 day to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function CheckFuncLayoutPrototype has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring.
    Open

    def CheckFuncLayoutPrototype(FullFileName):
        ErrorMsgList = []
    
        FileID = GetTableID(FullFileName, ErrorMsgList)
        if FileID < 0:
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 1 day to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function CheckMemberVariableFormat has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
    Open

    def CheckMemberVariableFormat(Name, Value, FileTable, TdId, ModelId):
        ErrMsgList = []
        # Member variable format pattern.
        Pattern = re.compile(r'^[A-Z]+\S*[a-z]\S*$')
    
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 1 day to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function GetParamList has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
    Open

    def GetParamList(FuncDeclarator, FuncNameLine=0, FuncNameOffset=0):
        FuncDeclarator = StripComments(FuncDeclarator)
        ParamIdList = []
        #DeclSplitList = FuncDeclarator.split('(')
        LBPos = FuncDeclarator.find('(')
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 7 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function CheckFuncLayoutName has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
    Open

    def CheckFuncLayoutName(FullFileName):
        ErrorMsgList = []
        # Parameter variable format pattern.
        Pattern = re.compile(r'^[A-Z]+\S*[a-z]\S*$')
        ParamIgnoreList = ('VOID', '...')
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 6 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function SplitPredicateByOp has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
    Open

    def SplitPredicateByOp(Str, Op, IsFuncCalling=False):
    
        Name = Str.strip()
        Value = None
    
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 5 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function GetFunctionList has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
    Open

    def GetFunctionList():
        FuncObjList = []
        for FuncDef in FileProfile.FunctionDefinitionList:
            ParamIdList = []
            DeclText = FuncDef.Declarator.lstrip()
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 5 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function CheckDoxygenCommand has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
    Open

    def CheckDoxygenCommand(FullFileName):
        ErrorMsgList = []
    
        FileID = GetTableID(FullFileName, ErrorMsgList)
        if FileID < 0:
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 5 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function CheckDeclNoUseCType has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
    Open

    def CheckDeclNoUseCType(FullFileName):
        ErrorMsgList = []
    
        FileID = GetTableID(FullFileName, ErrorMsgList)
        if FileID < 0:
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 5 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function CollectSourceCodeDataIntoDB has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
    Open

    def CollectSourceCodeDataIntoDB(RootDir):
        FileObjList = []
        tuple = os.walk(RootDir)
        IgnoredPattern = GetIgnoredDirListPattern()
        ParseErrorFileList = []
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 4 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function GetFinalTypeValue has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
    Open

    def GetFinalTypeValue(Type, FieldName, TypedefDict, SUDict):
        Value = TypedefDict.get(Type)
        if Value == None:
            Value = SUDict.get(Type)
        if Value == None:
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 3 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function GetCNameList has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
    Open

    def GetCNameList(Lvalue, StarList=[]):
        Lvalue += ' '
        i = 0
        SearchBegin = 0
        VarStart = -1
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 3 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function CheckDoxygenTripleForwardSlash has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
    Open

    def CheckDoxygenTripleForwardSlash(FullFileName):
        ErrorMsgList = []
    
        FileID = GetTableID(FullFileName, ErrorMsgList)
        if FileID < 0:
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 3 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function GetPredicateListFromPredicateExpStr has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
    Open

    def GetPredicateListFromPredicateExpStr(PES):
    
        PredicateList = []
        i = 0
        PredicateBegin = 0
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 3 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function CheckDeclArgModifier has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
    Open

    def CheckDeclArgModifier(FullFileName):
        ErrorMsgList = []
    
        FileID = GetTableID(FullFileName, ErrorMsgList)
        if FileID < 0:
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 2 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function CheckFuncHeaderDoxygenComments has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
    Open

    def CheckFuncHeaderDoxygenComments(FullFileName):
        ErrorMsgList = []
    
        FileID = GetTableID(FullFileName, ErrorMsgList)
        if FileID < 0:
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 2 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function GetTypedefDict has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
    Open

    def GetTypedefDict(FullFileName):
    
        Dict = ComplexTypeDict.get(FullFileName)
        if Dict != None:
            return Dict
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 2 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function CheckFuncLayoutReturnType has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
    Open

    def CheckFuncLayoutReturnType(FullFileName):
        ErrorMsgList = []
    
        FileID = GetTableID(FullFileName, ErrorMsgList)
        if FileID < 0:
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 2 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function GetDoxygenStrFromComment has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
    Open

    def GetDoxygenStrFromComment(Str):
        DoxygenStrList = []
        ParamTagList = Str.split('@param')
        if len(ParamTagList) > 1:
            i = 1
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function GetAllIncludeFiles has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

    def GetAllIncludeFiles(FullFileName):
        if AllIncludeFileListDict.get(FullFileName) != None:
            return AllIncludeFileListDict.get(FullFileName)
    
        FileDirName = os.path.dirname(FullFileName)
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function CheckFuncLayoutLocalVariable has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

    def CheckFuncLayoutLocalVariable(FullFileName):
        ErrorMsgList = []
    
        FileID = GetTableID(FullFileName, ErrorMsgList)
        if FileID < 0:
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function GetSUDict has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

    def GetSUDict(FullFileName):
    
        Dict = SUDict.get(FullFileName)
        if Dict != None:
            return Dict
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function StripComments has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

    def StripComments(Str):
        Str += '   '
        ListFromStr = list(Str)
    
        InComment = False
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function CheckHeaderFileIfndef has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

    def CheckHeaderFileIfndef(FullFileName):
        ErrorMsgList = []
    
        FileID = GetTableID(FullFileName, ErrorMsgList)
        if FileID < 0:
    Severity: Minor
    Found in BaseTools/Source/Python/Ecc/c.py - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function CheckFunctionHeaderConsistentWithDoxygenComment has 8 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def CheckFunctionHeaderConsistentWithDoxygenComment(FuncModifier, FuncHeader, FuncStartLine, CommentStr, CommentStartLine, ErrorMsgList, CommentId= -1, TableName=''):
    Severity: Major
    Found in BaseTools/Source/Python/Ecc/c.py - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

              if ListFromStr[Index] == '\n':
                  if InComment and DoubleSlashComment:
                      InComment = False
                      DoubleSlashComment = False
                  Index += 1
      Severity: Major
      Found in BaseTools/Source/Python/Ecc/c.py - About 1 hr to fix

        Function GetTypeInfo has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
        Open

        def GetTypeInfo(RefList, Modifier, FullFileName, TargetType=None):
            TypedefDict = GetTypedefDict(FullFileName)
            SUDict = GetSUDict(FullFileName)
            Type = GetDataTypeFromModifier(Modifier).replace('*', '').strip()
        
        Severity: Minor
        Found in BaseTools/Source/Python/Ecc/c.py - About 55 mins to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function GetVarInfo has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def GetVarInfo(PredVarList, FuncRecord, FullFileName, IsFuncCall=False, TargetType=None, StarList=None):
        Severity: Minor
        Found in BaseTools/Source/Python/Ecc/c.py - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                              if len(Type.strip()) == 0:
                                  Type = TypeList[-2]
                          TypedefDict = GetTypedefDict(FullFileName)
          Severity: Major
          Found in BaseTools/Source/Python/Ecc/c.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                while Index < NameStart:
                                    FirstChar = DeclSplitList[0][Index]
                                    if DeclSplitList[0][Index:].startswith('EFIAPI'):
                                        Index += 6
                                        VarNameStartColumn += 6
            Severity: Major
            Found in BaseTools/Source/Python/Ecc/c.py - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                  if DeclSplitList[0][Index:].startswith('EFIAPI'):
                                      Index += 6
                                      FuncNameStartColumn += 6
                                      PreChar = ''
                                      continue
              Severity: Major
              Found in BaseTools/Source/Python/Ecc/c.py - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                    for Star in StarList:
                                        Type = Type.strip()
                                        Type = Type.rstrip(Star)
                                    # Get real type after de-reference pointers.
                                    if len(Type.strip()) == 0:
                Severity: Major
                Found in BaseTools/Source/Python/Ecc/c.py - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                      if PredVarStr in FuncReturnTypeDict:
                                          continue
                  
                  Severity: Major
                  Found in BaseTools/Source/Python/Ecc/c.py - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                        if DiffModifier(ParamListOfDef[Index].Modifier, ParamListOfDecl[Index].Modifier) and not EccGlobalData.gException.IsException(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE_3, FuncName):
                                            PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE_3, 'Parameter %s has different modifier with prototype in function [%s].' % (ParamListOfDef[Index].Name, FuncName), 'Function', FuncDef[3])
                                        Index += 1
                    Severity: Major
                    Found in BaseTools/Source/Python/Ecc/c.py - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                          if Type != None:
                                              if Type.find('BOOLEAN') != -1:
                                                  PrintErrorMsg(ERROR_PREDICATE_EXPRESSION_CHECK_BOOLEAN_VALUE, 'Predicate Expression: %s' % Exp, FileTable, Str[2])
                                              continue
                      
                      Severity: Major
                      Found in BaseTools/Source/Python/Ecc/c.py - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                            for Star in StarList:
                                                Type = Type.strip()
                                                Type = Type.rstrip(Star)
                                            # Get real type after de-reference pointers.
                                            if len(Type.strip()) == 0:
                        Severity: Major
                        Found in BaseTools/Source/Python/Ecc/c.py - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                              if EccGlobalData.gConfig.HeaderCheckCFileCommentReferenceFormat == '1' or EccGlobalData.gConfig.HeaderCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
                                                  if RefListFlag == True:
                                                      if RefLine.strip() and RefLine.strip().startswith('**/') == False and RefLine.startswith('  -') == False:                            
                                                          PrintErrorMsg(ERROR_HEADER_CHECK_FILE, 'Each reference on a separate line should begin with a bullet character ""-"" ', FileTable, ID)                    
                              
                          Severity: Major
                          Found in BaseTools/Source/Python/Ecc/c.py - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                if RealCmd not in DoxygenCommandList:
                                                    PrintErrorMsg(ERROR_DOXYGEN_CHECK_COMMAND, 'Unknown doxygen command %s' % Part, FileTable, Result[1])
                            
                            Severity: Major
                            Found in BaseTools/Source/Python/Ecc/c.py - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                  if len(Type.strip()) == 0:
                                                      Type = TypeList[-2]
                                              TypedefDict = GetTypedefDict(FullFileName)
                              Severity: Major
                              Found in BaseTools/Source/Python/Ecc/c.py - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                    if Part.lstrip('@') not in DoxygenCommandList:
                                                        PrintErrorMsg(ERROR_DOXYGEN_CHECK_COMMAND, 'Unknown doxygen command %s' % Part, FileTable, Result[1])
                                                else:
                                Severity: Major
                                Found in BaseTools/Source/Python/Ecc/c.py - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                      if Part.strip() == 'IN':
                                                          InOutStr += 'in'
                                                      if Part.strip() == 'OUT':
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Ecc/c.py - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                        if TmpStr.startswith(PredVarStr):
                                                            IsFuncCall = True
                                    
                                    Severity: Major
                                    Found in BaseTools/Source/Python/Ecc/c.py - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                          if Tag.find('[' + InOutStr + ']') == -1:
                                                              if InOutStr != 'in, out':
                                                                  ErrorMsgList.append('Line %d : in Comment, <%s> does NOT have %s ' % (CommentStartLine, (TagPartList[0] + ' ' + TagPartList[1]).replace('\n', '').replace('\r', ''), '[' + InOutStr + ']'))
                                                                  PrintErrorMsg(ERROR_DOXYGEN_CHECK_FUNCTION_HEADER, 'in Comment, <%s> does NOT have %s ' % ((TagPartList[0] + ' ' + TagPartList[1]).replace('\n', '').replace('\r', ''), '[' + InOutStr + ']'), TableName, CommentId)
                                                              else:
                                      Severity: Major
                                      Found in BaseTools/Source/Python/Ecc/c.py - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                            if DiffModifier(ParamListOfDef[Index].Modifier, ParamListOfDecl[Index].Modifier) and not EccGlobalData.gException.IsException(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE_3, FuncName):
                                                                PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE_3, 'Parameter %s has different modifier with prototype in function [%s].' % (ParamListOfDef[Index].Name, FuncName), 'Function', FuncDef[3])
                                                            Index += 1
                                        Severity: Major
                                        Found in BaseTools/Source/Python/Ecc/c.py - About 45 mins to fix

                                          Avoid deeply nested control flow statements.
                                          Open

                                                              if PredVarStr in FuncReturnTypeDict:
                                                                  continue
                                          
                                          Severity: Major
                                          Found in BaseTools/Source/Python/Ecc/c.py - About 45 mins to fix

                                            Avoid deeply nested control flow statements.
                                            Open

                                                                if TmpStr.startswith(PredVarStr):
                                                                    IsFuncCall = True
                                            
                                            Severity: Major
                                            Found in BaseTools/Source/Python/Ecc/c.py - About 45 mins to fix

                                              Avoid deeply nested control flow statements.
                                              Open

                                                                  if Index == -1:
                                                                      PrintErrorMsg(ERROR_DOXYGEN_CHECK_COMMAND, 'Unknown doxygen command %s' % Part, FileTable, Result[1])
                                                                  RealCmd = Part[1:Index]
                                              Severity: Major
                                              Found in BaseTools/Source/Python/Ecc/c.py - About 45 mins to fix

                                                Avoid deeply nested control flow statements.
                                                Open

                                                                    if Type != None:
                                                                        if Type.find('BOOLEAN') == -1:
                                                                            PrintErrorMsg(ERROR_PREDICATE_EXPRESSION_CHECK_NO_BOOLEAN_OPERATOR, 'Predicate Expression: %s' % Exp, FileTable, Str[2])
                                                                        continue
                                                
                                                Severity: Major
                                                Found in BaseTools/Source/Python/Ecc/c.py - About 45 mins to fix

                                                  Avoid deeply nested control flow statements.
                                                  Open

                                                                      if PredVarStr in FuncReturnTypeDict:
                                                                          continue
                                                                  Type = GetVarInfo(PredVarList, FuncRecord, FullFileName, IsFuncCall, 'BOOLEAN', StarList)
                                                  Severity: Major
                                                  Found in BaseTools/Source/Python/Ecc/c.py - About 45 mins to fix

                                                    Avoid deeply nested control flow statements.
                                                    Open

                                                                        if RefLine.strip() and (NextLineIndex + 1) < len(CommentStrList) and CommentStrList[NextLineIndex+1].strip() and CommentStrList[NextLineIndex+1].strip().startswith('**/') == False:
                                                                            RefListFlag = True
                                                                        if RefLine.strip() == False or RefLine.strip().startswith('**/'):
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Ecc/c.py - About 45 mins to fix

                                                      Avoid deeply nested control flow statements.
                                                      Open

                                                                          if RefLine.strip() == False or RefLine.strip().startswith('**/'):
                                                                              RefListFlag = False
                                                                              break
                                                                          # Check whether C File header Comment's each reference at list should begin with a bullet character.
                                                                          if EccGlobalData.gConfig.HeaderCheckCFileCommentReferenceFormat == '1' or EccGlobalData.gConfig.HeaderCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
                                                      Severity: Major
                                                      Found in BaseTools/Source/Python/Ecc/c.py - About 45 mins to fix

                                                        Avoid deeply nested control flow statements.
                                                        Open

                                                                            if Part.strip() == 'OUT':
                                                                                if InOutStr != '':
                                                                                    InOutStr += ', out'
                                                                                else:
                                                                                    InOutStr = 'out'
                                                        Severity: Major
                                                        Found in BaseTools/Source/Python/Ecc/c.py - About 45 mins to fix

                                                          Avoid deeply nested control flow statements.
                                                          Open

                                                                              if TmpStr.startswith(PredVarStr):
                                                                                  IsFuncCall = True
                                                          
                                                          Severity: Major
                                                          Found in BaseTools/Source/Python/Ecc/c.py - About 45 mins to fix

                                                            Avoid deeply nested control flow statements.
                                                            Open

                                                                                if Type != None:
                                                                                    if Type.find('*') != -1 and Type != 'BOOLEAN*':
                                                                                        PrintErrorMsg(ERROR_PREDICATE_EXPRESSION_CHECK_COMPARISON_NULL_TYPE, 'Predicate Expression: %s' % Exp, FileTable, Str[2])
                                                                                    continue
                                                            
                                                            Severity: Major
                                                            Found in BaseTools/Source/Python/Ecc/c.py - About 45 mins to fix

                                                              Consider simplifying this complex logical expression.
                                                              Open

                                                                      if DotIndex == -1 and ArrowIndex == -1:
                                                                          break
                                                                      elif DotIndex == -1 and ArrowIndex != -1:
                                                                          SearchBegin = VarEnd + ArrowIndex
                                                                      elif ArrowIndex == -1 and DotIndex != -1:
                                                              Severity: Major
                                                              Found in BaseTools/Source/Python/Ecc/c.py - About 40 mins to fix

                                                                Function CheckMemberVariableFormat has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                Open

                                                                def CheckMemberVariableFormat(Name, Value, FileTable, TdId, ModelId):
                                                                Severity: Minor
                                                                Found in BaseTools/Source/Python/Ecc/c.py - About 35 mins to fix

                                                                  Function CheckGeneralDoxygenCommentLayout has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                  Open

                                                                  def CheckGeneralDoxygenCommentLayout(Str, StartLine, ErrorMsgList, CommentId= -1, TableName=''):
                                                                  Severity: Minor
                                                                  Found in BaseTools/Source/Python/Ecc/c.py - About 35 mins to fix

                                                                    Function SplitPredicateStr has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                    Open

                                                                    def SplitPredicateStr(Str):
                                                                    
                                                                        Str = Str.lstrip('(')
                                                                        IsFuncCalling = False
                                                                        p = GetFuncDeclPattern()
                                                                    Severity: Minor
                                                                    Found in BaseTools/Source/Python/Ecc/c.py - About 35 mins to fix

                                                                    Cognitive Complexity

                                                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                    A method's cognitive complexity is based on a few simple rules:

                                                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                    • Code is considered more complex for each "break in the linear flow of the code"
                                                                    • Code is considered more complex when "flow breaking structures are nested"

                                                                    Further reading

                                                                    Function GetDataTypeFromModifier has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                    Open

                                                                    def GetDataTypeFromModifier(ModifierStr):
                                                                        MList = ModifierStr.split()
                                                                        ReturnType = ''
                                                                        for M in MList:
                                                                            if M in EccGlobalData.gConfig.ModifierList:
                                                                    Severity: Minor
                                                                    Found in BaseTools/Source/Python/Ecc/c.py - About 35 mins to fix

                                                                    Cognitive Complexity

                                                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                    A method's cognitive complexity is based on a few simple rules:

                                                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                    • Code is considered more complex for each "break in the linear flow of the code"
                                                                    • Code is considered more complex when "flow breaking structures are nested"

                                                                    Further reading

                                                                    Function GetIdType has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                    Open

                                                                    def GetIdType(Str):
                                                                        Type = DataClass.MODEL_UNKNOWN
                                                                        Str = Str.replace('#', '# ')
                                                                        List = Str.split()
                                                                        if List[1] == 'include':
                                                                    Severity: Minor
                                                                    Found in BaseTools/Source/Python/Ecc/c.py - About 35 mins to fix

                                                                    Cognitive Complexity

                                                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                    A method's cognitive complexity is based on a few simple rules:

                                                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                    • Code is considered more complex for each "break in the linear flow of the code"
                                                                    • Code is considered more complex when "flow breaking structures are nested"

                                                                    Further reading

                                                                    Function CheckFuncLayoutBody has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                    Open

                                                                    def CheckFuncLayoutBody(FullFileName):
                                                                        ErrorMsgList = []
                                                                    
                                                                        FileID = GetTableID(FullFileName, ErrorMsgList)
                                                                        if FileID < 0:
                                                                    Severity: Minor
                                                                    Found in BaseTools/Source/Python/Ecc/c.py - About 35 mins to fix

                                                                    Cognitive Complexity

                                                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                    A method's cognitive complexity is based on a few simple rules:

                                                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                    • Code is considered more complex for each "break in the linear flow of the code"
                                                                    • Code is considered more complex when "flow breaking structures are nested"

                                                                    Further reading

                                                                    Function CheckFuncLayoutModifier has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                    Open

                                                                    def CheckFuncLayoutModifier(FullFileName):
                                                                        ErrorMsgList = []
                                                                    
                                                                        FileID = GetTableID(FullFileName, ErrorMsgList)
                                                                        if FileID < 0:
                                                                    Severity: Minor
                                                                    Found in BaseTools/Source/Python/Ecc/c.py - About 35 mins to fix

                                                                    Cognitive Complexity

                                                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                    A method's cognitive complexity is based on a few simple rules:

                                                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                    • Code is considered more complex for each "break in the linear flow of the code"
                                                                    • Code is considered more complex when "flow breaking structures are nested"

                                                                    Further reading

                                                                    Avoid too many return statements within this function.
                                                                    Open

                                                                                    return Type
                                                                    Severity: Major
                                                                    Found in BaseTools/Source/Python/Ecc/c.py - About 30 mins to fix

                                                                      Avoid too many return statements within this function.
                                                                      Open

                                                                                  return [Name, Value]
                                                                      Severity: Major
                                                                      Found in BaseTools/Source/Python/Ecc/c.py - About 30 mins to fix

                                                                        Avoid too many return statements within this function.
                                                                        Open

                                                                                        return Type
                                                                        Severity: Major
                                                                        Found in BaseTools/Source/Python/Ecc/c.py - About 30 mins to fix

                                                                          Avoid too many return statements within this function.
                                                                          Open

                                                                              return None
                                                                          Severity: Major
                                                                          Found in BaseTools/Source/Python/Ecc/c.py - About 30 mins to fix

                                                                            Avoid too many return statements within this function.
                                                                            Open

                                                                                            return Type
                                                                            Severity: Major
                                                                            Found in BaseTools/Source/Python/Ecc/c.py - About 30 mins to fix

                                                                              Avoid too many return statements within this function.
                                                                              Open

                                                                                          return Type
                                                                              Severity: Major
                                                                              Found in BaseTools/Source/Python/Ecc/c.py - About 30 mins to fix

                                                                                Avoid too many return statements within this function.
                                                                                Open

                                                                                        return None
                                                                                Severity: Major
                                                                                Found in BaseTools/Source/Python/Ecc/c.py - About 30 mins to fix

                                                                                  Avoid too many return statements within this function.
                                                                                  Open

                                                                                              return Type
                                                                                  Severity: Major
                                                                                  Found in BaseTools/Source/Python/Ecc/c.py - About 30 mins to fix

                                                                                    Avoid too many return statements within this function.
                                                                                    Open

                                                                                            return [PredPartList, '<']
                                                                                    Severity: Major
                                                                                    Found in BaseTools/Source/Python/Ecc/c.py - About 30 mins to fix

                                                                                      Avoid too many return statements within this function.
                                                                                      Open

                                                                                          return [[Str, None], None]
                                                                                      Severity: Major
                                                                                      Found in BaseTools/Source/Python/Ecc/c.py - About 30 mins to fix

                                                                                        Avoid too many return statements within this function.
                                                                                        Open

                                                                                            return ErrMsgList
                                                                                        Severity: Major
                                                                                        Found in BaseTools/Source/Python/Ecc/c.py - About 30 mins to fix

                                                                                          Avoid too many return statements within this function.
                                                                                          Open

                                                                                                      return Type
                                                                                          Severity: Major
                                                                                          Found in BaseTools/Source/Python/Ecc/c.py - About 30 mins to fix

                                                                                            Avoid too many return statements within this function.
                                                                                            Open

                                                                                                    return [PredPartList, '>']
                                                                                            Severity: Major
                                                                                            Found in BaseTools/Source/Python/Ecc/c.py - About 30 mins to fix

                                                                                              Avoid too many return statements within this function.
                                                                                              Open

                                                                                                          return Type
                                                                                              Severity: Major
                                                                                              Found in BaseTools/Source/Python/Ecc/c.py - About 30 mins to fix

                                                                                                Avoid too many return statements within this function.
                                                                                                Open

                                                                                                                return Type
                                                                                                Severity: Major
                                                                                                Found in BaseTools/Source/Python/Ecc/c.py - About 30 mins to fix

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          for FuncDecl in FuncDeclList:
                                                                                                              LBPos = FuncDecl[1].find('(')
                                                                                                              DeclName = FuncDecl[1][0:LBPos].strip()
                                                                                                              DeclModifier = FuncDecl[0]
                                                                                                              if DeclName == FuncName:
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 2 days to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1474..1492

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 297.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          for FuncDecl in FuncDeclList:
                                                                                                              LBPos = FuncDecl[1].find('(')
                                                                                                              DeclName = FuncDecl[1][0:LBPos].strip()
                                                                                                              DeclModifier = FuncDecl[0]
                                                                                                              if DeclName == FuncName:
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 2 days to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1431..1449

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 297.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                              if NameStart > 0:
                                                                                                                  FuncDef.Modifier += ' ' + DeclSplitList[0][0:NameStart]
                                                                                                                  Index = 0
                                                                                                                  PreChar = ''
                                                                                                                  while Index < NameStart:
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 2 days to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 151..180

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 258.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                                  if NameStart > 0:
                                                                                                                      var.Modifier += ' ' + DeclSplitList[0][0:NameStart]
                                                                                                                      Index = 0
                                                                                                                      PreChar = ''
                                                                                                                      while Index < NameStart:
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 2 days to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 449..478

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 258.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          while not FirstChar.isalpha() and FirstChar != '_':
                                                                                                              if FirstChar == '*':
                                                                                                                  FuncDef.Modifier += '*'
                                                                                                                  FuncNameStartColumn += 1
                                                                                                                  DeclText = DeclText.lstrip('*')
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 2 days to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 118..140

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 222.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          while not FirstChar.isalpha() and FirstChar != '_':
                                                                                                              if FirstChar == '*':
                                                                                                                  var.Modifier += '*'
                                                                                                                  VarNameStartColumn += 1
                                                                                                                  DeclText = DeclText.lstrip('*')
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 2 days to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 415..437

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 222.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                  def GetIdType(Str):
                                                                                                      Type = DataClass.MODEL_UNKNOWN
                                                                                                      Str = Str.replace('#', '# ')
                                                                                                      List = Str.split()
                                                                                                      if List[1] == 'include':
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 day to fix
                                                                                                  BaseTools/Source/Python/Eot/c.py on lines 99..117

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 188.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                  Open

                                                                                                      for Result in ResultSet:
                                                                                                          if len(PredVarList) > 1:
                                                                                                              Type = GetTypeInfo(PredVarList[1:], Result[0], FullFileName, TargetType)
                                                                                                              return Type
                                                                                                          else:
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 2 other locations - About 1 day to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1191..1207
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1222..1238

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 181.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          for Result in ResultSet:
                                                                                                              if len(PredVarList) > 1:
                                                                                                                  Type = GetTypeInfo(PredVarList[1:], Result[0], FullFileName, TargetType)
                                                                                                                  return Type
                                                                                                              else:
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 2 other locations - About 1 day to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1144..1161
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1191..1207

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 181.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                  Open

                                                                                                      for Result in ResultSet:
                                                                                                          if len(PredVarList) > 1:
                                                                                                              Type = GetTypeInfo(PredVarList[1:], Result[0], FullFileName, TargetType)
                                                                                                              return Type
                                                                                                          else:
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 2 other locations - About 1 day to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1144..1161
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1222..1238

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 181.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          for Td in TdList:
                                                                                                  
                                                                                                              if len(Td[0]) > 0:
                                                                                                                  continue
                                                                                                              if Result[1] >= Td[3] and Td[4] >= Result[2]:
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 day to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1716..1728

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 181.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          for Td in TdList:
                                                                                                              # skip function pointer
                                                                                                              if len(Td[0]) > 0:
                                                                                                                  continue
                                                                                                              if Result[1] >= Td[3] and Td[4] >= Result[2]:
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 day to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1757..1769

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 181.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          while Index < Start:
                                                                                                              FirstChar = p[Index]
                                                                                                  
                                                                                                              if FirstChar == '\r':
                                                                                                                  Index += 1
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 day to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 373..394

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 151.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          while Index < len(p):
                                                                                                              FirstChar = p[Index]
                                                                                                  
                                                                                                              if FirstChar == '\r':
                                                                                                                  Index += 1
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 day to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 345..366

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 151.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                      for enum in FileProfile.EnumerationDefinitionList:
                                                                                                          LBPos = enum.Content.find('{')
                                                                                                          RBPos = enum.Content.find('}')
                                                                                                          Name = enum.Content[4:LBPos].strip()
                                                                                                          Value = enum.Content[LBPos + 1:RBPos]
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 day to fix
                                                                                                  BaseTools/Source/Python/Eot/c.py on lines 181..187

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 139.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                                          if InOutStr != 'in, out':
                                                                                                                              ErrorMsgList.append('Line %d : in Comment, <%s> does NOT have %s ' % (CommentStartLine, (TagPartList[0] + ' ' + TagPartList[1]).replace('\n', '').replace('\r', ''), '[' + InOutStr + ']'))
                                                                                                                              PrintErrorMsg(ERROR_DOXYGEN_CHECK_FUNCTION_HEADER, 'in Comment, <%s> does NOT have %s ' % ((TagPartList[0] + ' ' + TagPartList[1]).replace('\n', '').replace('\r', ''), '[' + InOutStr + ']'), TableName, CommentId)
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 day to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2569..2571

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 139.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                                              if Tag.find('[in,out]') == -1:
                                                                                                                                  ErrorMsgList.append('Line %d : in Comment, <%s> does NOT have %s ' % (CommentStartLine, (TagPartList[0] + ' ' + TagPartList[1]).replace('\n', '').replace('\r', ''), '[' + InOutStr + ']'))
                                                                                                                                  PrintErrorMsg(ERROR_DOXYGEN_CHECK_FUNCTION_HEADER, 'in Comment, <%s> does NOT have %s ' % ((TagPartList[0] + ' ' + TagPartList[1]).replace('\n', '').replace('\r', ''), '[' + InOutStr + ']'), TableName, CommentId)
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 day to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2565..2567

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 139.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                      for Result in ResultSet:
                                                                                                          ParamList = GetParamList(Result[1])
                                                                                                          FuncName = Result[3]
                                                                                                          if EccGlobalData.gException.IsException(ERROR_DECLARATION_DATA_TYPE_CHECK_NO_USE_C_TYPE, FuncName):
                                                                                                              continue
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 day to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1855..1866

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 139.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                      for Result in ResultSet:
                                                                                                          ParamList = GetParamList(Result[1])
                                                                                                          FuncName = Result[3]
                                                                                                          if EccGlobalData.gException.IsException(ERROR_DECLARATION_DATA_TYPE_CHECK_NO_USE_C_TYPE, FuncName):
                                                                                                              continue
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 day to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1873..1884

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 139.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                  Open

                                                                                                      if NestPos != -1 and (NestPos + len('enum') < len(Fields)):
                                                                                                          if not Fields[NestPos + len('enum') + 1].isalnum():
                                                                                                              if not EccGlobalData.gException.IsException(ERROR_DECLARATION_DATA_TYPE_CHECK_NESTED_STRUCTURE, Name):
                                                                                                                  PrintErrorMsg(ERROR_DECLARATION_DATA_TYPE_CHECK_NESTED_STRUCTURE, 'Nested enum in [%s].' % (Name), FileTable, TdId)
                                                                                                              return ErrMsgList
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 2 other locations - About 6 hrs to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1562..1566
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1568..1572

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 105.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                  Open

                                                                                                      if NestPos != -1 and (NestPos + len('union') < len(Fields)):
                                                                                                          if not Fields[NestPos + len('union') + 1].isalnum():
                                                                                                              if not EccGlobalData.gException.IsException(ERROR_DECLARATION_DATA_TYPE_CHECK_NESTED_STRUCTURE, Name):
                                                                                                                  PrintErrorMsg(ERROR_DECLARATION_DATA_TYPE_CHECK_NESTED_STRUCTURE, 'Nested union in [%s].' % (Name), FileTable, TdId)
                                                                                                              return ErrMsgList
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 2 other locations - About 6 hrs to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1562..1566
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1574..1578

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 105.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                  Open

                                                                                                      if NestPos != -1 and (NestPos + len('struct') < len(Fields)):
                                                                                                          if not Fields[NestPos + len('struct') + 1].isalnum():
                                                                                                              if not EccGlobalData.gException.IsException(ERROR_DECLARATION_DATA_TYPE_CHECK_NESTED_STRUCTURE, Name):
                                                                                                                  PrintErrorMsg(ERROR_DECLARATION_DATA_TYPE_CHECK_NESTED_STRUCTURE, 'Nested struct in [%s].' % (Name), FileTable, TdId)
                                                                                                              return ErrMsgList
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 2 other locations - About 6 hrs to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1568..1572
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1574..1578

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 105.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          if ParamName == 'OPTIONAL':
                                                                                                              if ParamModifier == '':
                                                                                                                  ParamModifier += ' ' + 'OPTIONAL'
                                                                                                                  DeclText = ''
                                                                                                              else:
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 5 hrs to fix
                                                                                                  BaseTools/Source/Python/Eot/c.py on lines 271..280

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 90.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                  def PrintErrorMsg(ErrorType, Msg, TableName, ItemId):
                                                                                                      Msg = Msg.replace('\n', '').replace('\r', '')
                                                                                                      MsgPartList = Msg.split()
                                                                                                      Msg = ''
                                                                                                      for Part in MsgPartList:
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 4 hrs to fix
                                                                                                  BaseTools/Source/Python/Eot/c.py on lines 82..89

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 85.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                      for pp in FileProfile.PPDirectiveList:
                                                                                                          Type = GetIdType(pp.Content)
                                                                                                          IdPP = DataClass.IdentifierClass(-1, '', '', '', pp.Content, Type, -1, -1, pp.StartPos[0], pp.StartPos[1], pp.EndPos[0], pp.EndPos[1])
                                                                                                          IdList.append(IdPP)
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 4 hrs to fix
                                                                                                  BaseTools/Source/Python/Eot/c.py on lines 128..131

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 84.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                                  IdVar = DataClass.IdentifierClass(-1, var.Modifier, '', Name, (len(DeclList) > 1 and [DeclList[1]]or [''])[0], DataClass.MODEL_IDENTIFIER_VARIABLE, -1, -1, var.StartPos[0], var.StartPos[1], VarNameStartLine, VarNameStartColumn)
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 4 hrs to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 203..203

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 78.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                              IdVar = DataClass.IdentifierClass(-1, var.Modifier, '', Name, (len(DeclList) > 1 and [DeclList[1]]or [''])[0], DataClass.MODEL_IDENTIFIER_VARIABLE, -1, -1, var.StartPos[0], var.StartPos[1], VarNameStartLine, VarNameStartColumn)
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 4 hrs to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 194..194

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 78.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                      for funcCall in FileProfile.FunctionCallingList:
                                                                                                          IdFC = DataClass.IdentifierClass(-1, '', '', funcCall.FuncName, funcCall.ParamList, DataClass.MODEL_IDENTIFIER_FUNCTION_CALLING, -1, -1, funcCall.StartPos[0], funcCall.StartPos[1], funcCall.EndPos[0], funcCall.EndPos[1])
                                                                                                          IdList.append(IdFC)
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 4 hrs to fix
                                                                                                  BaseTools/Source/Python/Eot/c.py on lines 229..231

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 77.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          for Dir in dirnames:
                                                                                                              Dirname = os.path.join(dirpath, Dir)
                                                                                                              if os.path.islink(Dirname):
                                                                                                                  Dirname = os.path.realpath(Dirname)
                                                                                                                  if os.path.isdir(Dirname):
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 2 other locations - About 4 hrs to fix
                                                                                                  BaseTools/Source/Python/Ecc/Check.py on lines 78..85
                                                                                                  BaseTools/Source/Python/Ecc/Ecc.py on lines 172..179

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 75.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                      for comment in FileProfile.CommentList:
                                                                                                          IdComment = DataClass.IdentifierClass(-1, '', '', '', comment.Content, DataClass.MODEL_IDENTIFIER_COMMENT, -1, -1, comment.StartPos[0], comment.StartPos[1], comment.EndPos[0], comment.EndPos[1])
                                                                                                          IdList.append(IdComment)
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 4 hrs to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 104..106

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 75.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                      for pe in FileProfile.PredicateExpressionList:
                                                                                                          IdPE = DataClass.IdentifierClass(-1, '', '', '', pe.Content, DataClass.MODEL_IDENTIFIER_PREDICATE_EXPRESSION, -1, -1, pe.StartPos[0], pe.StartPos[1], pe.EndPos[0], pe.EndPos[1])
                                                                                                          IdList.append(IdPE)
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 4 hrs to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 95..97

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 75.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                              if not Pattern.match(Param.Name) and not Param.Name in ParamIgnoreList and not EccGlobalData.gException.IsException(ERROR_NAMING_CONVENTION_CHECK_VARIABLE_NAME, Param.Name):
                                                                                                                  PrintErrorMsg(ERROR_NAMING_CONVENTION_CHECK_VARIABLE_NAME, 'Parameter [%s] NOT follow naming convention.' % Param.Name, FileTable, Result[1])
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 3 hrs to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1390..1391

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 73.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                              if not Pattern.match(Param.Name) and not Param.Name in ParamIgnoreList and not EccGlobalData.gException.IsException(ERROR_NAMING_CONVENTION_CHECK_VARIABLE_NAME, Param.Name):
                                                                                                                  PrintErrorMsg(ERROR_NAMING_CONVENTION_CHECK_VARIABLE_NAME, 'Parameter [%s] NOT follow naming convention.' % Param.Name, FileTable, Result[1])
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 3 hrs to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1363..1364

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 73.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 4 locations. Consider refactoring.
                                                                                                  Open

                                                                                                                  if ArrayPattern.match(Name):
                                                                                                                      LSBPos = var.Declarator.find('[')
                                                                                                                      var.Modifier += ' ' + Name[LSBPos:]
                                                                                                                      Name = Name[0:LSBPos]
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 3 other locations - About 2 hrs to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 199..202
                                                                                                  BaseTools/Source/Python/Eot/c.py on lines 164..167
                                                                                                  BaseTools/Source/Python/Eot/c.py on lines 174..177

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 57.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 4 locations. Consider refactoring.
                                                                                                  Open

                                                                                                              if ArrayPattern.match(Name):
                                                                                                                  LSBPos = var.Declarator.find('[')
                                                                                                                  var.Modifier += ' ' + Name[LSBPos:]
                                                                                                                  Name = Name[0:LSBPos]
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 3 other locations - About 2 hrs to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 189..192
                                                                                                  BaseTools/Source/Python/Eot/c.py on lines 164..167
                                                                                                  BaseTools/Source/Python/Eot/c.py on lines 174..177

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 57.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          for Result in ResultSet:
                                                                                                              if not Result[0].startswith('/*') and not Result[0].startswith('//'):
                                                                                                                  PrintErrorMsg(ERROR_INCLUDE_FILE_CHECK_IFNDEF_STATEMENT_2, '', 'File', FileID)
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 2 hrs to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2186..2188

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 57.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                      for Result in ResultSet:
                                                                                                          if not Result[0].startswith('/*') and not Result[0].startswith('//'):
                                                                                                              PrintErrorMsg(ERROR_INCLUDE_FILE_CHECK_IFNDEF_STATEMENT_3, '', 'File', FileID)
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 2 hrs to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2176..2178

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 57.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          IdTd = DataClass.IdentifierClass(-1, Modifier, '', Name, Value, DataClass.MODEL_IDENTIFIER_TYPEDEF, -1, -1, td.StartPos[0], td.StartPos[1], td.EndPos[0], td.EndPos[1])
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 2 hrs to fix
                                                                                                  BaseTools/Source/Python/Eot/c.py on lines 226..226

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 56.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                      for Result in ResultSet:
                                                                                                          for Modifier in ModifierTuple:
                                                                                                              if PatternInModifier(Result[0], Modifier):
                                                                                                                  PrintErrorMsg(ERROR_DECLARATION_DATA_TYPE_CHECK_IN_OUT_MODIFIER, 'Return Type Modifier %s' % Result[0], FileTable, Result[2])
                                                                                                                  break
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 2 hrs to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1823..1827

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 56.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                      for Result in ResultSet:
                                                                                                          for Modifier in ModifierTuple:
                                                                                                              if PatternInModifier(Result[0], Modifier):
                                                                                                                  PrintErrorMsg(ERROR_DECLARATION_DATA_TYPE_CHECK_IN_OUT_MODIFIER, 'Return Type Modifier %s' % Result[0], FileTable, Result[2])
                                                                                                                  break
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 2 hrs to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1812..1816

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 56.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          if Value.startswith('enum'):
                                                                                                              ValueModelId = DataClass.MODEL_IDENTIFIER_ENUMERATE
                                                                                                          elif Value.startswith('struct'):
                                                                                                              ValueModelId = DataClass.MODEL_IDENTIFIER_STRUCTURE
                                                                                                          elif Value.startswith('union'):
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 2 hrs to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1698..1703

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 55.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          if Value.startswith('enum'):
                                                                                                              ValueModelId = DataClass.MODEL_IDENTIFIER_ENUMERATE
                                                                                                          elif Value.startswith('struct'):
                                                                                                              ValueModelId = DataClass.MODEL_IDENTIFIER_STRUCTURE
                                                                                                          elif Value.startswith('union'):
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 2 hrs to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1674..1679

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 55.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 4 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          for Result in ResultSet:
                                                                                                              Type = GetDataTypeFromModifier(Result[0]).split()[-1]
                                                                                                              TypedefDict = GetTypedefDict(FullFileName)
                                                                                                              Type = GetRealType(Type, TypedefDict, TargetType)
                                                                                                              return Type
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 3 other locations - About 2 hrs to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1098..1102
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1111..1115
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1129..1133

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 54.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 4 locations. Consider refactoring.
                                                                                                  Open

                                                                                                              for Result in ResultSet:
                                                                                                                  Type = GetDataTypeFromModifier(Result[0]).split()[-1]
                                                                                                                  TypedefDict = GetTypedefDict(FullFileName)
                                                                                                                  Type = GetRealType(Type, TypedefDict, TargetType)
                                                                                                                  return Type
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 3 other locations - About 2 hrs to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1079..1083
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1111..1115
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1129..1133

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 54.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 4 locations. Consider refactoring.
                                                                                                  Open

                                                                                                              for Result in ResultSet:
                                                                                                                  Type = GetDataTypeFromModifier(Result[0]).split()[-1]
                                                                                                                  TypedefDict = GetTypedefDict(FullFileName)
                                                                                                                  Type = GetRealType(Type, TypedefDict, TargetType)
                                                                                                                  return Type
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 3 other locations - About 2 hrs to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1079..1083
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1098..1102
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1111..1115

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 54.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 4 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          for Result in ResultSet:
                                                                                                              Type = GetDataTypeFromModifier(Result[0]).split()[-1]
                                                                                                              TypedefDict = GetTypedefDict(FullFileName)
                                                                                                              Type = GetRealType(Type, TypedefDict, TargetType)
                                                                                                              return Type
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 3 other locations - About 2 hrs to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1079..1083
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1098..1102
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1129..1133

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 54.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          IdPE = DataClass.IdentifierClass(-1, '', '', Name, Value, Type, -1, -1, su.StartPos[0], su.StartPos[1], su.EndPos[0], su.EndPos[1])
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 2 hrs to fix
                                                                                                  BaseTools/Source/Python/Eot/c.py on lines 203..203

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 54.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                  Open

                                                                                                      for Result in ResultSet:
                                                                                                          FL.append([Result[0], Result[1], Result[2], Result[3], Result[4]])
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 2 other locations - About 2 hrs to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1995..1996
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2074..2075

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 51.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                  Open

                                                                                                      for Result in ResultSet:
                                                                                                          FL.append([Result[0], Result[1], Result[2], Result[3], Result[4]])
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 2 other locations - About 2 hrs to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1916..1917
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2074..2075

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 51.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                  Open

                                                                                                      for Result in ResultSet:
                                                                                                          FL.append([Result[0], Result[1], Result[2], Result[3], Result[4]])
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 2 other locations - About 2 hrs to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1916..1917
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1995..1996

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 51.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          if FunctionHeaderComment:
                                                                                                              CheckFunctionHeaderConsistentWithDoxygenComment(Result[0], Result[1], Result[2], FunctionHeaderComment[0], FunctionHeaderComment[1], ErrorMsgList, FunctionHeaderComment[3], FileTable)
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 2 hrs to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2454..2455

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 50.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          if FunctionHeaderComment:
                                                                                                              CheckFunctionHeaderConsistentWithDoxygenComment(Result[0], Result[1], Result[2], FunctionHeaderComment[0], FunctionHeaderComment[1], ErrorMsgList, FunctionHeaderComment[3], FileTable)
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 2 hrs to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2424..2425

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 50.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                  Open

                                                                                                                  if p.match(TmpStr):
                                                                                                                      PredVarStr = PredVarStr[0:PredVarStr.find('(')]
                                                                                                                      SearchInCache = True
                                                                                                                      # Only direct function call using IsFuncCall branch. Multi-level ref. function call is considered a variable.
                                                                                                                      if TmpStr.startswith(PredVarStr):
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 2 other locations - About 1 hr to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1933..1938
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2091..2096

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 49.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                  Open

                                                                                                                  if p.match(TmpStr):
                                                                                                                      PredVarStr = PredVarStr[0:PredVarStr.find('(')]
                                                                                                                      SearchInCache = True
                                                                                                                      # Only direct function call using IsFuncCall branch. Multi-level ref. function call is considered a variable.
                                                                                                                      if TmpStr.startswith(PredVarStr):
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 2 other locations - About 1 hr to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1933..1938
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2012..2017

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 49.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                  Open

                                                                                                                  if p.match(TmpStr):
                                                                                                                      PredVarStr = PredVarStr[0:PredVarStr.find('(')]
                                                                                                                      SearchInCache = True
                                                                                                                      # Only direct function call using IsFuncCall branch. Multi-level ref. function call is considered a variable.
                                                                                                                      if TmpStr.startswith(PredVarStr):
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 2 other locations - About 1 hr to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2012..2017
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2091..2096

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 49.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          for Result in ResultSet:
                                                                                                              if len(Result[1]) > 0:
                                                                                                                  Dict[Result[0]] = Result[1]
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 hr to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 912..914

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 49.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                                  if Type.find('*') != -1 and Type != 'BOOLEAN*':
                                                                                                                      PrintErrorMsg(ERROR_PREDICATE_EXPRESSION_CHECK_COMPARISON_NULL_TYPE, 'Predicate Expression: %s' % Exp, FileTable, Str[2])
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 hr to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1950..1951

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 49.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                                          if Type.find('*') != -1 and Type != 'BOOLEAN*':
                                                                                                                              PrintErrorMsg(ERROR_PREDICATE_EXPRESSION_CHECK_COMPARISON_NULL_TYPE, 'Predicate Expression: %s' % Exp, FileTable, Str[2])
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 hr to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1963..1964

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 49.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                      for Result in ResultSet:
                                                                                                          if len(Result[1]) > 0:
                                                                                                              Dict[Result[0]] = Result[1]
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 hr to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 929..931

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 49.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                  Open

                                                                                                      try:
                                                                                                          test_file = sys.argv[1]
                                                                                                      except IndexError, v:
                                                                                                          print "Usage: %s filename" % sys.argv[0]
                                                                                                          sys.exit(1)
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 2 other locations - About 1 hr to fix
                                                                                                  BaseTools/Source/Python/Common/FdfParserLite.py on lines 3651..3655
                                                                                                  BaseTools/Source/Python/GenFds/FdfParser.py on lines 4445..4449

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 48.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          if (FuncModifier.find('VOID') != -1 or FuncModifier.find('void') != -1) and FuncModifier.find('*') == -1:
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 hr to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2594..2594

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 47.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          if ParamNumber == 0 and DoxygenTagNumber != 0 and ((FuncModifier.find('VOID') != -1 or FuncModifier.find('void') != -1) and FuncModifier.find('*') == -1):
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 hr to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2583..2583

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 47.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                              if p.match(TmpExp):
                                                                                                                  PredicateList.append(Exp)
                                                                                                              else:
                                                                                                                  PredicateList.append(Exp.rstrip(';').rstrip(')').strip())
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 hr to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 667..670

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 45.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          if p.match(TmpExp):
                                                                                                              PredicateList.append(Exp)
                                                                                                          else:
                                                                                                              PredicateList.append(Exp.rstrip(';').rstrip(')').strip())
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 hr to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 653..656

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 45.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          while i < len(ParamTagList):
                                                                                                              DoxygenStrList.append('@param' + ParamTagList[i])
                                                                                                              i += 1
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 2 other locations - About 1 hr to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2486..2488
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2497..2499

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 42.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          while i < len(ReturnTagList):
                                                                                                              DoxygenStrList.append('@return' + ReturnTagList[i])
                                                                                                              i += 1
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 2 other locations - About 1 hr to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2475..2477
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2486..2488

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 42.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          elif InComment and not DoubleSlashComment and ListFromStr[Index] == '*' and ListFromStr[Index + 1] == '/':
                                                                                                              ListFromStr[Index] = ' '
                                                                                                              Index += 1
                                                                                                              ListFromStr[Index] = ' '
                                                                                                              Index += 1
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 hr to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 967..972

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 42.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          while i < len(RetvalTagList):
                                                                                                              DoxygenStrList.append('@retval' + RetvalTagList[i])
                                                                                                              i += 1
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 2 other locations - About 1 hr to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2475..2477
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2497..2499

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 42.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          if (PES[i].isalnum() or PES[i] == '_' or PES[i] == '*') and LogicOpPos > PredicateBegin:
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 hr to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 661..661

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 41.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                              if PES[PredicateBegin].isalnum() or PES[PredicateBegin] == '_' or PES[PredicateBegin] == '*':
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 hr to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 646..646

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 41.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                      if not Str.startswith('/**'):
                                                                                                          ErrorMsgList.append('Line %d : Comment does NOT have prefix /** ' % StartLine)
                                                                                                          PrintErrorMsg(ERROR_DOXYGEN_CHECK_FUNCTION_HEADER, 'Comment does NOT have prefix /** ', TableName, CommentId)
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 hr to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2511..2513

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 39.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                      if not Str.endswith('**/'):
                                                                                                          ErrorMsgList.append('Line %d : Comment does NOT have tail **/ ' % StartLine)
                                                                                                          PrintErrorMsg(ERROR_DOXYGEN_CHECK_FUNCTION_HEADER, 'Comment does NOT have tail **/ ', TableName, CommentId)
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 hr to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2508..2510

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 39.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                                  if Type.find('BOOLEAN') == -1:
                                                                                                                      PrintErrorMsg(ERROR_PREDICATE_EXPRESSION_CHECK_NO_BOOLEAN_OPERATOR, 'Predicate Expression: %s' % Exp, FileTable, Str[2])
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 hr to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2030..2031

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 38.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                                          if Type.find('BOOLEAN') != -1:
                                                                                                                              PrintErrorMsg(ERROR_PREDICATE_EXPRESSION_CHECK_BOOLEAN_VALUE, 'Predicate Expression: %s' % Exp, FileTable, Str[2])
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 hr to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2121..2122

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 38.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                                  if Type.find('BOOLEAN') != -1:
                                                                                                                      PrintErrorMsg(ERROR_PREDICATE_EXPRESSION_CHECK_BOOLEAN_VALUE, 'Predicate Expression: %s' % Exp, FileTable, Str[2])
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 hr to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2109..2110

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 38.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                                          if Type.find('BOOLEAN') == -1:
                                                                                                                              PrintErrorMsg(ERROR_PREDICATE_EXPRESSION_CHECK_NO_BOOLEAN_OPERATOR, 'Predicate Expression: %s' % Exp, FileTable, Str[2])
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 1 hr to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2041..2042

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 38.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          while DeclText.startswith('*'):
                                                                                                              ParamModifier += ' ' + '*'
                                                                                                              DeclText = DeclText.lstrip('*').strip()
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 2 other locations - About 1 hr to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 238..255
                                                                                                  BaseTools/Source/Python/Eot/c.py on lines 281..283

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 38.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          if TdFuncPointerPattern.match(td.ToType):
                                                                                                              Modifier = td.FromType
                                                                                                              LBPos = td.ToType.find('(')
                                                                                                              TmpStr = td.ToType[LBPos + 1:].strip()
                                                                                                              StarPos = TmpStr.find('*')
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 2 other locations - About 1 hr to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 333..335
                                                                                                  BaseTools/Source/Python/Eot/c.py on lines 281..283

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 38.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                  Open

                                                                                                      for Result in ResultSet:
                                                                                                          PSL.append([Result[0], Result[1], Result[2]])
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 2 other locations - About 55 mins to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1986..1987
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2065..2066

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 37.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                  Open

                                                                                                      for Result in ResultSet:
                                                                                                          PSL.append([Result[0], Result[1], Result[2]])
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 2 other locations - About 55 mins to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1907..1908
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2065..2066

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 37.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                  Open

                                                                                                      for Result in ResultSet:
                                                                                                          PSL.append([Result[0], Result[1], Result[2]])
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 2 other locations - About 55 mins to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1907..1908
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1986..1987

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 37.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          if len(RetvalTagList) > 1:
                                                                                                              DoxygenStrList[-1] = '@retval' + ReturnTagList[0]
                                                                                                          elif len(ParamTagList) > 1:
                                                                                                              DoxygenStrList[-1] = '@param' + ReturnTagList[0]
                                                                                                  Severity: Minor
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 55 mins to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2483..2484

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 37.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          if len(ParamTagList) > 1:
                                                                                                              DoxygenStrList[-1] = '@param' + RetvalTagList[0]
                                                                                                  Severity: Minor
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 55 mins to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2492..2495

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 37.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          elif ListFromStr[Index] == '/' and ListFromStr[Index + 1] == '*':
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 2 other locations - About 50 mins to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 648..648
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 648..648

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 36.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          if (PES[i] == '&' and PES[i + 1] == '&') or (PES[i] == '|' and PES[i + 1] == '|'):
                                                                                                  Severity: Major
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 2 other locations - About 50 mins to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 648..648
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 967..967

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 36.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                      if len(ParseErrorFileList) > 0:
                                                                                                          EdkLogger.info("Found unrecoverable error during parsing:\n\t%s\n" % "\n\t".join(ParseErrorFileList))
                                                                                                  Severity: Minor
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 45 mins to fix
                                                                                                  BaseTools/Source/Python/Eot/c.py on lines 367..368

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 35.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          if CommentStrList and CommentStrList[-1].strip().endswith('**/'):
                                                                                                              NoHeaderCommentEndFlag = False
                                                                                                  Severity: Minor
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 30 mins to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2335..2336

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 32.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          if Result[0] != 0:
                                                                                                              PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_BODY, 'open brace should be at the very beginning of a line.', 'Function', Result[2])
                                                                                                  Severity: Minor
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 30 mins to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1513..1514

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 32.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                                  ErrorMsgList.append('Line %d : in Comment, <%s> does NOT end with new line ' % (CommentStartLine, Tag.replace('\n', '').replace('\r', '')))
                                                                                                  Severity: Minor
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 30 mins to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2544..2544

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 32.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                                  ErrorMsgList.append('Line %d : in Comment, <%s> does NOT contain doxygen contents ' % (CommentStartLine, Tag.replace('\n', '').replace('\r', '')))
                                                                                                  Severity: Minor
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 30 mins to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2540..2540

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 32.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          if Result[1] != 0:
                                                                                                              PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_BODY, 'close brace should be at the very beginning of a line.', 'Function', Result[2])
                                                                                                  Severity: Minor
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 30 mins to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 1511..1512

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 32.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                  Open

                                                                                                          if CommentStrList and CommentStrList[0].strip().startswith('/** @file'):
                                                                                                              NoHeaderCommentStartFlag = False
                                                                                                  Severity: Minor
                                                                                                  Found in BaseTools/Source/Python/Ecc/c.py and 1 other location - About 30 mins to fix
                                                                                                  BaseTools/Source/Python/Ecc/c.py on lines 2339..2340

                                                                                                  Duplicated Code

                                                                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                  Tuning

                                                                                                  This issue has a mass of 32.

                                                                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                  Refactorings

                                                                                                  Further Reading

                                                                                                  There are no issues that match your filters.

                                                                                                  Category
                                                                                                  Status