hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

Function makeunicodename has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
Open

def makeunicodename(unicode, trace):

    FILE = "Modules/unicodename_db.h"

    print "--- Preparing", FILE, "..."

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 expand has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
Open

    def expand(self, text):
        stack = []
        i = 0
        n = len(text)
        while i < n:
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/texi2html.py - About 6 hrs to fix

Cognitive Complexity

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

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

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

Further reading

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

    def __init__ (self, attrs=None):
        """Construct a new Distribution instance: initialize all the
        attributes of a Distribution, and then use 'attrs' (a dictionary
        mapping attribute names to values) to assign some of those
        attributes their "real" values.  (Any attributes not mentioned in
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/dist.py - About 6 hrs to fix

Cognitive Complexity

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

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

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

Further reading

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

    def __init__ (self, attrs=None):
        """Construct a new Distribution instance: initialize all the
        attributes of a Distribution, and then use 'attrs' (a dictionary
        mapping attribute names to values) to assign some of those
        attributes their "real" values.  (Any attributes not mentioned in
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/distutils/dist.py - About 6 hrs to fix

Cognitive Complexity

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

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

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

Further reading

Method CodeOneBlock has 152 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public void CodeOneBlock(long[] inSize, long[] outSize, boolean[] finished) throws IOException
    {
        inSize[0] = 0;
        outSize[0] = 0;
        finished[0] = true;
Severity: Major
Found in vector-uefi/insyde/7zip/Java/SevenZip/Compression/LZMA/Encoder.java - About 6 hrs to fix

    File bdist_rpm.py has 420 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    """distutils.command.bdist_rpm
    
    Implements the Distutils 'bdist_rpm' command (create RPM source and binary
    distributions)."""
    

      File bdist_rpm.py has 420 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      """distutils.command.bdist_rpm
      
      Implements the Distutils 'bdist_rpm' command (create RPM source and binary
      distributions)."""
      

        File wave.py has 419 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        """Stuff to parse WAVE files.
        
        Usage.
        
        Reading WAVE files:
        Severity: Minor
        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/wave.py - About 6 hrs to fix

          File wave.py has 419 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          """Stuff to parse WAVE files.
          
          Usage.
          
          Reading WAVE files:
          Severity: Minor
          Found in vector-uefi/fd/efi/StdLib/lib/python.27/wave.py - About 6 hrs to fix

            File sgmllib.py has 418 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            """A parser for SGML, using the derived class as a static DTD."""
            
            # XXX This only supports those SGML features used by HTML.
            
            # XXX There should be a way to distinguish between PCDATA (parsed
            Severity: Minor
            Found in AppPkg/Applications/Python/Python-2.7.2/Lib/sgmllib.py - About 6 hrs to fix

              File sgmllib.py has 418 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              """A parser for SGML, using the derived class as a static DTD."""
              
              # XXX This only supports those SGML features used by HTML.
              
              # XXX There should be a way to distinguish between PCDATA (parsed
              Severity: Minor
              Found in vector-uefi/fd/efi/StdLib/lib/python.27/sgmllib.py - About 6 hrs to fix

                File uuid.py has 417 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                r"""UUID objects (universally unique identifiers) according to RFC 4122.
                
                This module provides immutable UUID objects (class UUID) and the functions
                uuid1(), uuid3(), uuid4(), uuid5() for generating version 1, 3, 4, and 5
                UUIDs as specified in RFC 4122.
                Severity: Minor
                Found in AppPkg/Applications/Python/Python-2.7.2/Lib/uuid.py - About 6 hrs to fix

                  File tokenize.py has 417 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Python Software Foundation.
                  # All rights reserved.
                  
                  """Tokenization help for Python programs.
                  
                  Severity: Minor
                  Found in AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/pgen2/tokenize.py - About 6 hrs to fix

                    File uuid.py has 417 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    r"""UUID objects (universally unique identifiers) according to RFC 4122.
                    
                    This module provides immutable UUID objects (class UUID) and the functions
                    uuid1(), uuid3(), uuid4(), uuid5() for generating version 1, 3, 4, and 5
                    UUIDs as specified in RFC 4122.
                    Severity: Minor
                    Found in vector-uefi/fd/efi/StdLib/lib/python.27/uuid.py - About 6 hrs to fix

                      File tokenize.py has 417 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Python Software Foundation.
                      # All rights reserved.
                      
                      """Tokenization help for Python programs.
                      
                      Severity: Minor
                      Found in vector-uefi/fd/efi/StdLib/lib/python.27/lib2to3/pgen2/tokenize.py - About 6 hrs to fix

                        File faqconf.py has 415 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        """FAQ Wizard customization module.
                        
                        Edit this file to customize the FAQ Wizard.  For normal purposes, you
                        should only have to change the FAQ section titles and the small group
                        of parameters below it.
                        Severity: Minor
                        Found in AppPkg/Applications/Python/Python-2.7.2/Tools/faqwiz/faqconf.py - About 5 hrs to fix

                          File smtpd.py has 414 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          #! /usr/bin/env python
                          """An RFC 2821 smtp proxy.
                          
                          Usage: %(program)s [options] [localhost:localport [remotehost:remoteport]]
                          
                          Severity: Minor
                          Found in AppPkg/Applications/Python/Python-2.7.2/Lib/smtpd.py - About 5 hrs to fix

                            File smtpd.py has 414 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            #! /usr/bin/env python
                            """An RFC 2821 smtp proxy.
                            
                            Usage: %(program)s [options] [localhost:localport [remotehost:remoteport]]
                            
                            Severity: Minor
                            Found in vector-uefi/fd/efi/StdLib/lib/python.27/smtpd.py - About 5 hrs to fix

                              Function __GetInfOptions has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def __GetInfOptions(self, FfsInfObj):
                                      
                                      if self.__IsKeyword( "RuleOverride"):
                                          if not self.__IsToken( "="):
                                              raise Warning("expected '=' At Line ", self.FileName, self.CurrentLineNumber)
                              Severity: Minor
                              Found in BaseTools/Source/Python/Common/FdfParserLite.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 _GetIncludes has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def _GetIncludes(self):
                                      if self._Includes == None:
                                          self._Includes = []
                                          if self._SourceOverridePath:
                                              self._Includes.append(self._SourceOverridePath)
                              Severity: Minor
                              Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.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