hackedteam/vector-edk

View on GitHub
BaseTools/Source/Python/GenFds/FfsInfStatement.py

Summary

Maintainability
F
2 wks
Test Coverage

Function GetFinalTargetSuffixMap has a Cognitive Complexity of 91 (exceeds 5 allowed). Consider refactoring.
Open

    def GetFinalTargetSuffixMap(self):
        if not self.InfModule or not self.CurrentArch:
            return []
        if not self.FinalTargetSuffixMap:
            FinalBuildTargetList = GenFdsGlobalVariable.GetModuleCodaTargetList(self.InfModule, self.CurrentArch)
Severity: Minor
Found in BaseTools/Source/Python/GenFds/FfsInfStatement.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 __InfParse__ has a Cognitive Complexity of 82 (exceeds 5 allowed). Consider refactoring.
Open

    def __InfParse__(self, Dict = {}):

        GenFdsGlobalVariable.VerboseLogger( " Begine parsing INf file : %s" %self.InfFileName)

        self.InfFileName = self.InfFileName.replace('$(WORKSPACE)', '')
Severity: Minor
Found in BaseTools/Source/Python/GenFds/FfsInfStatement.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

File FfsInfStatement.py has 695 lines of code (exceeds 250 allowed). Consider refactoring.
Open

## @file
# process FFS generation from INF statement
#
#  Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
#
Severity: Major
Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py - About 1 day to fix

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

        def __GenSimpleFileSection__(self, Rule):
            #
            # Prepare the parameter of GenSection
            #
            FileList = []
    Severity: Minor
    Found in BaseTools/Source/Python/GenFds/FfsInfStatement.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 __GenComplexFileSection__ has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring.
    Open

        def __GenComplexFileSection__(self, Rule, FvChildAddr, FvParentAddr):
            if self.ModuleType in ('SEC', 'PEI_CORE', 'PEIM'):
                if Rule.KeepReloc != None:
                    self.KeepRelocFromRule = Rule.KeepReloc
            SectFiles = []
    Severity: Minor
    Found in BaseTools/Source/Python/GenFds/FfsInfStatement.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 __GetBuildOutputMapFileVfrUniInfo has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
    Open

        def __GetBuildOutputMapFileVfrUniInfo(self, VfrUniBaseName):
            
            RetValue = []
            
            MapFileName = os.path.join(self.EfiOutputPath, self.BaseName + ".map")
    Severity: Minor
    Found in BaseTools/Source/Python/GenFds/FfsInfStatement.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 GetCurrentArch has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

        def GetCurrentArch(self) :
    
            TargetArchList = GenFdsGlobalVariable.ArchList
    
            PlatformArchList = self.__GetPlatformArchList__()
    Severity: Minor
    Found in BaseTools/Source/Python/GenFds/FfsInfStatement.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 __GetPlatformArchList__ has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
    Open

        def __GetPlatformArchList__(self):
    
            InfFileKey = os.path.normpath(os.path.join(GenFdsGlobalVariable.WorkSpaceDir, self.InfFileName))
            DscArchList = []
            PlatformDataBase = GenFdsGlobalVariable.WorkSpace.BuildObject[GenFdsGlobalVariable.ActivePlatform, 'IA32', GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag]
    Severity: Minor
    Found in BaseTools/Source/Python/GenFds/FfsInfStatement.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 GenFfs has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
    Open

        def GenFfs(self, Dict = {}, FvChildAddr = [], FvParentAddr=None):
            #
            # Parse Inf file get Module related information
            #
    
    Severity: Minor
    Found in BaseTools/Source/Python/GenFds/FfsInfStatement.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 __InfParse__ has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def __InfParse__(self, Dict = {}):
    
            GenFdsGlobalVariable.VerboseLogger( " Begine parsing INf file : %s" %self.InfFileName)
    
            self.InfFileName = self.InfFileName.replace('$(WORKSPACE)', '')
    Severity: Minor
    Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py - About 1 hr to fix

      Function __GetRule__ has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

          def __GetRule__ (self) :
              CurrentArchList = []
              if self.CurrentArch == None:
                  CurrentArchList = ['common']
              else:
      Severity: Minor
      Found in BaseTools/Source/Python/GenFds/FfsInfStatement.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 __GenSimpleFileFfs__ has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

          def __GenSimpleFileFfs__(self, Rule, InputFileList):
              FfsOutput = self.OutputPath                     + \
                          os.sep                              + \
                          self.__ExtendMacro__(Rule.NameGuid) + \
                          '.ffs'
      Severity: Minor
      Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py - About 55 mins to fix

      Cognitive Complexity

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

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

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

      Further reading

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

          def __GenComplexFileFfs__(self, Rule, InputFile, Alignments):
      
              if Rule.NameGuid != None and Rule.NameGuid.startswith('PCD('):
                  PcdValue = GenFdsGlobalVariable.GetPcdValue(Rule.NameGuid)
                  if len(PcdValue) == 0:
      Severity: Minor
      Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py - About 45 mins to fix

      Cognitive Complexity

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

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

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

      Further reading

      Avoid deeply nested control flow statements.
      Open

                              if PlatformModule and LibName in PlatformModule.LibraryClasses:
                                  LibraryPath = PlatformModule.LibraryClasses[LibName]
                              else:
                                  LibraryPath = PlatformDataBase.LibraryClasses[LibName, ModuleType]
                              if not LibraryPath:
      Severity: Major
      Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                if IsHex:
                                    RetValue.append((eachName, Element[2]))
                                    IsHex = False
                            #
                            # GCC map file
        Severity: Major
        Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                  if DepexList != []:
                                      DepexList.append('AND')
                                  DepexList.append('(')
          Severity: Major
          Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    if not LibraryPath:
                                        LibraryPath = Module.LibraryClasses[LibName]
                                    if not LibraryPath:
            Severity: Major
            Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                      if LibraryClass.startswith("NULL") and PlatformDataBase.LibraryClasses[LibraryClass, ModuleType]:
                                          self.InfModule.LibraryClasses[LibraryClass] = PlatformDataBase.LibraryClasses[LibraryClass, ModuleType]
              
              Severity: Major
              Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        if LibName in LibraryInstance:
                                            continue
                                        if PlatformModule and LibName in PlatformModule.LibraryClasses:
                Severity: Major
                Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                          if LibraryClass.startswith("NULL"):
                                              self.InfModule.LibraryClasses[LibraryClass] = PlatformModule.LibraryClasses[LibraryClass]
                  
                  Severity: Major
                  Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            if not LibraryPath:
                                                continue
                                            LibraryModule = GenFdsGlobalVariable.WorkSpace.BuildObject[LibraryPath, self.CurrentArch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag]
                    Severity: Major
                    Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                              if DepexList[-1] == 'END':  # no need of a END at this time
                                                  DepexList.pop()
                                              DepexList.append(')')
                      Severity: Major
                      Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py - About 45 mins to fix

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

                            def __GenUniVfrOffsetFile(self, VfrUniOffsetList, UniVfrOffsetFileName):
                                
                                try:
                                    fInputfile = open(UniVfrOffsetFileName, "wb+", 0)
                                except:
                        Severity: Minor
                        Found in BaseTools/Source/Python/GenFds/FfsInfStatement.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

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

                                if Rule.NameGuid != None and Rule.NameGuid.startswith('PCD('):
                                    PcdValue = GenFdsGlobalVariable.GetPcdValue(Rule.NameGuid)
                                    if len(PcdValue) == 0:
                                        EdkLogger.error("GenFds", GENFDS_ERROR, '%s NOT defined.' \
                                                    % (Rule.NameGuid))
                        Severity: Major
                        Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py and 2 other locations - About 1 day to fix
                        BaseTools/Source/Python/GenFds/FfsFileStatement.py on lines 59..70
                        BaseTools/Source/Python/GenFds/FfsInfStatement.py on lines 891..902

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

                        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 Rule.NameGuid != None and Rule.NameGuid.startswith('PCD('):
                                    PcdValue = GenFdsGlobalVariable.GetPcdValue(Rule.NameGuid)
                                    if len(PcdValue) == 0:
                                        EdkLogger.error("GenFds", GENFDS_ERROR, '%s NOT defined.' \
                                                    % (Rule.NameGuid))
                        Severity: Major
                        Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py and 2 other locations - About 1 day to fix
                        BaseTools/Source/Python/GenFds/FfsFileStatement.py on lines 59..70
                        BaseTools/Source/Python/GenFds/FfsInfStatement.py on lines 736..747

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

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

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

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

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

                        Refactorings

                        Further Reading

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

                                        if not NoStrip:
                                            FileBeforeStrip = os.path.join(self.OutputPath, ModuleName + '.reloc')
                                            if not os.path.exists(FileBeforeStrip) or \
                                                (os.path.getmtime(File) > os.path.getmtime(FileBeforeStrip)):
                                                shutil.copyfile(File, FileBeforeStrip)
                        Severity: Major
                        Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py and 1 other location - About 1 day to fix
                        BaseTools/Source/Python/GenFds/FfsInfStatement.py on lines 687..698

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

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

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

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

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

                        Refactorings

                        Further Reading

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

                                    if not NoStrip:
                                        FileBeforeStrip = os.path.join(self.OutputPath, ModuleName + '.reloc')
                                        if not os.path.exists(FileBeforeStrip) or \
                                            (os.path.getmtime(GenSecInputFile) > os.path.getmtime(FileBeforeStrip)):
                                            shutil.copyfile(GenSecInputFile, FileBeforeStrip)
                        Severity: Major
                        Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py and 1 other location - About 1 day to fix
                        BaseTools/Source/Python/GenFds/FfsInfStatement.py on lines 648..659

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

                        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 self.Alignment == 'Auto' and (SectionType == 'PE32' or SectionType == 'TE'):
                                        ImageObj = PeImageClass (GenSecInputFile)
                                        if ImageObj.SectionAlignment < 0x400:
                                            self.Alignment = str (ImageObj.SectionAlignment)
                                        else:
                        Severity: Major
                        Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py and 2 other locations - About 5 hrs to fix
                        BaseTools/Source/Python/GenFds/EfiSection.py on lines 228..233
                        BaseTools/Source/Python/GenFds/FfsInfStatement.py on lines 641..646

                        Duplicated Code

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

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

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

                        Tuning

                        This issue has a mass of 94.

                        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 self.Alignment == 'Auto' and (SectionType == 'PE32' or SectionType == 'TE'):
                                            ImageObj = PeImageClass (File)
                                            if ImageObj.SectionAlignment < 0x400:
                                                self.Alignment = str (ImageObj.SectionAlignment)
                                            else:
                        Severity: Major
                        Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py and 2 other locations - About 5 hrs to fix
                        BaseTools/Source/Python/GenFds/EfiSection.py on lines 228..233
                        BaseTools/Source/Python/GenFds/FfsInfStatement.py on lines 680..685

                        Duplicated Code

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

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

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

                        Tuning

                        This issue has a mass of 94.

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

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

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

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

                        Refactorings

                        Further Reading

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

                                if self.PcdIsDriver == 'PEI_PCD_DRIVER':
                                    if self.IsBinaryModule:
                                        PcdExDbFileName = os.path.join(GenFdsGlobalVariable.FvDir, "PEIPcdDataBase.raw")
                                    else:
                                        PcdExDbFileName = os.path.join(self.EfiOutputPath, "PEIPcdDataBase.raw")
                        Severity: Major
                        Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py and 1 other location - About 5 hrs to fix
                        BaseTools/Source/Python/GenFds/FfsInfStatement.py on lines 787..798

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

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

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

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

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

                        Refactorings

                        Further Reading

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

                                elif self.PcdIsDriver == 'DXE_PCD_DRIVER':
                                    if self.IsBinaryModule:
                                        PcdExDbFileName = os.path.join(GenFdsGlobalVariable.FvDir, "DXEPcdDataBase.raw")
                                    else:
                                        PcdExDbFileName = os.path.join(self.EfiOutputPath, "DXEPcdDataBase.raw")
                        Severity: Major
                        Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py and 1 other location - About 5 hrs to fix
                        BaseTools/Source/Python/GenFds/FfsInfStatement.py on lines 775..786

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

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

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

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

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

                        Refactorings

                        Further Reading

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

                                if self.ModuleType in ('SEC', 'PEI_CORE', 'PEIM'):
                                    if self.KeepReloc != None:
                                        NoStrip = self.KeepReloc
                                    elif Rule.KeepReloc != None:
                                        NoStrip = Rule.KeepReloc
                        Severity: Major
                        Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py and 1 other location - About 2 hrs to fix
                        BaseTools/Source/Python/GenFds/EfiSection.py on lines 68..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 59.

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

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

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

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

                        Refactorings

                        Further Reading

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

                                        if SectionType == 'TE':
                                            TeFile = os.path.join( self.OutputPath, self.ModuleGuid + 'Te.raw')
                                            GenFdsGlobalVariable.GenerateFirmwareImage(
                                                                    TeFile,
                                                                    [File],
                        Severity: Major
                        Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py and 1 other location - About 2 hrs to fix
                        BaseTools/Source/Python/GenFds/FfsInfStatement.py on lines 700..707

                        Duplicated Code

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

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

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

                        Tuning

                        This issue has a mass of 55.

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

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

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

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

                        Refactorings

                        Further Reading

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

                                    if SectionType == 'TE':
                                        TeFile = os.path.join( self.OutputPath, self.ModuleGuid + 'Te.raw')
                                        GenFdsGlobalVariable.GenerateFirmwareImage(
                                                                TeFile,
                                                                [GenSecInputFile],
                        Severity: Major
                        Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py and 1 other location - About 2 hrs to fix
                        BaseTools/Source/Python/GenFds/FfsInfStatement.py on lines 661..668

                        Duplicated Code

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

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

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

                        Tuning

                        This issue has a mass of 55.

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

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

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

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

                        Refactorings

                        Further Reading

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

                                    if os.path.isabs(GenSecInputFile):
                                        GenSecInputFile = os.path.normpath(GenSecInputFile)
                                    else:
                                        GenSecInputFile = os.path.normpath(os.path.join(self.EfiOutputPath, GenSecInputFile))
                        Severity: Major
                        Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py and 1 other location - About 2 hrs to fix
                        BaseTools/Source/Python/GenFds/EfiSection.py on lines 84..87

                        Duplicated Code

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

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

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

                        Tuning

                        This issue has a mass of 50.

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

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

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

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

                        Refactorings

                        Further Reading

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

                                if self.ModuleType == 'DXE_SMM_DRIVER' and int(self.PiSpecVersion, 16) >= 0x0001000A:
                                    if Rule.FvFileType == 'DRIVER':
                                        Rule.FvFileType = 'SMM'
                        Severity: Major
                        Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py and 1 other location - About 1 hr to fix
                        BaseTools/Source/Python/GenFds/FfsInfStatement.py on lines 805..807

                        Duplicated Code

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

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

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

                        Tuning

                        This issue has a mass of 49.

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

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

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

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

                        Refactorings

                        Further Reading

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

                                    if self.ModuleType == 'DXE_SMM_DRIVER' and int(self.PiSpecVersion, 16) >= 0x0001000A:
                                        if Sect.SectionType == 'DXE_DEPEX':
                                            Sect.SectionType = 'SMM_DEPEX'
                        Severity: Major
                        Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py and 1 other location - About 1 hr to fix
                        BaseTools/Source/Python/GenFds/FfsInfStatement.py on lines 363..365

                        Duplicated Code

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

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

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

                        Tuning

                        This issue has a mass of 49.

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

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

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

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

                        Refactorings

                        Further Reading

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

                                    if FvChildAddr != []:
                                        if isinstance(Sect, FvImageSection):
                                            Sect.FvAddr = FvChildAddr.pop(0)
                                        elif isinstance(Sect, GuidSection):
                                            Sect.FvAddr = FvChildAddr
                        Severity: Major
                        Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py and 1 other location - About 1 hr to fix
                        BaseTools/Source/Python/GenFds/FfsFileStatement.py on lines 105..109

                        Duplicated Code

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

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

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

                        Tuning

                        This issue has a mass of 49.

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

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

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

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

                        Refactorings

                        Further Reading

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

                                GenFdsGlobalVariable.GenerateFfs(FfsOutput, InputSection,
                                                                 Ffs.Ffs.FdfFvFileTypeToFileType[Rule.FvFileType],
                                                                 self.ModuleGuid, Fixed=Rule.Fixed,
                                                                 CheckSum=Rule.CheckSum, Align=Rule.Alignment,
                        Severity: Major
                        Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py and 1 other location - About 1 hr to fix
                        BaseTools/Source/Python/GenFds/FfsInfStatement.py on lines 905..908

                        Duplicated Code

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

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

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

                        Tuning

                        This issue has a mass of 45.

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

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

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

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

                        Refactorings

                        Further Reading

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

                                GenFdsGlobalVariable.GenerateFfs(FfsOutput, InputFile,
                                                                 Ffs.Ffs.FdfFvFileTypeToFileType[Rule.FvFileType],
                                                                 self.ModuleGuid, Fixed=Rule.Fixed,
                                                                 CheckSum=Rule.CheckSum, Align=Rule.Alignment,
                        Severity: Major
                        Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py and 1 other location - About 1 hr to fix
                        BaseTools/Source/Python/GenFds/FfsInfStatement.py on lines 749..752

                        Duplicated Code

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

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

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

                        Tuning

                        This issue has a mass of 45.

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

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

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

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

                        Refactorings

                        Further Reading

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

                                        GenSecOutputFile= self.__ExtendMacro__(Rule.NameGuid) + \
                                                      Ffs.Ffs.SectionSuffix[SectionType] + 'SEC' + SecNum
                        Severity: Major
                        Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py and 1 other location - About 1 hr to fix
                        BaseTools/Source/Python/GenFds/FfsInfStatement.py on lines 674..675

                        Duplicated Code

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

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

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

                        Tuning

                        This issue has a mass of 41.

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

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

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

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

                        Refactorings

                        Further Reading

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

                                    GenSecOutputFile= self.__ExtendMacro__(Rule.NameGuid) + \
                                                      Ffs.Ffs.SectionSuffix[SectionType] + 'SEC' + SecNum
                        Severity: Major
                        Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py and 1 other location - About 1 hr to fix
                        BaseTools/Source/Python/GenFds/FfsInfStatement.py on lines 634..635

                        Duplicated Code

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

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

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

                        Tuning

                        This issue has a mass of 41.

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

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

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

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

                        Refactorings

                        Further Reading

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

                                    if Inf.Specification != None and 'PI_SPECIFICATION_VERSION' in Inf.Specification:
                                        self.PiSpecVersion = Inf.Specification['PI_SPECIFICATION_VERSION']
                        Severity: Major
                        Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py and 1 other location - About 1 hr to fix
                        BaseTools/Source/Python/GenFds/FfsInfStatement.py on lines 191..192

                        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

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

                                    if Inf.Specification != None and 'PI_SPECIFICATION_VERSION' in Inf.Specification:
                                        self.PiSpecVersion = Inf.Specification['PI_SPECIFICATION_VERSION']
                        Severity: Major
                        Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py and 1 other location - About 1 hr to fix
                        BaseTools/Source/Python/GenFds/FfsInfStatement.py on lines 176..177

                        Duplicated Code

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

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

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

                        Tuning

                        This issue has a mass of 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

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

                                if self.Rule != None:
                                    RuleName = RuleName + \
                                               '.'      + \
                                               self.Rule.upper()
                        Severity: Minor
                        Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py and 1 other location - About 45 mins to fix
                        BaseTools/Source/Python/GenFds/FfsInfStatement.py on lines 427..430

                        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

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

                                    if self.Rule != None:
                                        RuleName = RuleName + \
                                                   '.'      + \
                                                   self.Rule.upper()
                        Severity: Minor
                        Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py and 1 other location - About 45 mins to fix
                        BaseTools/Source/Python/GenFds/FfsInfStatement.py on lines 443..446

                        Duplicated Code

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

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

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

                        Tuning

                        This issue has a mass of 35.

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

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

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

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

                        Refactorings

                        Further Reading

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

                                        if not os.path.exists(InfPath):
                                            EdkLogger.error("GenFds", GENFDS_ERROR, "Non-existant Module %s !" % (self.InfFileName))
                        Severity: Minor
                        Found in BaseTools/Source/Python/GenFds/FfsInfStatement.py and 1 other location - About 45 mins to fix
                        BaseTools/Source/Python/AutoGen/AutoGen.py on lines 398..399

                        Duplicated Code

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

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

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

                        Tuning

                        This issue has a mass of 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

                        There are no issues that match your filters.

                        Category
                        Status