hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

Context has 75 functions (exceeds 20 allowed). Consider refactoring.
Open

class Context(object):
    """Contains the context for a Decimal instance.

    Contains:
    prec - precision (for use in rounding, division, square roots..)
Severity: Major
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/decimal.py - About 1 day to fix

    Context has 75 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Context(object):
        """Contains the context for a Decimal instance.
    
        Contains:
        prec - precision (for use in rounding, division, square roots..)
    Severity: Major
    Found in vector-uefi/fd/efi/StdLib/lib/python.27/decimal.py - About 1 day to fix

      Function LoadToolDefFile has a Cognitive Complexity of 70 (exceeds 5 allowed). Consider refactoring.
      Open

          def LoadToolDefFile(self, FileName):
              FileContent = []
              if os.path.isfile(FileName):
                  try:
                      F = open(FileName,'r')
      Severity: Minor
      Found in BaseTools/Source/Python/Common/ToolDefClassObject.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 parse_starttag has a Cognitive Complexity of 70 (exceeds 5 allowed). Consider refactoring.
      Open

          def parse_starttag(self, i):
              rawdata = self.rawdata
              # i points to start of tag
              end = endbracketfind.match(rawdata, i+1)
              if end is None:
      Severity: Minor
      Found in AppPkg/Applications/Python/Python-2.7.2/Lib/xmllib.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 parse_starttag has a Cognitive Complexity of 70 (exceeds 5 allowed). Consider refactoring.
      Open

          def parse_starttag(self, i):
              rawdata = self.rawdata
              # i points to start of tag
              end = endbracketfind.match(rawdata, i+1)
              if end is None:
      Severity: Minor
      Found in vector-uefi/fd/efi/StdLib/lib/python.27/xmllib.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 trace.py has 624 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      #!/usr/bin/env python
      
      # portions copyright 2001, Autonomous Zones Industries, Inc., all rights...
      # err...  reserved and offered to the public under the terms of the
      # Python 2.2 license.
      Severity: Major
      Found in AppPkg/Applications/Python/Python-2.7.2/Lib/trace.py - About 1 day to fix

        File trace.py has 624 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        #!/usr/bin/env python
        
        # portions copyright 2001, Autonomous Zones Industries, Inc., all rights...
        # err...  reserved and offered to the public under the terms of the
        # Python 2.2 license.
        Severity: Major
        Found in vector-uefi/fd/efi/StdLib/lib/python.27/trace.py - About 1 day to fix

          Function Main has a Cognitive Complexity of 69 (exceeds 5 allowed). Consider refactoring.
          Open

          def Main():
              StartTime = time.time()
          
              # Initialize log system
              EdkLogger.Initialize()
          Severity: Minor
          Found in BaseTools/Source/Python/build/build.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 process has a Cognitive Complexity of 69 (exceeds 5 allowed). Consider refactoring.
          Open

          def process(fpi, fpo):
              keywords = ('if', 'ifdef', 'ifndef', 'else', 'endif')
              ok = 1
              stack = []
              while 1:
          Severity: Minor
          Found in AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/ifdef.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 message.py has 616 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          # Copyright (C) 2001-2006 Python Software Foundation
          # Author: Barry Warsaw
          # Contact: email-sig@python.org
          
          """Basic message object for the email package object model."""
          Severity: Major
          Found in AppPkg/Applications/Python/Python-2.7.2/Lib/email/message.py - About 1 day to fix

            File message.py has 616 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            # Copyright (C) 2001-2006 Python Software Foundation
            # Author: Barry Warsaw
            # Contact: email-sig@python.org
            
            """Basic message object for the email package object model."""
            Severity: Major
            Found in vector-uefi/fd/efi/StdLib/lib/python.27/email/message.py - About 1 day to fix

              Function declarator_suffix has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring.
              Open

                  def declarator_suffix(self, ):
              
                      declarator_suffix_StartIndex = self.input.index()
                      try:
                          try:
              Severity: Minor
              Found in BaseTools/Source/Python/Ecc/CParser.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 declarator_suffix has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring.
              Open

                  def declarator_suffix(self, ):
              
                      declarator_suffix_StartIndex = self.input.index()
                      try:
                          try:
              Severity: Minor
              Found in BaseTools/Source/Python/Eot/CParser.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 makeunicodedata has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring.
              Open

              def makeunicodedata(unicode, trace):
              
                  dummy = (0, 0, 0, 0, 0, 0)
                  table = [dummy]
                  cache = {0: dummy}

              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

              Consider simplifying this complex logical expression.
              Open

                                  if LA38 == 66:
                                      LA38_2 = self.input.LA(3)
              
                                      if (self.synpred78()) :
                                          alt38 = 2
              Severity: Critical
              Found in BaseTools/Source/Python/Ecc/CParser.py - About 1 day to fix

                Consider simplifying this complex logical expression.
                Open

                                    if LA74 == 64:
                                        LA74_13 = self.input.LA(3)
                
                                        if (self.synpred142()) :
                                            alt74 = 1
                Severity: Critical
                Found in BaseTools/Source/Python/Ecc/CParser.py - About 1 day to fix

                  Consider simplifying this complex logical expression.
                  Open

                                      if LA74 == 64:
                                          LA74_73 = self.input.LA(3)
                  
                                          if (self.synpred142()) :
                                              alt74 = 1
                  Severity: Critical
                  Found in BaseTools/Source/Python/Ecc/CParser.py - About 1 day to fix

                    Consider simplifying this complex logical expression.
                    Open

                                        if LA74 == 64:
                                            LA74_131 = self.input.LA(3)
                    
                                            if (self.synpred142()) :
                                                alt74 = 1
                    Severity: Critical
                    Found in BaseTools/Source/Python/Ecc/CParser.py - About 1 day to fix

                      Consider simplifying this complex logical expression.
                      Open

                                          if LA74 == IDENTIFIER:
                                              LA74_160 = self.input.LA(3)
                      
                                              if (self.synpred142()) :
                                                  alt74 = 1
                      Severity: Critical
                      Found in BaseTools/Source/Python/Ecc/CParser.py - About 1 day to fix

                        Consider simplifying this complex logical expression.
                        Open

                                            if LA74 == 64:
                                                LA74_191 = self.input.LA(3)
                        
                                                if (self.synpred142()) :
                                                    alt74 = 1
                        Severity: Critical
                        Found in BaseTools/Source/Python/Ecc/CParser.py - About 1 day to fix
                          Severity
                          Category
                          Status
                          Source
                          Language