hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

PlatformAutoGen has 39 functions (exceeds 20 allowed). Consider refactoring.
Open

class PlatformAutoGen(AutoGen):
    #
    # Used to store all PCDs for both PEI and DXE phase, in order to generate 
    # correct PCD database
    # 
Severity: Minor
Found in BaseTools/Source/Python/AutoGen/AutoGen.py - About 5 hrs to fix

    File gzip.py has 380 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    """Functions that read and write gzipped files.
    
    The user of the file doesn't have to worry about the compression,
    but random access is not allowed."""
    
    Severity: Minor
    Found in AppPkg/Applications/Python/Python-2.7.2/Lib/gzip.py - About 5 hrs to fix

      File gzip.py has 380 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      """Functions that read and write gzipped files.
      
      The user of the file doesn't have to worry about the compression,
      but random access is not allowed."""
      
      Severity: Minor
      Found in vector-uefi/fd/efi/StdLib/lib/python.27/gzip.py - About 5 hrs to fix

        File wcgui.py has 379 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        #! /usr/bin/env python
        
        """GUI interface to webchecker.
        
        This works as a Grail applet too!  E.g.
        Severity: Minor
        Found in AppPkg/Applications/Python/Python-2.7.2/Tools/webchecker/wcgui.py - About 5 hrs to fix

          File encoder.py has 379 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          """Implementation of JSONEncoder
          """
          import re
          
          try:
          Severity: Minor
          Found in AppPkg/Applications/Python/Python-2.7.2/Lib/json/encoder.py - About 5 hrs to fix

            File encoder.py has 379 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            """Implementation of JSONEncoder
            """
            import re
            
            try:
            Severity: Minor
            Found in vector-uefi/fd/efi/StdLib/lib/python.27/json/encoder.py - About 5 hrs to fix

              Function GenIncludes has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
              Open

                  def GenIncludes(self, ContainerFile):
                      if ContainerFile:
                          pass
                      Logger.Debug(2, "Generate %s ..." % TAB_INCLUDES)
                      IncludesDict = Sdict()
              Severity: Minor
              Found in BaseTools/Source/Python/UPT/PomAdapter/DecPomAlignment.py - About 5 hrs to fix

              Cognitive Complexity

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

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

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

              Further reading

              Function GenPcds has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
              Open

                  def GenPcds(self, ContainerFile):
                      EdkLogger.debug(2, "Generate %s ..." % TAB_PCDS)
                      Pcds = {}
                      PcdToken = {}
              
              Severity: Minor
              Found in BaseTools/Source/Python/Common/InfClassObject.py - About 5 hrs to fix

              Cognitive Complexity

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

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

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

              Further reading

              Function GenAsBuiltPcdExSections has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
              Open

              def GenAsBuiltPcdExSections(ModuleObject):
                  PcdExDict = {}
                  for BinaryFile in ModuleObject.GetBinaryFileList():
                      if not BinaryFile.AsBuiltList:
                          continue   
              Severity: Minor
              Found in BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py - About 5 hrs to fix

              Cognitive Complexity

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

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

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

              Further reading

              Function IsValidPcdValue has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
              Open

              def IsValidPcdValue(PcdValue):
                  for Char in PcdValue:
                      if Char == '\n' or Char == '\t' or Char == '\f':
                          return False
                      
              Severity: Minor
              Found in BaseTools/Source/Python/UPT/Library/ParserValidate.py - About 5 hrs to fix

              Cognitive Complexity

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

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

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

              Further reading

              Function GetSingleValueOfKeyFromLines has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
              Open

              def GetSingleValueOfKeyFromLines(Lines, Dictionary, CommentCharacter, KeySplitCharacter, \
                                               ValueSplitFlag, ValueSplitCharacter):
                  Lines = Lines.split('\n')
                  Keys = []
                  Value = ''
              Severity: Minor
              Found in BaseTools/Source/Python/UPT/Library/String.py - About 5 hrs to fix

              Cognitive Complexity

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

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

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

              Further reading

              Function InfDefineParser has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
              Open

                  def InfDefineParser(self, SectionString, InfSectionObject, FileName, SectionComment):
                      
                      if SectionComment:
                          pass
                      #
              Severity: Minor
              Found in BaseTools/Source/Python/UPT/Parser/InfDefineSectionParser.py - About 5 hrs to fix

              Cognitive Complexity

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

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

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

              Further reading

              Function SetDefines has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
              Open

                  def SetDefines(self, DefineContent, Arch = None):
                      #
                      # Validate Arch
                      #
                      HasFoundInfVersionFalg = False
              Severity: Minor
              Found in BaseTools/Source/Python/UPT/Object/Parser/InfDefineObject.py - About 5 hrs to fix

              Cognitive Complexity

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

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

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

              Further reading

              Function _SectionHeaderParser has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
              Open

                  def _SectionHeaderParser(self):
                      if self._RawData.CurrentLine[0] != DT.TAB_SECTION_START or self._RawData.CurrentLine[-1] != DT.TAB_SECTION_END:
                          self._LoggerError(ST.ERR_DECPARSE_SECTION_IDENTIFY)
                      
                      RawSection = self._RawData.CurrentLine[1:-1].strip().upper()
              Severity: Minor
              Found in BaseTools/Source/Python/UPT/Parser/DecParser.py - About 5 hrs to fix

              Cognitive Complexity

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

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

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

              Further reading

              Function DisplayFvSpaceInfo has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
              Open

                  def DisplayFvSpaceInfo(FdfParser):
                      
                      FvSpaceInfoList = []
                      MaxFvNameLength = 0
                      for FvName in FdfParser.Profile.FvDict:
              Severity: Minor
              Found in BaseTools/Source/Python/GenFds/GenFds.py - About 5 hrs to fix

              Cognitive Complexity

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

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

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

              Further reading

              Function _ApplyBuildRule has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
              Open

                  def _ApplyBuildRule(self, File, FileType):
                      if self._BuildTargets == None:
                          self._IntroBuildTargetList = set()
                          self._FinalBuildTargetList = set()
                          self._BuildTargets = {}
              Severity: Minor
              Found in BaseTools/Source/Python/AutoGen/AutoGen.py - About 5 hrs to fix

              Cognitive Complexity

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

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

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

              Further reading

              Function _GetDepexTokenList has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
              Open

                  def _GetDepexTokenList(self):
                      if self._DepexList == None:
                          self._DepexList = {}
                          if self.DxsFile or self.IsLibrary or TAB_DEPENDENCY_EXPRESSION_FILE in self.FileTypes:
                              return self._DepexList
              Severity: Minor
              Found in BaseTools/Source/Python/AutoGen/AutoGen.py - About 5 hrs to fix

              Cognitive Complexity

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

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

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

              Further reading

              Function asm2_statement has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
              Open

                  def asm2_statement(self, ):
              
                      asm2_statement_StartIndex = self.input.index()
                      try:
                          try:
              Severity: Minor
              Found in BaseTools/Source/Python/Ecc/CParser.py - About 5 hrs to fix

              Cognitive Complexity

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

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

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

              Further reading

              Function asm2_statement has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
              Open

                  def asm2_statement(self, ):
              
                      asm2_statement_StartIndex = self.input.index()
                      try:
                          try:
              Severity: Minor
              Found in BaseTools/Source/Python/Eot/CParser.py - About 5 hrs to fix

              Cognitive Complexity

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

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

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

              Further reading

              Function _parseGeneral has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
              Open

              def _parseGeneral(lines, efifilepath):
                  """ For MSFT, ICC, EBC 
                  @param lines    line array for map file
                  
                  @return a list which element hold (PcdName, Offset, SectionName)
              Severity: Minor
              Found in BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py - About 5 hrs to fix

              Cognitive Complexity

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

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

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

              Further reading

              Severity
              Category
              Status
              Source
              Language