hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

Function __GetLeafSection has a Cognitive Complexity of 97 (exceeds 5 allowed). Consider refactoring.
Open

    def __GetLeafSection(self, Obj, MacroDict = {}):
        
        OldPos = self.GetFileBufferPos()
        
        if not self.__IsKeyword( "SECTION"):
Severity: Minor
Found in BaseTools/Source/Python/Common/FdfParserLite.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 main has a Cognitive Complexity of 97 (exceeds 5 allowed). Consider refactoring.
Open

def main():
    global Options
    Options = myOptionParser()

    global Workspace
Severity: Minor
Found in BaseTools/Source/Python/GenFds/GenFds.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 __GetLeafSection has a Cognitive Complexity of 97 (exceeds 5 allowed). Consider refactoring.
Open

    def __GetLeafSection(self, Obj, MacroDict = {}):

        OldPos = self.GetFileBufferPos()

        if not self.__IsKeyword( "SECTION"):
Severity: Minor
Found in BaseTools/Source/Python/GenFds/FdfParser.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 __init__ has a Cognitive Complexity of 97 (exceeds 5 allowed). Consider refactoring.
Open

    def __init__(self, Wa):
        self._MapFileName = os.path.join(Wa.BuildDir, Wa.Name + ".map")
        self._MapFileParsed = False
        self._EotToolInvoked = False
        self._FvDir = Wa.FvDir
Severity: Minor
Found in BaseTools/Source/Python/build/BuildReport.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 CheckFileHeaderDoxygenComments has a Cognitive Complexity of 97 (exceeds 5 allowed). Consider refactoring.
Open

def CheckFileHeaderDoxygenComments(FullFileName):
    ErrorMsgList = []

    FileID = GetTableID(FullFileName, ErrorMsgList)
    if FileID < 0:
Severity: Minor
Found in BaseTools/Source/Python/Ecc/c.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 generate_tokens has a Cognitive Complexity of 97 (exceeds 5 allowed). Consider refactoring.
Open

def generate_tokens(readline):
    """
    The generate_tokens() generator requires one argment, readline, which
    must be a callable object which provides the same interface as the
    readline() method of built-in file objects. Each call to the function
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/tokenize.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 generate_tokens has a Cognitive Complexity of 97 (exceeds 5 allowed). Consider refactoring.
Open

def generate_tokens(readline):
    """
    The generate_tokens() generator requires one argment, readline, which
    must be a callable object which provides the same interface as the
    readline() method of built-in file objects. Each call to the function
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/tokenize.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 rfc822.py has 811 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"""RFC 2822 message manipulation.

Note: This is only a very rough sketch of a full RFC-822 parser; in particular
the tokenizing of addresses does not adhere to all the quoting rules.
Severity: Major
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/rfc822.py - About 1 day to fix

    File rfc822.py has 811 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    """RFC 2822 message manipulation.
    
    Note: This is only a very rough sketch of a full RFC-822 parser; in particular
    the tokenizing of addresses does not adhere to all the quoting rules.
    
    Severity: Major
    Found in vector-uefi/fd/efi/StdLib/lib/python.27/rfc822.py - About 1 day to fix

      Function reduce_tree has a Cognitive Complexity of 96 (exceeds 5 allowed). Consider refactoring.
      Open

      def reduce_tree(node, parent=None):
          """
          Internal function. Reduces a compiled pattern tree to an
          intermediate representation suitable for feeding the
          automaton. This also trims off any optional pattern elements(like
      Severity: Minor
      Found in AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/btm_utils.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 reduce_tree has a Cognitive Complexity of 96 (exceeds 5 allowed). Consider refactoring.
      Open

      def reduce_tree(node, parent=None):
          """
          Internal function. Reduces a compiled pattern tree to an
          intermediate representation suitable for feeding the
          automaton. This also trims off any optional pattern elements(like
      Severity: Minor
      Found in vector-uefi/fd/efi/StdLib/lib/python.27/lib2to3/btm_utils.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

      Pdb has 100 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class Pdb(bdb.Bdb, cmd.Cmd):
      
          def __init__(self, completekey='tab', stdin=None, stdout=None, skip=None):
              bdb.Bdb.__init__(self, skip=skip)
              cmd.Cmd.__init__(self, completekey, stdin, stdout)
      Severity: Major
      Found in AppPkg/Applications/Python/Python-2.7.2/Lib/pdb.py - About 1 day to fix

        Pdb has 100 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class Pdb(bdb.Bdb, cmd.Cmd):
        
            def __init__(self, completekey='tab', stdin=None, stdout=None, skip=None):
                bdb.Bdb.__init__(self, skip=skip)
                cmd.Cmd.__init__(self, completekey, stdin, stdout)
        Severity: Major
        Found in vector-uefi/fd/efi/StdLib/lib/python.27/pdb.py - About 1 day to fix

          Function GetVarInfo has a Cognitive Complexity of 95 (exceeds 5 allowed). Consider refactoring.
          Open

          def GetVarInfo(PredVarList, FuncRecord, FullFileName, IsFuncCall=False, TargetType=None, StarList=None):
          
              PredVar = PredVarList[0]
              FileID = GetTableID(FullFileName)
          
          Severity: Minor
          Found in BaseTools/Source/Python/Ecc/c.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 mFLOATING_POINT_LITERAL has a Cognitive Complexity of 95 (exceeds 5 allowed). Consider refactoring.
          Open

              def mFLOATING_POINT_LITERAL(self, ):
          
                  try:
                      self.type = FLOATING_POINT_LITERAL
          
          Severity: Minor
          Found in BaseTools/Source/Python/Ecc/CLexer.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 mFLOATING_POINT_LITERAL has a Cognitive Complexity of 95 (exceeds 5 allowed). Consider refactoring.
          Open

              def mFLOATING_POINT_LITERAL(self, ):
          
                  try:
                      self.type = FLOATING_POINT_LITERAL
          
          Severity: Minor
          Found in BaseTools/Source/Python/Eot/CLexer.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 xmllib.py has 794 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          """A parser for XML, using the derived class as static DTD."""
          
          # Author: Sjoerd Mullender.
          
          import re
          Severity: Major
          Found in AppPkg/Applications/Python/Python-2.7.2/Lib/xmllib.py - About 1 day to fix

            File xmllib.py has 794 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            """A parser for XML, using the derived class as static DTD."""
            
            # Author: Sjoerd Mullender.
            
            import re
            Severity: Major
            Found in vector-uefi/fd/efi/StdLib/lib/python.27/xmllib.py - About 1 day to fix

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

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

                File expatbuilder.py has 785 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                """Facility to use the Expat parser to load a minidom instance
                from a string or file.
                
                This avoids all the overhead of SAX and pulldom to gain performance.
                """
                Severity: Major
                Found in AppPkg/Applications/Python/Python-2.7.2/Lib/xml/dom/expatbuilder.py - About 1 day to fix
                  Severity
                  Category
                  Status
                  Source
                  Language