hackedteam/vector-edk

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

Summary

Maintainability
F
3 wks
Test Coverage

Function GenModuleDatabase has a Cognitive Complexity of 159 (exceeds 5 allowed). Consider refactoring.
Open

    def GenModuleDatabase(self, InfList = []):
        for Inf in self.InfDatabase.keys():
            Module = self.InfDatabase[Inf].Module

            for Arch in self.SupArchList:
Severity: Minor
Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py - About 3 days 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 UpdateLibrariesOfModule has a Cognitive Complexity of 126 (exceeds 5 allowed). Consider refactoring.
Open

    def UpdateLibrariesOfModule(self, Platform, Module, Arch):
        ModuleDatabase = self.Build[Arch].ModuleDatabase
        ModuleType = Module.ModuleType

        # check Edk module
Severity: Minor
Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py - About 2 days to fix

Cognitive Complexity

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

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

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

Further reading

File EdkIIWorkspaceBuild.py has 853 lines of code (exceeds 250 allowed). Consider refactoring.
Open

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

    Function FindPcd has a Cognitive Complexity of 92 (exceeds 5 allowed). Consider refactoring.
    Open

        def FindPcd(self, Arch, ModuleName, Name, Guid, Type):
            NewType = ''
            DatumType = ''
            Value = ''
            Token = ''
    Severity: Minor
    Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.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 GenPlatformDatabase has a Cognitive Complexity of 74 (exceeds 5 allowed). Consider refactoring.
    Open

        def GenPlatformDatabase(self, PcdsSet={}):
            for Dsc in self.DscDatabase.keys():
                Platform = self.DscDatabase[Dsc].Platform
                for Arch in self.SupArchList:
                    Pb = PlatformBuildClassObject()
    Severity: Minor
    Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.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 GenPackageDatabase has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
    Open

        def GenPackageDatabase(self):
            for Dec in self.DecDatabase.keys():
                Package = self.DecDatabase[Dec].Package
    
                for Arch in self.SupArchList:
    Severity: Minor
    Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py - About 7 hrs to fix

    Cognitive Complexity

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

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

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

    Further reading

    Function __init__ has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
    Open

        def __init__(self, ActivePlatform, WorkspaceDir):
            self.WorkspaceDir            = NormPath(WorkspaceDir)
            self.SupArchList             = []
            self.BuildTarget             = []
            self.SkuId                   = ''
    Severity: Minor
    Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.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 FindSupModuleListOfLibraryClass has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
    Open

        def FindSupModuleListOfLibraryClass(self, LibraryClass, OverridedLibraryClassList, Arch):
            Name = LibraryClass.Name
            FilePath = LibraryClass.FilePath
            SupModuleList = copy.copy(LibraryClass.SupModuleList)
    
    Severity: Minor
    Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py - About 4 hrs to fix

    Cognitive Complexity

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

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

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

    Further reading

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

        def UpdateLibrariesOfPlatform(self, InfList = []):
            for Arch in self.SupArchList:
                PlatformDatabase = self.Build[Arch].PlatformDatabase
                for Dsc in PlatformDatabase:
                    Platform = PlatformDatabase[Dsc]
    Severity: Minor
    Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.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 ShowWorkspaceBuild has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
    Open

        def ShowWorkspaceBuild(self):
            print self.DscDatabase
            print self.InfDatabase
            print self.DecDatabase
            print 'SupArchList', self.SupArchList
    Severity: Minor
    Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.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 IsModuleDefinedInPlatform has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
    Open

        def IsModuleDefinedInPlatform(self, Inf, Arch, InfList):
            for Dsc in self.DscDatabase.values():
                for LibraryClass in Dsc.Platform.LibraryClasses.LibraryList:
                    if Inf == LibraryClass.FilePath and Arch in LibraryClass.SupArchList:
                        return True
    Severity: Minor
    Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.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 FindLibraryClassInstanceOfModule has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

        def FindLibraryClassInstanceOfModule(self, Lib, Arch, ModuleType, ModuleName):
            #
            # First find if exist in <LibraryClass> of <Components> from dsc file
            #
            for Dsc in self.DscDatabase.keys():
    Severity: Minor
    Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py - About 2 hrs to fix

    Cognitive Complexity

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

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

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

    Further reading

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

        def FindBuildOptions(self, Arch, ModuleName, BuildOptions):
            for Dsc in self.DscDatabase.keys():
                #
                # First find if exist in <BuildOptions> of <Components> from dsc file
                # if find, use that override the one defined in inf file
    Severity: Minor
    Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.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 UpdateLibraryClassOfModule has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

        def UpdateLibraryClassOfModule(self, InfFileName, LibraryClass, Arch, InstanceFilePath):
            #
            # Update the library instance itself to add this libraryclass name
            #
            LibraryModule = self.InfDatabase[InstanceFilePath].Module
    Severity: Minor
    Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.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 __init__ has 9 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def __init__(self, Name = None, Guid = None, Type = None, DatumType = None, Value = None, Token = None, MaxDatumSize = None, SkuInfoList = {}, IsOverrided = False):
    Severity: Major
    Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py - About 1 hr to fix

      Function __init__ has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def __init__(self):
              self.AutoGenVersion          = 0
              self.DescFilePath            = ''
              self.BaseName                = ''
              self.ModuleType              = ''
      Severity: Minor
      Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py - About 1 hr to fix

        Avoid deeply nested control flow statements.
        Open

                                for ModuleType in SupModuleList:
                                    Pb.LibraryClasses[(Item.Name, ModuleType)] = Item.FilePath
        
                        #
                        # Libraries
        Severity: Major
        Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                  for Node in ConsumedByList[Item]:
                                      if Node not in Constructor:
                                          #
                                          # remove edge e from the graph
                                          #
          Severity: Major
          Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    for Dec in self.Build[Arch].PackageDatabase:
                                        Pcds = self.Build[Arch].PackageDatabase[Dec].Pcds
                                        if (Name, Guid, PcdType) in Pcds:
                                            Pcd = Pcds[(Name, Guid, PcdType)]
                                            Type = PcdType
            Severity: Major
            Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                      if (Item.ToolChainFamily, Item.ToolChain) not in Pb.BuildOptions:
                                          Pb.BuildOptions[(Item.ToolChainFamily, Item.ToolChain)] = Item.Option
                                      else:
                                          OptionString = Pb.BuildOptions[(Item.ToolChainFamily, Item.ToolChain)]
                                          Pb.BuildOptions[(Item.ToolChainFamily, Item.ToolChain)] = OptionString + " " + Item.Option
              Severity: Major
              Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        if Arch in Item.SupArchList:
                                            for ModuleType in Item.SupModuleList:
                                                EdkLogger.debug(EdkLogger.DEBUG_3, "\tLibraryClass %s has specific defined module types" % Name)
                                                if ModuleType in SupModuleList:
                                                    SupModuleList.remove(ModuleType)
                Severity: Major
                Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                          for LibraryClass in Module.LibraryClasses.LibraryList:
                                              if LibraryClass.Name == Lib:
                                                  return LibraryClass.FilePath
                          #
                          #Second find if exist in <LibraryClass> of <LibraryClasses> from dsc file
                  Severity: Major
                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            for Pcd in Module.PcdBuildDefinitions:
                                                if (Name, Guid) == (Pcd.CName, Pcd.TokenSpaceGuidCName):
                                                    if Pcd.DefaultValue != '':
                                                        Value = Pcd.DefaultValue
                                                    if Pcd.MaxDatumSize != '':
                    Severity: Major
                    Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                              if Pb.LibraryClass != []:
                                                  #
                                                  # For Library
                                                  #
                                                  for Libs in Pb.LibraryClass:
                      Severity: Major
                      Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                for Key in Module.LibraryClasses:
                                                    Lib = Module.LibraryClasses[Key]
                                                    if Lib not in Platform.LibraryInstances:
                                                        Platform.LibraryInstances.append(Lib)
                        
                        Severity: Major
                        Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                  for BuildOption in Module.ModuleSaBuildOption.BuildOptionList:
                                                      #
                                                      # Add to BuildOptions
                                                      #
                                                      BuildOptions[(BuildOption.ToolChainFamily, BuildOption.ToolChain)] = BuildOption.Option
                          Severity: Major
                          Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                    if ItemArch not in Library.Module.Header:
                                                        continue
                                                    Pb.Libraries[Library.Module.Header[ItemArch].Name] = Item.FilePath
                            Severity: Major
                            Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py - About 45 mins to fix

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

                                  def FindPcd(self, Arch, ModuleName, Name, Guid, Type):
                              Severity: Minor
                              Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py - About 35 mins to fix

                                Avoid too many return statements within this function.
                                Open

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

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

                                      def ShowUnFoundPcds(self):
                                          if self.UnFoundPcdInDsc != {}:
                                              WrnMessage = '**** WARNING ****\n'
                                              WrnMessage += 'The following Pcds were not defined in the DSC file: %s\n' % self.DscFileName
                                              WrnMessage += 'The default values were obtained from the DEC file that declares the PCD and the PCD default value\n'
                                  Severity: Minor
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py - About 25 mins to fix

                                  Cognitive Complexity

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

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

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

                                  Further reading

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

                                          Rtn = '\tTokenCName=' + str(self.TokenCName) + ', ' + \
                                                'TokenSpaceGuidCName=' + str(self.TokenSpaceGuidCName) + ', ' + \
                                                'Type=' + str(self.Type) + ', ' + \
                                                'DatumType=' + str(self.DatumType) + ', ' + \
                                                'DefaultValue=' + str(self.DefaultValue) + ', ' + \
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 1 other location - About 1 day to fix
                                  BaseTools/Source/Python/Workspace/BuildClassObject.py on lines 69..75

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

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                      def __init__(self):
                                          self.DescFilePath            = ''
                                          self.PlatformName            = ''
                                          self.Guid                    = ''
                                          self.Version                 = ''
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 1 other location - About 7 hrs to fix
                                  BaseTools/Source/Python/Workspace/BuildClassObject.py on lines 320..337

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

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                      def AddToDecDatabase(self, DecFileName):
                                          File = self.WorkspaceFile(DecFileName)
                                          if os.path.exists(File) and os.path.isfile(File):
                                              if DecFileName not in self.DecDatabase:
                                                  self.DecDatabase[DecFileName] = Dec(File, False, True, self.WorkspaceDir, self.Db, self.SupArchList)
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 1 other location - About 6 hrs to fix
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 1252..1258

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

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                      def AddToInfDatabase(self, InfFileName):
                                          File = self.WorkspaceFile(InfFileName)
                                          if os.path.exists(File) and os.path.isfile(File):
                                              if InfFileName not in self.InfDatabase:
                                                  self.InfDatabase[InfFileName] = Inf(File, False, True, self.WorkspaceDir, self.Db, self.SupArchList)
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 1 other location - About 6 hrs to fix
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 1266..1272

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

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                                  for Item in Module.ExternImages:
                                                      if Item.ModuleEntryPoint != '' and Item.ModuleEntryPoint not in Pb.ModuleEntryPointList:
                                                          Pb.ModuleEntryPointList.append(Item.ModuleEntryPoint)
                                                      if Item.ModuleUnloadImage != '' and Item.ModuleUnloadImage not in Pb.ModuleUnloadImageList:
                                                          Pb.ModuleUnloadImageList.append(Item.ModuleUnloadImage)
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 1 other location - About 5 hrs to fix
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 769..773

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

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                                  for Item in Module.ExternLibraries:
                                                      if Item.Constructor != '' and Item.Constructor not in Pb.ConstructorList:
                                                          Pb.ConstructorList.append(Item.Constructor)
                                                      if Item.Destructor != '' and Item.Destructor not in Pb.DestructorList:
                                                          Pb.DestructorList.append(Item.Destructor)
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 1 other location - About 5 hrs to fix
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 764..768

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

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                      def __init__(self):
                                          self.DescFilePath            = ''
                                          self.PackageName             = ''
                                          self.Guid                    = ''
                                          self.Version                 = ''
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 1 other location - About 4 hrs to fix
                                  BaseTools/Source/Python/Workspace/BuildClassObject.py on lines 250..261

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

                                  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

                                  class LibraryClassObject(object):
                                      def __init__(self, Name = None, SupModList = [], Type = None):
                                          self.LibraryClass = Name
                                          self.SupModList = SupModList
                                          if Type != None:
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 1 other location - About 2 hrs to fix
                                  BaseTools/Source/Python/Workspace/BuildClassObject.py on lines 114..119

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

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                          for Item in self.SkuInfoList.values():
                                              Rtn = Rtn + 'SkuId=' + Item.SkuId + ', ' + 'SkuIdName=' + Item.SkuIdName
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 1 other location - About 2 hrs to fix
                                  BaseTools/Source/Python/Workspace/BuildClassObject.py on lines 76..77

                                  Duplicated Code

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

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

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

                                  Tuning

                                  This issue has a mass of 51.

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                                  if M != Module:
                                                      if M in ConsumedByList[LibraryModule]:
                                                          continue
                                                      ConsumedByList[LibraryModule].append(M)
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 2 other locations - About 1 hr to fix
                                  BaseTools/Source/Python/AutoGen/AutoGen.py on lines 1518..1521
                                  BaseTools/Source/Python/Workspace/WorkspaceCommon.py on lines 135..138

                                  Duplicated Code

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

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

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

                                  Tuning

                                  This issue has a mass of 42.

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                              for Library in Dsc.Platform.Libraries.LibraryList:
                                                  if Inf == Library.FilePath and Arch in Library.SupArchList:
                                                      return True
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 1 other location - About 1 hr to fix
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 1551..1553

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

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                              for LibraryClass in Dsc.Platform.LibraryClasses.LibraryList:
                                                  if Inf == LibraryClass.FilePath and Arch in LibraryClass.SupArchList:
                                                      return True
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 1 other location - About 1 hr to fix
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 1560..1562

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

                                  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

                                                  for Item in Package.PpiDeclarations:
                                                      if Arch in Item.SupArchList:
                                                          Pb.Ppis[Item.CName] = Item.Guid
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 3 other locations - About 55 mins to fix
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 663..665
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 677..679
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 691..693

                                  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

                                                  for Item in Package.GuidDeclarations:
                                                      if Arch in Item.SupArchList:
                                                          Pb.Guids[Item.CName] = Item.Guid
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 3 other locations - About 55 mins to fix
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 663..665
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 670..672
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 691..693

                                  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

                                                  for Item in Package.LibraryClassDeclarations:
                                                      if Arch in Item.SupArchList:
                                                          Pb.LibraryClasses[Item.LibraryClass] = Item.RecommendedInstance
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 3 other locations - About 55 mins to fix
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 663..665
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 670..672
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 677..679

                                  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

                                                  for Item in Package.ProtocolDeclarations:
                                                      if Arch in Item.SupArchList:
                                                          Pb.Protocols[Item.CName] = Item.Guid
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 3 other locations - About 55 mins to fix
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 670..672
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 677..679
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 691..693

                                  Duplicated Code

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

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

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

                                  Tuning

                                  This issue has a mass of 37.

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                              if ConsumedByList[Item] != [] and Item in Constructor and len(Constructor) > 1:
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 2 other locations - About 45 mins to fix
                                  BaseTools/Source/Python/AutoGen/AutoGen.py on lines 1586..1586
                                  BaseTools/Source/Python/Workspace/WorkspaceCommon.py on lines 203..203

                                  Duplicated Code

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

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

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

                                  Tuning

                                  This issue has a mass of 35.

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                                  for Item in Module.Protocols:
                                                      if Arch in Item.SupArchList:
                                                          Pb.Protocols.append(Item.CName)
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 6 other locations - About 35 mins to fix
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 684..686
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 808..810
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 815..817
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 822..824
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 829..831
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 882..884

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

                                                  for Item in Module.Includes:
                                                      if Arch in Item.SupArchList:
                                                          Pb.Includes.append(Item.FilePath)
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 6 other locations - About 35 mins to fix
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 684..686
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 801..803
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 808..810
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 815..817
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 829..831
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 882..884

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

                                                  for Item in Module.PackageDependencies:
                                                      if Arch in Item.SupArchList:
                                                          Pb.Packages.append(Item.FilePath)
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 6 other locations - About 35 mins to fix
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 684..686
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 801..803
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 808..810
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 815..817
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 822..824
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 882..884

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

                                                  for Item in Package.Includes:
                                                      if Arch in Item.SupArchList:
                                                          Pb.Includes.append(Item.FilePath)
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 6 other locations - About 35 mins to fix
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 801..803
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 808..810
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 815..817
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 822..824
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 829..831
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 882..884

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

                                                  for Item in Module.Ppis:
                                                      if Arch in Item.SupArchList:
                                                          Pb.Ppis.append(Item.CName)
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 6 other locations - About 35 mins to fix
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 684..686
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 801..803
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 815..817
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 822..824
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 829..831
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 882..884

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

                                                  for Item in Module.Libraries:
                                                      if Arch in Item.SupArchList:
                                                          Pb.Libraries.append(Item.Library)
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 6 other locations - About 35 mins to fix
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 684..686
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 801..803
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 808..810
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 815..817
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 822..824
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 829..831

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

                                                  for Item in Module.Guids:
                                                      if Arch in Item.SupArchList:
                                                          Pb.Ppis.append(Item.CName)
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 6 other locations - About 35 mins to fix
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 684..686
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 801..803
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 808..810
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 822..824
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 829..831
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 882..884

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

                                              for Arch in DataType.ARCH_LIST:
                                                  for Item in Platform.Header[Arch].BuildTargets:
                                                      Tmp.add(Item)
                                  Severity: Minor
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 1 other location - About 35 mins to fix
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 482..484

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

                                              for Arch in DataType.ARCH_LIST:
                                                  for Item in Platform.Header[Arch].SupArchList:
                                                      Tmp.add(Item)
                                  Severity: Minor
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 1 other location - About 35 mins to fix
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 487..489

                                  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

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

                                                  if LibraryModule.ConstructorList != [] and LibraryModule not in Constructor:
                                                      Constructor.append(LibraryModule)
                                  Severity: Minor
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 2 other locations - About 30 mins to fix
                                  BaseTools/Source/Python/AutoGen/AutoGen.py on lines 1512..1513
                                  BaseTools/Source/Python/Workspace/WorkspaceCommon.py on lines 129..130

                                  Duplicated Code

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

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

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

                                  Tuning

                                  This issue has a mass of 32.

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                                  if Pcd.MaxDatumSize != '' and Pcd.MaxDatumSize != None:
                                                      MaxDatumSize = Pcd.MaxDatumSize
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 3 other locations - About 30 mins to fix
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 1399..1400
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 1401..1402
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 1403..1404

                                  Duplicated Code

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

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

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

                                  Tuning

                                  This issue has a mass of 32.

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                                  if Pb.BaseName == '':
                                                      EdkLogger.error("AutoGen", PARSER_ERROR, "The BaseName of module %s is not defined for arch %s" % (Inf, Arch))                
                                  Severity: Minor
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 2 other locations - About 30 mins to fix
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 548..549
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 654..655

                                  Duplicated Code

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

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

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

                                  Tuning

                                  This issue has a mass of 32.

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                                  if Pb.PlatformName == '':
                                                      EdkLogger.error("AutoGen", PARSER_ERROR, "The BaseName of platform %s is not defined for arch %s" % (Dsc, Arch))
                                  Severity: Minor
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 2 other locations - About 30 mins to fix
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 654..655
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 736..737

                                  Duplicated Code

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

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

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

                                  Tuning

                                  This issue has a mass of 32.

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                                  if Pcd.DatumType != '' and Pcd.DatumType != None:
                                                      DatumType = Pcd.DatumType
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 3 other locations - About 30 mins to fix
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 1401..1402
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 1403..1404
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 1405..1406

                                  Duplicated Code

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

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

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

                                  Tuning

                                  This issue has a mass of 32.

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                                  if Pcd.DefaultValue != '' and Pcd.DefaultValue != None:
                                                      Value = Pcd.DefaultValue
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 3 other locations - About 30 mins to fix
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 1399..1400
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 1401..1402
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 1405..1406

                                  Duplicated Code

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

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

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

                                  Tuning

                                  This issue has a mass of 32.

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                                  if Pcd.TokenValue != '' and Pcd.TokenValue != None:
                                                      Token = Pcd.TokenValue
                                  Severity: Major
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 3 other locations - About 30 mins to fix
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 1399..1400
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 1403..1404
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 1405..1406

                                  Duplicated Code

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

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

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

                                  Tuning

                                  This issue has a mass of 32.

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

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

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

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

                                  Refactorings

                                  Further Reading

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

                                                  if Pb.PackageName == '':
                                                      EdkLogger.error("AutoGen", PARSER_ERROR, "The BaseName of package %s is not defined for arch %s" % (Dec, Arch))
                                  Severity: Minor
                                  Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py and 2 other locations - About 30 mins to fix
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 548..549
                                  BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py on lines 736..737

                                  Duplicated Code

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

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

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

                                  Tuning

                                  This issue has a mass of 32.

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

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

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

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

                                  Refactorings

                                  Further Reading

                                  There are no issues that match your filters.

                                  Category
                                  Status