hackedteam/vector-edk

View on GitHub
BaseTools/Source/Python/Eot/Parser.py

Summary

Maintainability
F
1 wk
Test Coverage

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

def SearchPpiCallFunction(Identifier, SourceFileID, SourceFileFullPath, ItemMode):
    ItemName, ItemType, GuidName, GuidMacro, GuidValue = '', 'Ppi', '', '', ''
    SqlCommand = """select Value, Name, BelongsToFile, StartLine, EndLine from %s
                    where (Name like '%%%s%%' and Model = %s)""" \
                    % (Identifier, 'PeiServicesReInstallPpi', MODEL_IDENTIFIER_FUNCTION_CALLING)
Severity: Minor
Found in BaseTools/Source/Python/Eot/Parser.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

File Parser.py has 479 lines of code (exceeds 250 allowed). Consider refactoring.
Open

## @file
# This file is used to define common parsing related functions used in parsing
# Inf/Dsc/Makefile process
#
# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
Severity: Minor
Found in BaseTools/Source/Python/Eot/Parser.py - About 7 hrs to fix

    Function SearchPpi has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
    Open

    def SearchPpi(SqlCommand, Table, SourceFileID, SourceFileFullPath, ItemMode, PpiMode = 1):
        ItemName, ItemType, GuidName, GuidMacro, GuidValue = '', 'Ppi', '', '', ''
        BelongsToFunctionID, BelongsToFunction = -1, ''
        Db = EotGlobalData.gDb.TblReport
        RecordSet = Db.Exec(SqlCommand)
    Severity: Minor
    Found in BaseTools/Source/Python/Eot/Parser.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 SearchProtocols has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
    Open

    def SearchProtocols(SqlCommand, Table, SourceFileID, SourceFileFullPath, ItemMode, ProtocolMode):
        ItemName, ItemType, GuidName, GuidMacro, GuidValue = '', 'Protocol', '', '', ''
        BelongsToFunctionID, BelongsToFunction = -1, ''
        Db = EotGlobalData.gDb.TblReport
        RecordSet = Db.Exec(SqlCommand)
    Severity: Minor
    Found in BaseTools/Source/Python/Eot/Parser.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 SearchFunctionCalling has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
    Open

    def SearchFunctionCalling(Table, SourceFileID, SourceFileFullPath, ItemType, ItemMode):
        LibraryList = sdict()
        Db = EotGlobalData.gDb.TblReport
        Parameters, ItemName, GuidName, GuidMacro, GuidValue, BelongsToFunction = [], '', '', '', '', ''
        if ItemType == 'Protocol' and ItemMode == 'Produced':
    Severity: Minor
    Found in BaseTools/Source/Python/Eot/Parser.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 PreProcess has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
    Open

    def PreProcess(Filename, MergeMultipleLines = True, LineNo = -1):
        Lines = []
        Filename = os.path.normpath(Filename)
        if not os.path.isfile(Filename):
            EdkLogger.error("Eot", EdkLogger.FILE_NOT_FOUND, ExtraData=Filename)
    Severity: Minor
    Found in BaseTools/Source/Python/Eot/Parser.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 ParseMapFile has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
    Open

    def ParseMapFile(Files):
        AllMaps = {}
        CurrentModule = ''
        CurrentMaps = {}
        for File in Files:
    Severity: Minor
    Found in BaseTools/Source/Python/Eot/Parser.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 ParseConditionalStatement has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
    Open

    def ParseConditionalStatement(Line, Macros, StatusSet):
        NewLine = Line.upper()
        if NewLine.find(TAB_IF_EXIST.upper()) > -1:
            IfLine = Line[NewLine.find(TAB_IF_EXIST) + len(TAB_IF_EXIST) + 1:].strip()
            IfLine = ReplaceMacro(IfLine, EotGlobalData.gMACRO, True)
    Severity: Minor
    Found in BaseTools/Source/Python/Eot/Parser.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 GetAllIncludeFiles has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

    def GetAllIncludeFiles(Db):
        IncludeList = GetAllIncludeDirs(Db)
        IncludeFileList = []
    
        for Dir in IncludeList:
    Severity: Minor
    Found in BaseTools/Source/Python/Eot/Parser.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 SearchPpi has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def SearchPpi(SqlCommand, Table, SourceFileID, SourceFileFullPath, ItemMode, PpiMode = 1):
    Severity: Minor
    Found in BaseTools/Source/Python/Eot/Parser.py - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                          if len(NewVariableValueList) > 1:
                              NewVariableValue = NewVariableValueList[1].strip()
                              if NewVariableValue.startswith('&'):
                                  Db.Insert(-1, '', '', SourceFileID, SourceFileFullPath, ItemName, ItemType, ItemMode, NewVariableValue[1:], GuidMacro, GuidValue, BelongsToFunction, 0)
                                  continue
      Severity: Major
      Found in BaseTools/Source/Python/Eot/Parser.py - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                            if GuidName != '':
                                Db.Insert(-1, '', '', SourceFileID, SourceFileFullPath, ItemName, ItemType, ItemMode, GuidName, GuidMacro, GuidValue, BelongsToFunction, 0)
                                IsFound = True
                                break
        
        Severity: Major
        Found in BaseTools/Source/Python/Eot/Parser.py - About 45 mins to fix

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

          def SearchProtocols(SqlCommand, Table, SourceFileID, SourceFileFullPath, ItemMode, ProtocolMode):
          Severity: Minor
          Found in BaseTools/Source/Python/Eot/Parser.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                if NewVariableValue.startswith('&'):
                                    Db.Insert(-1, '', '', SourceFileID, SourceFileFullPath, ItemName, ItemType, ItemMode, NewVariableValue[1:], GuidMacro, GuidValue, BelongsToFunction, 0)
                                    continue
                                else:
                                    EotGlobalData.gOP_UN_MATCHED.write('%s, %s, %s, %s, %s, %s\n' % (ItemType, ItemMode, SourceFileID, SourceFileFullPath, StartLine, NewParameter))
            Severity: Major
            Found in BaseTools/Source/Python/Eot/Parser.py - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                  if Protocol != NewValue and NewValue.endswith('Guid'):
                                      GuidName = GetParameterName(NewValue)
                                      Db.Insert(-1, '', '', SourceFileID, SourceFileFullPath, ItemName, ItemType, ItemMode, GuidName, GuidMacro, GuidValue, BelongsToFunction, 0)
                                      IsFound = True
              
              Severity: Major
              Found in BaseTools/Source/Python/Eot/Parser.py - About 45 mins to fix

                Function ConvertGuid has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                def ConvertGuid(guid):
                    numList = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
                    newGuid = ''
                    if guid.startswith('g'):
                        guid = guid[1:]
                Severity: Minor
                Found in BaseTools/Source/Python/Eot/Parser.py - About 45 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

                Consider simplifying this complex logical expression.
                Open

                    if ItemType == 'Protocol' and ItemMode == 'Produced':
                        LibraryList = EotGlobalData.gProducedProtocolLibrary
                    elif ItemType == 'Protocol' and ItemMode == 'Consumed':
                        LibraryList = EotGlobalData.gConsumedProtocolLibrary
                    elif ItemType == 'Protocol' and ItemMode == 'Callback':
                Severity: Major
                Found in BaseTools/Source/Python/Eot/Parser.py - About 40 mins to fix

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

                  def SearchFunctionCalling(Table, SourceFileID, SourceFileFullPath, ItemType, ItemMode):
                  Severity: Minor
                  Found in BaseTools/Source/Python/Eot/Parser.py - About 35 mins to fix

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

                    def GetAllFiles(Db):
                        FileList = []
                        IncludeFileList = GetAllIncludeFiles(Db)
                        SourceFileList = GetAllSourceFiles(Db)
                        for Item in IncludeFileList:
                    Severity: Minor
                    Found in BaseTools/Source/Python/Eot/Parser.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 True
                    Severity: Major
                    Found in BaseTools/Source/Python/Eot/Parser.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                              return True
                      Severity: Major
                      Found in BaseTools/Source/Python/Eot/Parser.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                return True
                        Severity: Major
                        Found in BaseTools/Source/Python/Eot/Parser.py - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                              return False
                          Severity: Major
                          Found in BaseTools/Source/Python/Eot/Parser.py - About 30 mins to fix

                            Function FindKeyValue has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                            def FindKeyValue(Db, Table, Key):
                                SqlCommand = """select Value from %s where Name = '%s' and (Model = %s or Model = %s)""" % (Table, Key, MODEL_IDENTIFIER_VARIABLE, MODEL_IDENTIFIER_ASSIGNMENT_EXPRESSION)
                                RecordSet = Db.Exec(SqlCommand)
                                Value = ''
                                for Record in RecordSet:
                            Severity: Minor
                            Found in BaseTools/Source/Python/Eot/Parser.py - About 25 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 GetIncludeListOfFile has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                            def GetIncludeListOfFile(WorkSpace, Filepath, Db):
                                IncludeList = []
                                Filepath = os.path.normpath(Filepath)
                                SqlCommand = """
                                            select Value1 from Inf where Model = %s and BelongsToFile in(
                            Severity: Minor
                            Found in BaseTools/Source/Python/Eot/Parser.py - About 25 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

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

                                            if len(NewVariableValueList) > 1:
                                                NewVariableValue = NewVariableValueList[1].strip()
                                                if NewVariableValue.startswith('&'):
                                                    Db.Insert(-1, '', '', SourceFileID, SourceFileFullPath, ItemName, ItemType, ItemMode, NewVariableValue[1:], GuidMacro, GuidValue, BelongsToFunction, 0)
                                                    continue
                            Severity: Major
                            Found in BaseTools/Source/Python/Eot/Parser.py and 1 other location - About 5 hrs to fix
                            BaseTools/Source/Python/Eot/Parser.py on lines 413..419

                            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 92.

                            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(NewVariableValueList) > 1:
                                                    NewVariableValue = NewVariableValueList[1].strip()
                                                    if NewVariableValue.startswith('&'):
                                                        Db.Insert(-1, '', '', SourceFileID, SourceFileFullPath, ItemName, ItemType, ItemMode, NewVariableValue[1:], GuidMacro, GuidValue, BelongsToFunction, 0)
                                                        continue
                            Severity: Major
                            Found in BaseTools/Source/Python/Eot/Parser.py and 1 other location - About 5 hrs to fix
                            BaseTools/Source/Python/Eot/Parser.py on lines 459..465

                            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 92.

                            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 Parameter.startswith('g') or Parameter.endswith('Guid') or Parameter == 'ShellEnvProtocol' or Parameter == 'ShellInterfaceProtocol':
                                            GuidName = GetParameterName(Parameter)
                                            Db.Insert(-1, '', '', SourceFileID, SourceFileFullPath, ItemName, ItemType, ItemMode, GuidName, GuidMacro, GuidValue, BelongsToFunction, 0)
                                            IsFound = True
                            Severity: Major
                            Found in BaseTools/Source/Python/Eot/Parser.py and 1 other location - About 3 hrs to fix
                            BaseTools/Source/Python/Eot/Parser.py on lines 654..658

                            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 70.

                            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 Parameter in Parameters:
                                            if Parameter.startswith('g') or Parameter.endswith('Guid') or Parameter == 'ShellEnvProtocol' or Parameter == 'ShellInterfaceProtocol':
                                                GuidName = GetParameterName(Parameter)
                                                Db.Insert(-1, '', '', SourceFileID, SourceFileFullPath, ItemName, ItemType, ItemMode, GuidName, GuidMacro, GuidValue, BelongsToFunction, 0)
                                                IsFound = True
                            Severity: Major
                            Found in BaseTools/Source/Python/Eot/Parser.py and 1 other location - About 3 hrs to fix
                            BaseTools/Source/Python/Eot/Parser.py on lines 587..590

                            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 70.

                            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 Variable.find('[') > -1:
                                            Index = int(Variable[Variable.find('[') + 1 : Variable.find(']')])
                                            Variable = Variable[:Variable.find('[')]
                            Severity: Major
                            Found in BaseTools/Source/Python/Eot/Parser.py and 1 other location - About 3 hrs to fix
                            BaseTools/Source/Python/Eot/Parser.py on lines 444..446

                            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 68.

                            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 Variable.find('[') > -1:
                                        Index = int(Variable[Variable.find('[') + 1 : Variable.find(']')])
                                        Variable = Variable[:Variable.find('[')]
                            Severity: Major
                            Found in BaseTools/Source/Python/Eot/Parser.py and 1 other location - About 3 hrs to fix
                            BaseTools/Source/Python/Eot/Parser.py on lines 397..399

                            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 68.

                            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

                            def GetAllSourceFiles(Db):
                                SourceFileList = []
                                SqlCommand = """select distinct Value1 from Inf where Model = %s order by Value1""" % MODEL_EFI_SOURCE_FILE
                                RecordSet = Db.TblInf.Exec(SqlCommand)
                            
                            Severity: Major
                            Found in BaseTools/Source/Python/Eot/Parser.py and 1 other location - About 2 hrs to fix
                            BaseTools/Source/Python/Eot/Parser.py on lines 189..197

                            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 59.

                            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

                            def GetAllIncludeDirs(Db):
                                IncludeList = []
                                SqlCommand = """select distinct Value1 from Inf where Model = %s order by Value1""" % MODEL_EFI_INCLUDE
                                RecordSet = Db.TblInf.Exec(SqlCommand)
                            
                            Severity: Major
                            Found in BaseTools/Source/Python/Eot/Parser.py and 1 other location - About 2 hrs to fix
                            BaseTools/Source/Python/Eot/Parser.py on lines 228..236

                            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 59.

                            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 NewRecord in NewRecordSet:
                                        IncludePath = os.path.normpath(os.path.join(DecPath, NewRecord[0]))
                                        if IncludePath not in IncludeList:
                                            IncludeList.append(IncludePath)
                            Severity: Major
                            Found in BaseTools/Source/Python/Eot/Parser.py and 1 other location - About 2 hrs to fix
                            BaseTools/Source/Python/Ecc/MetaDataParser.py on lines 46..49

                            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 53.

                            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 Line.find(TAB_COMMENT_EDK_END) > -1:
                                        Line = ReservedLine + GetSplitList(Line, TAB_COMMENT_EDK_END, 1)[1]
                                        ReservedLine = ''
                                        IsFindBlockComment = False
                            Severity: Major
                            Found in BaseTools/Source/Python/Eot/Parser.py and 3 other locations - About 1 hr to fix
                            BaseTools/Source/Python/Common/DecClassObject.py on lines 168..171
                            BaseTools/Source/Python/Common/DscClassObject.py on lines 1051..1054
                            BaseTools/Source/Python/Common/InfClassObject.py on lines 358..361

                            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

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

                                        if len(List) > 1:
                                            GuidName = GetParameterName(List[1])
                                            Db.Insert(-1, '', '', SourceFileID, SourceFileFullPath, ItemName, ItemType, ItemMode, GuidName, GuidMacro, GuidValue, BelongsToFunction, 0)
                                            IsFound = True
                            Severity: Major
                            Found in BaseTools/Source/Python/Eot/Parser.py and 1 other location - About 1 hr to fix
                            BaseTools/Source/Python/Eot/Parser.py on lines 504..507

                            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

                                    for NewRecord in NewRecordSet:
                                        GuidName = GetParameterName(NewRecord[0])
                                        Db.Insert(-1, '', '', SourceFileID, SourceFileFullPath, ItemName, ItemType, ItemMode, GuidName, GuidMacro, GuidValue, BelongsToFunction, 0)
                                        IsFound = True
                            Severity: Major
                            Found in BaseTools/Source/Python/Eot/Parser.py and 1 other location - About 1 hr to fix
                            BaseTools/Source/Python/Eot/Parser.py on lines 516..519

                            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

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

                                    if Line.find(TAB_COMMENT_EDK_START) > -1:
                                        ReservedLine = GetSplitList(Line, TAB_COMMENT_EDK_START, 1)[0]
                                        IsFindBlockComment = True
                            Severity: Major
                            Found in BaseTools/Source/Python/Eot/Parser.py and 3 other locations - About 1 hr to fix
                            BaseTools/Source/Python/Common/DecClassObject.py on lines 165..167
                            BaseTools/Source/Python/Common/DscClassObject.py on lines 1048..1050
                            BaseTools/Source/Python/Common/InfClassObject.py on lines 355..357

                            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 2 locations. Consider refactoring.
                            Open

                                for Item in IncludeFileList:
                                    if os.path.isfile(Item) and Item not in FileList:
                                        FileList.append(Item)
                            Severity: Major
                            Found in BaseTools/Source/Python/Eot/Parser.py and 1 other location - About 1 hr to fix
                            BaseTools/Source/Python/Eot/Parser.py on lines 253..255

                            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 2 locations. Consider refactoring.
                            Open

                                for Item in SourceFileList:
                                    if os.path.isfile(Item) and Item not in FileList:
                                        FileList.append(Item)
                            Severity: Major
                            Found in BaseTools/Source/Python/Eot/Parser.py and 1 other location - About 1 hr to fix
                            BaseTools/Source/Python/Eot/Parser.py on lines 250..252

                            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 5 locations. Consider refactoring.
                            Open

                                    IfLine = Line[NewLine.find(TAB_IF_DEF) + len(TAB_IF_DEF) + 1:].strip()
                            Severity: Major
                            Found in BaseTools/Source/Python/Eot/Parser.py and 4 other locations - About 55 mins to fix
                            BaseTools/Source/Python/Eot/Parser.py on lines 273..273
                            BaseTools/Source/Python/Eot/Parser.py on lines 290..290
                            BaseTools/Source/Python/Eot/Parser.py on lines 297..297
                            BaseTools/Source/Python/Eot/Parser.py on lines 302..302

                            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 5 locations. Consider refactoring.
                            Open

                                    IfLine = Line[NewLine.find(TAB_IF_N_DEF) + len(TAB_IF_N_DEF) + 1:].strip()
                            Severity: Major
                            Found in BaseTools/Source/Python/Eot/Parser.py and 4 other locations - About 55 mins to fix
                            BaseTools/Source/Python/Eot/Parser.py on lines 273..273
                            BaseTools/Source/Python/Eot/Parser.py on lines 283..283
                            BaseTools/Source/Python/Eot/Parser.py on lines 297..297
                            BaseTools/Source/Python/Eot/Parser.py on lines 302..302

                            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 5 locations. Consider refactoring.
                            Open

                                    IfLine = Line[NewLine.find(TAB_IF_EXIST) + len(TAB_IF_EXIST) + 1:].strip()
                            Severity: Major
                            Found in BaseTools/Source/Python/Eot/Parser.py and 4 other locations - About 55 mins to fix
                            BaseTools/Source/Python/Eot/Parser.py on lines 283..283
                            BaseTools/Source/Python/Eot/Parser.py on lines 290..290
                            BaseTools/Source/Python/Eot/Parser.py on lines 297..297
                            BaseTools/Source/Python/Eot/Parser.py on lines 302..302

                            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 5 locations. Consider refactoring.
                            Open

                                    IfLine = Line[NewLine.find(TAB_IF) + len(TAB_IF) + 1:].strip()
                            Severity: Major
                            Found in BaseTools/Source/Python/Eot/Parser.py and 4 other locations - About 55 mins to fix
                            BaseTools/Source/Python/Eot/Parser.py on lines 273..273
                            BaseTools/Source/Python/Eot/Parser.py on lines 283..283
                            BaseTools/Source/Python/Eot/Parser.py on lines 290..290
                            BaseTools/Source/Python/Eot/Parser.py on lines 302..302

                            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 5 locations. Consider refactoring.
                            Open

                                    IfLine = Line[NewLine.find(TAB_ELSE_IF) + len(TAB_ELSE_IF) + 1:].strip()
                            Severity: Major
                            Found in BaseTools/Source/Python/Eot/Parser.py and 4 other locations - About 55 mins to fix
                            BaseTools/Source/Python/Eot/Parser.py on lines 273..273
                            BaseTools/Source/Python/Eot/Parser.py on lines 283..283
                            BaseTools/Source/Python/Eot/Parser.py on lines 290..290
                            BaseTools/Source/Python/Eot/Parser.py on lines 297..297

                            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 2 locations. Consider refactoring.
                            Open

                                    if not IsFound:
                                        EotGlobalData.gOP_UN_MATCHED.write('%s, %s, %s, %s, %s, %s\n' % (ItemType, ItemMode, SourceFileID, SourceFileFullPath, StartLine, Parameter))
                            Severity: Minor
                            Found in BaseTools/Source/Python/Eot/Parser.py and 1 other location - About 30 mins to fix
                            BaseTools/Source/Python/Eot/Parser.py on lines 660..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 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

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

                                        if not IsFound:
                                            EotGlobalData.gOP_UN_MATCHED.write('%s, %s, %s, %s, %s, %s\n' % (ItemType, ItemMode, SourceFileID, SourceFileFullPath, StartLine, Parameter))
                            Severity: Minor
                            Found in BaseTools/Source/Python/Eot/Parser.py and 1 other location - About 30 mins to fix
                            BaseTools/Source/Python/Eot/Parser.py on lines 556..557

                            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