hackedteam/vector-edk

View on GitHub
BaseTools/Source/Python/Common/DscClassObject.py

Summary

Maintainability
F
3 wks
Test Coverage

File DscClassObject.py has 793 lines of code (exceeds 250 allowed). Consider refactoring.
Open

## @file
# This file is used to define each component of DSC file
#
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
Severity: Major
Found in BaseTools/Source/Python/Common/DscClassObject.py - About 1 day to fix

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

        def InsertSectionItemsIntoDatabase(self, FileID, Filename, CurrentSection, SectionItemList, ArchList, ThirdList, IfDefList):
            #
            # Insert each item data of a section
            #
            for Index in range(0, len(ArchList)):
    Severity: Minor
    Found in BaseTools/Source/Python/Common/DscClassObject.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 GenComponents has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
    Open

        def GenComponents(self, ContainerFile):
            EdkLogger.debug(2, "Generate %s ..." % TAB_COMPONENTS)
            Components = sdict()
            #
            # Get all include files
    Severity: Minor
    Found in BaseTools/Source/Python/Common/DscClassObject.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 LoadDscFile has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
    Open

        def LoadDscFile(self, Filename):
            #
            # Insert a record for file
            #
            Filename = NormPath(Filename)
    Severity: Minor
    Found in BaseTools/Source/Python/Common/DscClassObject.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 GenSkuInfos has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
    Open

        def GenSkuInfos(self, ContainerFile):
            EdkLogger.debug(2, "Generate %s ..." % TAB_SKUIDS)
            #
            # SkuIds
            # <Integer>|<UiName>
    Severity: Minor
    Found in BaseTools/Source/Python/Common/DscClassObject.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 GenLibraries has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
    Open

        def GenLibraries(self, ContainerFile):
            EdkLogger.debug(2, "Generate %s ..." % TAB_LIBRARIES)
            Libraries = {}
            #
            # Get all include files
    Severity: Minor
    Found in BaseTools/Source/Python/Common/DscClassObject.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 GenBuildOptions has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
    Open

        def GenBuildOptions(self, ContainerFile):
            EdkLogger.debug(2, "Generate %s ..." % TAB_BUILD_OPTIONS)
            BuildOptions = {}
            #
            # Get all include files
    Severity: Minor
    Found in BaseTools/Source/Python/Common/DscClassObject.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 GenDynamicHiiPcds has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
    Open

        def GenDynamicHiiPcds(self, Type='', ContainerFile=''):
            Pcds = {}
            SkuInfoList = {}
            if Type == DataType.TAB_PCDS_DYNAMIC_HII:
                Model = MODEL_PCD_DYNAMIC_HII
    Severity: Minor
    Found in BaseTools/Source/Python/Common/DscClassObject.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 GenDynamicVpdPcds has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
    Open

        def GenDynamicVpdPcds(self, Type='', ContainerFile=''):
            Pcds = {}
            SkuInfoList = {}
            if Type == DataType.TAB_PCDS_DYNAMIC_VPD:
                Model = MODEL_PCD_DYNAMIC_VPD
    Severity: Minor
    Found in BaseTools/Source/Python/Common/DscClassObject.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 GenDynamicDefaultPcds has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
    Open

        def GenDynamicDefaultPcds(self, Type='', ContainerFile=''):
            Pcds = {}
            SkuInfoList = {}
            if Type == DataType.TAB_PCDS_DYNAMIC_DEFAULT:
                Model = MODEL_PCD_DYNAMIC_DEFAULT
    Severity: Minor
    Found in BaseTools/Source/Python/Common/DscClassObject.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 GenLibraryClasses has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
    Open

        def GenLibraryClasses(self, ContainerFile):
            EdkLogger.debug(2, "Generate %s ..." % TAB_LIBRARY_CLASSES)
            LibraryClasses = {}
            #
            # Get all include files
    Severity: Minor
    Found in BaseTools/Source/Python/Common/DscClassObject.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 GenComponent has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
    Open

        def GenComponent(self, Item, ContainerFile, LineNo= -1):
            (InfFilename, ExecFilename) = GetExec(Item[0])
            LibraryClasses = Item[1]
            BuildOptions = Item[2]
            Pcds = Item[3]
    Severity: Minor
    Found in BaseTools/Source/Python/Common/DscClassObject.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 GenPcds has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
    Open

        def GenPcds(self, Type='', ContainerFile=''):
            Pcds = {}
            if Type == DataType.TAB_PCDS_PATCHABLE_IN_MODULE:
                Model = MODEL_PCD_PATCHABLE_IN_MODULE
            elif Type == DataType.TAB_PCDS_FIXED_AT_BUILD:
    Severity: Minor
    Found in BaseTools/Source/Python/Common/DscClassObject.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 GenFeatureFlagPcds has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
    Open

        def GenFeatureFlagPcds(self, Type='', ContainerFile=''):
            Pcds = {}
            if Type == DataType.TAB_PCDS_FEATURE_FLAG:
                Model = MODEL_PCD_FEATURE_FLAG
            else:
    Severity: Minor
    Found in BaseTools/Source/Python/Common/DscClassObject.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

    Dsc has 25 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Dsc(DscObject):
        _NullClassIndex = 0
    
        def __init__(self, Filename=None, IsToDatabase=False, IsToPlatform=False, WorkspaceDir=None, Database=None):
            self.Identification = Identification()
    Severity: Minor
    Found in BaseTools/Source/Python/Common/DscClassObject.py - About 2 hrs to fix

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

          def ShowPlatform(self):
              M = self.Platform
              for Arch in M.Header.keys():
                  print '\nArch =', Arch
                  print 'Filename =', M.Header[Arch].FileName
      Severity: Minor
      Found in BaseTools/Source/Python/Common/DscClassObject.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 InsertConditionalStatement has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

          def InsertConditionalStatement(self, Filename, FileID, BelongsToItem, IfDefList, EndLine, ArchList):
              (Value1, Value2, Value3, Model, StartColumn, EndColumn, Enabled) = ('', '', '', -1, -1, -1, 0)
              if IfDefList == []:
                  ErrorMsg = 'Not suited conditional statement in file %s' % Filename
                  EdkLogger.error("DSC File Parser", PARSER_ERROR, ErrorMsg, Filename, RaiseError=EdkLogger.IsRaiseError)
      Severity: Minor
      Found in BaseTools/Source/Python/Common/DscClassObject.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 ParseConditionalStatement has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          def ParseConditionalStatement(self):
              #
              # Disabled all !if/!elif/!ifdef statements without DEFINE
              #
              SqlCommand = """select A.StartLine, A.EndLine from %s as A
      Severity: Minor
      Found in BaseTools/Source/Python/Common/DscClassObject.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 ParseDefine has 8 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def ParseDefine(self, LineValue, StartLine, Table, FileID, Filename, SectionName, Model, Arch):
      Severity: Major
      Found in BaseTools/Source/Python/Common/DscClassObject.py - About 1 hr to fix

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

            def GenSkuInfoList(self, SkuNameList, SkuInfo, VariableName='', VariableGuid='', VariableOffset='', HiiDefaultValue='', VpdOffset='', DefaultValue=''):
        Severity: Major
        Found in BaseTools/Source/Python/Common/DscClassObject.py - About 1 hr to fix

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

              def ParseDefinesSection(self, LineValue, StartLine, Table, FileID, Filename, SectionName, Model, Arch):
          Severity: Major
          Found in BaseTools/Source/Python/Common/DscClassObject.py - About 1 hr to fix

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

                def ParseInclude(self, LineValue, StartLine, Table, FileID, Filename, SectionName, Model, Arch):
            Severity: Major
            Found in BaseTools/Source/Python/Common/DscClassObject.py - About 1 hr to fix

              Function InsertSectionItemsIntoDatabase has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def InsertSectionItemsIntoDatabase(self, FileID, Filename, CurrentSection, SectionItemList, ArchList, ThirdList, IfDefList):
              Severity: Major
              Found in BaseTools/Source/Python/Common/DscClassObject.py - About 50 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        if len(List) == 2:
                                            LibName = List[0]
                                            LibIns = List[1]
                                        else:
                                            LibName = List[0]
                Severity: Major
                Found in BaseTools/Source/Python/Common/DscClassObject.py - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                          if CleanString(NewItem) == '':
                                              continue
                                          (TokenName, TokenGuidCName, Value, Type) = GetFeatureFlagPcd(NewItem, Type, Filename, -1)
                  Severity: Major
                  Found in BaseTools/Source/Python/Common/DscClassObject.py - About 45 mins to fix

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

                        def InsertConditionalStatement(self, Filename, FileID, BelongsToItem, IfDefList, EndLine, ArchList):
                    Severity: Minor
                    Found in BaseTools/Source/Python/Common/DscClassObject.py - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                              if ItemList[1] != '' and ItemList[1].upper() not in ARCH_LIST_FULL:
                                                  EdkLogger.error("Parser", PARSER_ERROR, "Invalid Arch definition '%s' found" % ItemList[1], File=Filename, Line=LineNo, RaiseError=EdkLogger.IsRaiseError)
                                              ArchList.append(ItemList[1].upper())
                      Severity: Major
                      Found in BaseTools/Source/Python/Common/DscClassObject.py - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                if CleanString(NewItem) == '':
                                                    continue
                                                List = GetSplitValueList(NewItem)
                        Severity: Major
                        Found in BaseTools/Source/Python/Common/DscClassObject.py - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                  if CleanString(NewItem) == '':
                                                      continue
                                                  (K1, K2, K3, K4, K5, K6, K7, K8) = GetDynamicHiiPcd(NewItem, Type, Filename, -1)
                          Severity: Major
                          Found in BaseTools/Source/Python/Common/DscClassObject.py - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                    for NewComponent in NewItems:
                                                        MergeArches(Components, self.GenComponent(NewComponent, Filename), Arch)
                            
                            Severity: Major
                            Found in BaseTools/Source/Python/Common/DscClassObject.py - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                      if CurrentSection != ItemList[0]:
                                                          EdkLogger.error("Parser", PARSER_ERROR, "Different section names '%s' and '%s' are found in one section definition, this is not allowed." % (CurrentSection, ItemList[0]), File=Filename, Line=LineNo, RaiseError=EdkLogger.IsRaiseError)
                                                  if CurrentSection.upper() not in self.KeyList:
                              Severity: Major
                              Found in BaseTools/Source/Python/Common/DscClassObject.py - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                        if CleanString(NewItem) == '':
                                                            continue
                                                        NewItems = []
                                Severity: Major
                                Found in BaseTools/Source/Python/Common/DscClassObject.py - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                          if len(List) != 2:
                                                              RaiseParserError(NewItem, TAB_SKUIDS, Filename, '<Integer>|<UiName>')
                                                          else:
                                                              self.Platform.SkuInfos.SkuInfoList[List[1]] = List[0]
                                  
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Common/DscClassObject.py - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                            if CleanString(NewItem) == '':
                                                                continue
                                                            (K1, K2, K3, K4, K5) = GetDynamicVpdPcd(NewItem, Type, Filename, -1)
                                    Severity: Major
                                    Found in BaseTools/Source/Python/Common/DscClassObject.py - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                              if CleanString(NewItem) == '':
                                                                  continue
                                                              (K1, K2, K3, K4, K5, K6) = GetDynamicDefaultPcd(NewItem, Type, Filename, -1)
                                      Severity: Major
                                      Found in BaseTools/Source/Python/Common/DscClassObject.py - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                if CleanString(NewItem) == '':
                                                                    continue
                                                                (Family, ToolChain, Flag) = GetBuildOption(NewItem, Filename, -1)
                                        Severity: Major
                                        Found in BaseTools/Source/Python/Common/DscClassObject.py - About 45 mins to fix

                                          Avoid deeply nested control flow statements.
                                          Open

                                                                  for NewItem in open(Filename, 'r').readlines():
                                                                      if CleanString(NewItem) == '':
                                                                          continue
                                                                      MergeArches(Libraries, NewItem, Arch)
                                          
                                          Severity: Major
                                          Found in BaseTools/Source/Python/Common/DscClassObject.py - About 45 mins to fix

                                            Avoid deeply nested control flow statements.
                                            Open

                                                                    if CleanString(NewItem) == '':
                                                                        continue
                                                                    MergeArches(LibraryClasses, GetLibraryClass([NewItem, IncludeFile[4]], Filename, self.WorkspaceDir, -1), Arch)
                                            Severity: Major
                                            Found in BaseTools/Source/Python/Common/DscClassObject.py - About 45 mins to fix

                                              Avoid deeply nested control flow statements.
                                              Open

                                                                      if CleanString(NewItem) == '':
                                                                          continue
                                                                      (TokenName, TokenGuidCName, Value, DatumType, MaxDatumSize, Type) = GetPcd(NewItem, Type, Filename, -1)
                                              Severity: Major
                                              Found in BaseTools/Source/Python/Common/DscClassObject.py - About 45 mins to fix

                                                Avoid deeply nested control flow statements.
                                                Open

                                                                        if self.IsToDatabase:
                                                                            SqlCommand = """update %s set Value1 = '%s', Value2 = '%s'
                                                                                            where ID = %s""" % (self.TblDsc.Table, ConvertToSqlString2(List[0]), ConvertToSqlString2(List[1]), Record[3])
                                                                            self.TblDsc.Exec(SqlCommand)
                                                
                                                Severity: Major
                                                Found in BaseTools/Source/Python/Common/DscClassObject.py - About 45 mins to fix

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

                                                      def __init__(self, Filename=None, IsToDatabase=False, IsToPlatform=False, WorkspaceDir=None, Database=None):
                                                  Severity: Minor
                                                  Found in BaseTools/Source/Python/Common/DscClassObject.py - About 35 mins to fix

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

                                                                    for Item in LineList:
                                                                        ItemList = GetSplitValueList(Item, TAB_SPLIT)
                                                                        if CurrentSection == '':
                                                                            CurrentSection = ItemList[0]
                                                                        else:
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 1 other location - About 2 days to fix
                                                    BaseTools/Source/Python/Common/InfClassObject.py on lines 394..413

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

                                                    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 __name__ == '__main__':
                                                        EdkLogger.Initialize()
                                                        EdkLogger.SetLevel(EdkLogger.DEBUG_0)
                                                    
                                                        W = os.getenv('WORKSPACE')
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 2 other locations - About 6 hrs to fix
                                                    BaseTools/Source/Python/Common/DecClassObject.py on lines 550..563
                                                    BaseTools/Source/Python/Common/InfClassObject.py on lines 1102..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 106.

                                                    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

                                                            Define = GetSplitValueList(CleanString(LineValue[LineValue.upper().find(DataType.TAB_DEFINE.upper() + ' ') + len(DataType.TAB_DEFINE + ' ') : ]), TAB_EQUAL_SPLIT, 1)
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 1 other location - About 2 hrs to fix
                                                    BaseTools/Source/Python/Common/Parsing.py on lines 797..797

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

                                                    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

                                                            IncludeFile = CleanString(LineValue[LineValue.upper().find(DataType.TAB_INCLUDE.upper() + ' ') + len(DataType.TAB_INCLUDE + ' ') : ])
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 1 other location - About 2 hrs to fix
                                                    BaseTools/Source/Python/Common/String.py on lines 145..145

                                                    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

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

                                                                    if LineValue.upper().find(TAB_IF_DEF.upper()) > -1:
                                                                        IfDefList.append((LineValue[len(TAB_IF_N_DEF):].strip(), StartLine, MODEL_META_DATA_CONDITIONAL_STATEMENT_IFDEF))
                                                                        continue
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 2 other locations - About 2 hrs to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 1273..1275
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 1286..1288

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

                                                    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 LineValue.upper().find(TAB_IF.upper()) > -1:
                                                                        IfDefList.append((LineValue[len(TAB_IF):].strip(), StartLine, MODEL_META_DATA_CONDITIONAL_STATEMENT_IF))
                                                                        continue
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 2 other locations - About 2 hrs to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 1266..1268
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 1273..1275

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

                                                    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 LineValue.upper().find(TAB_IF_N_DEF.upper()) > -1:
                                                                        IfDefList.append((LineValue[len(TAB_IF_N_DEF):].strip(), StartLine, MODEL_META_DATA_CONDITIONAL_STATEMENT_IFNDEF))
                                                                        continue
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 2 other locations - About 2 hrs to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 1266..1268
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 1286..1288

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

                                                    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 LineValue.upper().find(DataType.TAB_INCLUDE.upper() + ' ') > -1:
                                                                        self.ParseInclude(LineValue, StartLine, self.TblDsc, FileID, Filename, CurrentSection, MODEL_META_DATA_INCLUDE, Arch)
                                                                        continue
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 1 other location - About 2 hrs to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 1317..1319

                                                    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

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

                                                                    if LineValue.upper().find(DataType.TAB_DEFINE.upper() + ' ') > -1:
                                                                        self.ParseDefine(LineValue, StartLine, self.TblDsc, FileID, Filename, CurrentSection, MODEL_META_DATA_DEFINE, Arch)
                                                                        continue
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 1 other location - About 2 hrs to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 1310..1312

                                                    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 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/Common/DscClassObject.py and 3 other locations - About 1 hr to fix
                                                    BaseTools/Source/Python/Common/DecClassObject.py on lines 168..171
                                                    BaseTools/Source/Python/Common/InfClassObject.py on lines 358..361
                                                    BaseTools/Source/Python/Eot/Parser.py on lines 56..59

                                                    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 CurrentSection == TAB_UNKNOWN:
                                                                    ErrorMsg = "%s is not in any defined section" % Line
                                                                    EdkLogger.error("Parser", PARSER_ERROR, ErrorMsg, File=Filename, Line=LineNo, RaiseError=EdkLogger.IsRaiseError)
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 2 other locations - About 1 hr to fix
                                                    BaseTools/Source/Python/Common/DecClassObject.py on lines 227..229
                                                    BaseTools/Source/Python/Common/InfClassObject.py on lines 420..422

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

                                                    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 Record in RecordSet:
                                                                SqlCommand = """Update %s set Enabled = -1 where StartLine >= %s and EndLine <= %s""" % (self.TblDsc.Table, Record[0], Record[1])
                                                                self.TblDsc.Exec(SqlCommand)
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 2 other locations - About 1 hr to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 1212..1214
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 1218..1220

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

                                                    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 not self.Compare(Record[6], Record[2], Record[3]):
                                                                        SqlCommand = """Update %s set Enabled = -1 where StartLine >= %s and EndLine <= %s""" % (self.TblDsc.Table, Record[4], Record[5])
                                                                        self.TblDsc.Exec(SqlCommand)
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 2 other locations - About 1 hr to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 1163..1165
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 1218..1220

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

                                                    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 Record[0] == MODEL_META_DATA_CONDITIONAL_STATEMENT_ELSE and Record[1] in DisabledList:
                                                                    SqlCommand = """Update %s set Enabled = -1 where StartLine >= %s and EndLine <= %s""" % (self.TblDsc.Table, Record[4], Record[5])
                                                                    self.TblDsc.Exec(SqlCommand)
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 2 other locations - About 1 hr to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 1163..1165
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 1212..1214

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

                                                    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 Status == False:
                                                                    ErrorMsg = "The SKUID '%s' used in section '%s' is not defined in section [SkuIds]" % (SkuInfoList, Type)
                                                                    EdkLogger.error("DSC File Parser", PARSER_ERROR, ErrorMsg, ContainerFile, RaiseError=EdkLogger.IsRaiseError)
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 2 other locations - About 1 hr to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 608..610
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 665..667

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

                                                                if Status == False:
                                                                    ErrorMsg = "The SKUID '%s' used in section '%s' is not defined in section [SkuIds]" % (SkuInfoList, Type)
                                                                    EdkLogger.error("DSC File Parser", PARSER_ERROR, ErrorMsg, ContainerFile, RaiseError=EdkLogger.IsRaiseError)
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 2 other locations - About 1 hr to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 665..667
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 722..724

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

                                                                if Status == False:
                                                                    ErrorMsg = "The SKUID '%s' used in section '%s' is not defined in section [SkuIds]" % (SkuInfoList, Type)
                                                                    EdkLogger.error("DSC File Parser", PARSER_ERROR, ErrorMsg, ContainerFile, RaiseError=EdkLogger.IsRaiseError)
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 2 other locations - About 1 hr to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 608..610
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 722..724

                                                    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

                                                                ID, Value1, Value2, Arch = Record[0], ValueList[0], ValueList[1], Record[2]
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 1 other location - About 1 hr to fix
                                                    BaseTools/Source/Python/Common/Parsing.py on lines 815..815

                                                    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 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/Common/DscClassObject.py and 3 other locations - About 1 hr to fix
                                                    BaseTools/Source/Python/Common/DecClassObject.py on lines 165..167
                                                    BaseTools/Source/Python/Common/InfClassObject.py on lines 355..357
                                                    BaseTools/Source/Python/Eot/Parser.py on lines 53..55

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

                                                            if Type == DataType.TAB_PCDS_DYNAMIC_HII:
                                                                Model = MODEL_PCD_DYNAMIC_HII
                                                            elif Type == DataType.TAB_PCDS_DYNAMIC_EX_HII:
                                                                Model = MODEL_PCD_DYNAMIC_EX_HII
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 3 other locations - About 55 mins to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 465..468
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 568..571
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 682..685

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

                                                            if Type == DataType.TAB_PCDS_DYNAMIC_VPD:
                                                                Model = MODEL_PCD_DYNAMIC_VPD
                                                            elif Type == DataType.TAB_PCDS_DYNAMIC_EX_VPD:
                                                                Model = MODEL_PCD_DYNAMIC_EX_VPD
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 3 other locations - About 55 mins to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 465..468
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 568..571
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 625..628

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

                                                            if Type == DataType.TAB_PCDS_PATCHABLE_IN_MODULE:
                                                                Model = MODEL_PCD_PATCHABLE_IN_MODULE
                                                            elif Type == DataType.TAB_PCDS_FIXED_AT_BUILD:
                                                                Model = MODEL_PCD_FIXED_AT_BUILD
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 3 other locations - About 55 mins to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 568..571
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 625..628
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 682..685

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

                                                            if Type == DataType.TAB_PCDS_DYNAMIC_DEFAULT:
                                                                Model = MODEL_PCD_DYNAMIC_DEFAULT
                                                            elif Type == DataType.TAB_PCDS_DYNAMIC_EX_DEFAULT:
                                                                Model = MODEL_PCD_DYNAMIC_EX_DEFAULT
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 3 other locations - About 55 mins to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 465..468
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 625..628
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 682..685

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

                                                                    LineList = GetSplitValueList(Line[len(TAB_SECTION_START):len(Line) - len(TAB_SECTION_END)], TAB_COMMA_SPLIT)
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 3 other locations - About 50 mins to fix
                                                    BaseTools/Source/Python/Common/DecClassObject.py on lines 202..202
                                                    BaseTools/Source/Python/Common/InfClassObject.py on lines 393..393
                                                    BaseTools/Source/Python/Eot/InfParserLite.py on lines 129..129

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

                                                                    if IncludeFile[1] == Arch or IncludeFile[1] == TAB_ARCH_COMMON.upper():
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 19 other locations - About 40 mins to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 280..280
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 289..289
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 347..347
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 386..386
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 395..395
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 429..429
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 437..437
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 488..488
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 498..498
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 538..538
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 548..548
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 591..591
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 601..601
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 648..648
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 658..658
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 705..705
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 715..715
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 756..756
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 767..767

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

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

                                                                    if IncludeFile[1] == Arch or IncludeFile[1] == TAB_ARCH_COMMON.upper():
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 19 other locations - About 40 mins to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 280..280
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 289..289
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 335..335
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 347..347
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 395..395
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 429..429
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 437..437
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 488..488
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 498..498
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 538..538
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 548..548
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 591..591
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 601..601
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 648..648
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 658..658
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 705..705
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 715..715
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 756..756
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 767..767

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

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

                                                                    if Record[1] == Arch or Record[1] == TAB_ARCH_COMMON.upper():
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 19 other locations - About 40 mins to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 280..280
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 289..289
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 335..335
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 386..386
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 395..395
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 429..429
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 437..437
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 488..488
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 498..498
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 538..538
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 548..548
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 591..591
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 601..601
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 648..648
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 658..658
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 705..705
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 715..715
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 756..756
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 767..767

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

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

                                                                    if IncludeFile[1] == Arch or IncludeFile[1] == TAB_ARCH_COMMON.upper():
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 19 other locations - About 40 mins to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 280..280
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 289..289
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 335..335
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 347..347
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 386..386
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 395..395
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 429..429
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 437..437
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 488..488
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 498..498
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 538..538
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 548..548
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 601..601
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 648..648
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 658..658
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 705..705
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 715..715
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 756..756
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 767..767

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

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

                                                                    if IncludeFile[1] == Arch or IncludeFile[1] == TAB_ARCH_COMMON.upper():
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 19 other locations - About 40 mins to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 280..280
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 289..289
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 335..335
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 347..347
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 386..386
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 395..395
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 429..429
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 437..437
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 488..488
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 498..498
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 538..538
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 548..548
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 591..591
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 601..601
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 648..648
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 658..658
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 715..715
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 756..756
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 767..767

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

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

                                                                    if IncludeFile[1] == Arch or IncludeFile[1] == TAB_ARCH_COMMON.upper():
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 19 other locations - About 40 mins to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 280..280
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 289..289
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 335..335
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 347..347
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 386..386
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 395..395
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 429..429
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 437..437
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 488..488
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 498..498
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 538..538
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 548..548
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 591..591
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 601..601
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 648..648
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 658..658
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 705..705
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 715..715
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 767..767

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

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

                                                                    if Record[1] == Arch or Record[1] == TAB_ARCH_COMMON.upper():
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 19 other locations - About 40 mins to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 280..280
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 289..289
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 335..335
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 347..347
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 386..386
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 395..395
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 429..429
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 437..437
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 488..488
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 498..498
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 538..538
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 591..591
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 601..601
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 648..648
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 658..658
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 705..705
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 715..715
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 756..756
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 767..767

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

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

                                                                    if IncludeFile[1] == Arch or IncludeFile[1] == TAB_ARCH_COMMON.upper():
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 19 other locations - About 40 mins to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 289..289
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 335..335
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 347..347
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 386..386
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 395..395
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 429..429
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 437..437
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 488..488
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 498..498
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 538..538
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 548..548
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 591..591
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 601..601
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 648..648
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 658..658
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 705..705
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 715..715
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 756..756
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 767..767

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

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

                                                                    if Record[1] == Arch or Record[1] == TAB_ARCH_COMMON.upper():
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 19 other locations - About 40 mins to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 280..280
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 289..289
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 335..335
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 347..347
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 386..386
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 395..395
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 429..429
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 437..437
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 488..488
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 538..538
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 548..548
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 591..591
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 601..601
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 648..648
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 658..658
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 705..705
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 715..715
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 756..756
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 767..767

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

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

                                                                    if Record[1] == Arch or Record[1] == TAB_ARCH_COMMON.upper():
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 19 other locations - About 40 mins to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 280..280
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 289..289
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 335..335
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 347..347
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 386..386
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 395..395
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 429..429
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 437..437
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 488..488
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 498..498
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 538..538
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 548..548
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 591..591
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 601..601
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 648..648
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 658..658
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 705..705
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 715..715
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 756..756

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

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

                                                                    if Record[1] == Arch or Record[1] == TAB_ARCH_COMMON.upper():
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 19 other locations - About 40 mins to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 280..280
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 289..289
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 335..335
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 347..347
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 386..386
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 395..395
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 429..429
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 437..437
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 488..488
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 498..498
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 538..538
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 548..548
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 591..591
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 601..601
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 648..648
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 658..658
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 705..705
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 756..756
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 767..767

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

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

                                                                    if IncludeFile[1] == Arch or IncludeFile[1] == TAB_ARCH_COMMON.upper():
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 19 other locations - About 40 mins to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 280..280
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 289..289
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 335..335
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 347..347
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 386..386
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 395..395
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 437..437
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 488..488
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 498..498
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 538..538
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 548..548
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 591..591
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 601..601
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 648..648
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 658..658
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 705..705
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 715..715
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 756..756
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 767..767

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

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

                                                                    if Record[1] == Arch or Record[1] == TAB_ARCH_COMMON.upper():
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 19 other locations - About 40 mins to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 280..280
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 289..289
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 335..335
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 347..347
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 386..386
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 395..395
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 429..429
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 488..488
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 498..498
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 538..538
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 548..548
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 591..591
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 601..601
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 648..648
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 658..658
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 705..705
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 715..715
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 756..756
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 767..767

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

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

                                                                    if Record[1] == Arch or Record[1] == TAB_ARCH_COMMON.upper():
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 19 other locations - About 40 mins to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 280..280
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 289..289
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 335..335
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 347..347
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 386..386
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 429..429
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 437..437
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 488..488
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 498..498
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 538..538
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 548..548
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 591..591
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 601..601
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 648..648
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 658..658
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 705..705
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 715..715
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 756..756
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 767..767

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

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

                                                                    if IncludeFile[1] == Arch or IncludeFile[1] == TAB_ARCH_COMMON.upper():
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 19 other locations - About 40 mins to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 280..280
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 289..289
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 335..335
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 347..347
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 386..386
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 395..395
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 429..429
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 437..437
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 498..498
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 538..538
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 548..548
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 591..591
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 601..601
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 648..648
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 658..658
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 705..705
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 715..715
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 756..756
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 767..767

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

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

                                                                    if IncludeFile[1] == Arch or IncludeFile[1] == TAB_ARCH_COMMON.upper():
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 19 other locations - About 40 mins to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 280..280
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 289..289
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 335..335
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 347..347
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 386..386
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 395..395
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 429..429
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 437..437
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 488..488
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 498..498
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 548..548
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 591..591
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 601..601
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 648..648
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 658..658
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 705..705
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 715..715
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 756..756
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 767..767

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

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

                                                                    if Record[1] == Arch or Record[1] == TAB_ARCH_COMMON.upper():
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 19 other locations - About 40 mins to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 280..280
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 289..289
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 335..335
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 347..347
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 386..386
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 395..395
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 429..429
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 437..437
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 488..488
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 498..498
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 538..538
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 548..548
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 591..591
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 648..648
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 658..658
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 705..705
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 715..715
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 756..756
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 767..767

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

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

                                                                    if IncludeFile[1] == Arch or IncludeFile[1] == TAB_ARCH_COMMON.upper():
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 19 other locations - About 40 mins to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 280..280
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 289..289
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 335..335
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 347..347
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 386..386
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 395..395
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 429..429
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 437..437
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 488..488
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 498..498
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 538..538
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 548..548
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 591..591
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 601..601
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 658..658
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 705..705
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 715..715
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 756..756
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 767..767

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

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

                                                                    if Record[1] == Arch or Record[1] == TAB_ARCH_COMMON.upper():
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 19 other locations - About 40 mins to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 280..280
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 289..289
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 335..335
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 347..347
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 386..386
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 395..395
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 429..429
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 437..437
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 488..488
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 498..498
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 538..538
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 548..548
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 591..591
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 601..601
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 648..648
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 705..705
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 715..715
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 756..756
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 767..767

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

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

                                                                    if Record[1] == Arch or Record[1] == TAB_ARCH_COMMON.upper():
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 19 other locations - About 40 mins to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 280..280
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 335..335
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 347..347
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 386..386
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 395..395
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 429..429
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 437..437
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 488..488
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 498..498
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 538..538
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 548..548
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 591..591
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 601..601
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 648..648
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 658..658
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 705..705
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 715..715
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 756..756
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 767..767

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

                                                    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

                                                                        for SubPcd in SubPcdSet4:
                                                                            Pcd.append([DataType.TAB_PCDS_DYNAMIC_EX, SubPcd[0], SubPcd[3]])
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 4 other locations - About 35 mins to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 783..784
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 785..786
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 787..788
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 791..792

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

                                                    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

                                                                        for SubPcd in SubPcdSet2:
                                                                            Pcd.append([DataType.TAB_PCDS_PATCHABLE_IN_MODULE, SubPcd[0], SubPcd[3]])
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 4 other locations - About 35 mins to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 783..784
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 787..788
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 789..790
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 791..792

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

                                                    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

                                                                        for SubPcd in SubPcdSet5:
                                                                            Pcd.append([DataType.TAB_PCDS_DYNAMIC, SubPcd[0], SubPcd[3]])
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 4 other locations - About 35 mins to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 783..784
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 785..786
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 787..788
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 789..790

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

                                                    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

                                                                        for SubPcd in SubPcdSet3:
                                                                            Pcd.append([DataType.TAB_PCDS_FEATURE_FLAG, SubPcd[0], SubPcd[3]])
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 4 other locations - About 35 mins to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 783..784
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 785..786
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 789..790
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 791..792

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

                                                    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

                                                                        for SubPcd in SubPcdSet1:
                                                                            Pcd.append([DataType.TAB_PCDS_FIXED_AT_BUILD, SubPcd[0], SubPcd[3]])
                                                    Severity: Major
                                                    Found in BaseTools/Source/Python/Common/DscClassObject.py and 4 other locations - About 35 mins to fix
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 785..786
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 787..788
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 789..790
                                                    BaseTools/Source/Python/Common/DscClassObject.py on lines 791..792

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

                                                    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