hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

ExpatParser has 30 functions (exceeds 20 allowed). Consider refactoring.
Open

class ExpatParser(xmlreader.IncrementalParser, xmlreader.Locator):
    """SAX driver for the pyexpat C module."""

    def __init__(self, namespaceHandling=0, bufsize=2**16-20):
        xmlreader.IncrementalParser.__init__(self, bufsize)
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/xml/sax/expatreader.py - About 3 hrs to fix

    Mailbox has 30 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Mailbox:
        """A group of messages in a particular place."""
    
        def __init__(self, path, factory=None, create=True):
            """Initialize a Mailbox instance."""
    Severity: Minor
    Found in AppPkg/Applications/Python/Python-2.7.2/Lib/mailbox.py - About 3 hrs to fix

      Distribution has 30 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class Distribution:
          """The core of the Distutils.  Most of the work hiding behind 'setup'
          is really done within a Distribution instance, which farms the work out
          to the Distutils commands specified on the command line.
      
      Severity: Minor
      Found in AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/dist.py - About 3 hrs to fix

        Command has 30 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class Command:
            """Abstract base class for defining command classes, the "worker bees"
            of the Distutils.  A useful analogy for command classes is to think of
            them as subroutines with local variables called "options".  The options
            are "declared" in 'initialize_options()' and "defined" (given their
        Severity: Minor
        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/cmd.py - About 3 hrs to fix

          DistributionMetadata has 30 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class DistributionMetadata:
              """Dummy class to hold the distribution meta-data: name, version,
              author, and so forth.
              """
          
          Severity: Minor
          Found in AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/dist.py - About 3 hrs to fix

            dispatcher has 30 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class dispatcher:
            
                debug = False
                connected = False
                accepting = False
            Severity: Minor
            Found in vector-uefi/fd/efi/StdLib/lib/python.27/asyncore.py - About 3 hrs to fix

              Mailbox has 30 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class Mailbox:
                  """A group of messages in a particular place."""
              
                  def __init__(self, path, factory=None, create=True):
                      """Initialize a Mailbox instance."""
              Severity: Minor
              Found in vector-uefi/fd/efi/StdLib/lib/python.27/mailbox.py - About 3 hrs to fix

                ExpatParser has 30 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class ExpatParser(xmlreader.IncrementalParser, xmlreader.Locator):
                    """SAX driver for the pyexpat C module."""
                
                    def __init__(self, namespaceHandling=0, bufsize=2**16-20):
                        xmlreader.IncrementalParser.__init__(self, bufsize)
                Severity: Minor
                Found in vector-uefi/fd/efi/StdLib/lib/python.27/xml/sax/expatreader.py - About 3 hrs to fix

                  DistributionMetadata has 30 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  class DistributionMetadata:
                      """Dummy class to hold the distribution meta-data: name, version,
                      author, and so forth.
                      """
                  
                  Severity: Minor
                  Found in vector-uefi/fd/efi/StdLib/lib/python.27/distutils/dist.py - About 3 hrs to fix

                    Command has 30 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    class Command:
                        """Abstract base class for defining command classes, the "worker bees"
                        of the Distutils.  A useful analogy for command classes is to think of
                        them as subroutines with local variables called "options".  The options
                        are "declared" in 'initialize_options()' and "defined" (given their
                    Severity: Minor
                    Found in vector-uefi/fd/efi/StdLib/lib/python.27/distutils/cmd.py - About 3 hrs to fix

                      Distribution has 30 functions (exceeds 20 allowed). Consider refactoring.
                      Open

                      class Distribution:
                          """The core of the Distutils.  Most of the work hiding behind 'setup'
                          is really done within a Distribution instance, which farms the work out
                          to the Distutils commands specified on the command line.
                      
                      Severity: Minor
                      Found in vector-uefi/fd/efi/StdLib/lib/python.27/distutils/dist.py - About 3 hrs to fix

                        Class Encoder has 30 methods (exceeds 20 allowed). Consider refactoring.
                        Open

                            public class Encoder : ICoder, ISetCoderProperties, IWriteCoderProperties
                            {
                                enum EMatchFinderType
                                {
                                    BT2,
                        Severity: Minor
                        Found in vector-uefi/insyde/7zip/CS/7zip/Compress/LZMA/LzmaEncoder.cs - About 3 hrs to fix

                          File pgen.py has 319 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          # Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved.
                          # Licensed to PSF under a Contributor Agreement.
                          
                          # Pgen imports
                          from . import grammar, token, tokenize
                          Severity: Minor
                          Found in AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/pgen2/pgen.py - About 3 hrs to fix

                            File pgen.py has 319 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            # Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved.
                            # Licensed to PSF under a Contributor Agreement.
                            
                            # Pgen imports
                            from . import grammar, token, tokenize
                            Severity: Minor
                            Found in vector-uefi/fd/efi/StdLib/lib/python.27/lib2to3/pgen2/pgen.py - About 3 hrs to fix

                              File asdl.py has 318 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              """An implementation of the Zephyr Abstract Syntax Definition Language.
                              
                              See http://asdl.sourceforge.net/ and
                              http://www.cs.princeton.edu/research/techreps/TR-554-97
                              
                              Severity: Minor
                              Found in AppPkg/Applications/Python/Python-2.7.2/Parser/asdl.py - About 3 hrs to fix

                                File validate.py has 316 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                # (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org)
                                # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
                                # Also licenced under the Apache License, 2.0: http://opensource.org/licenses/apache2.0.php
                                # Licensed to PSF under a Contributor Agreement
                                """
                                Severity: Minor
                                Found in AppPkg/Applications/Python/Python-2.7.2/Lib/wsgiref/validate.py - About 3 hrs to fix

                                  File validate.py has 316 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  # (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org)
                                  # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
                                  # Also licenced under the Apache License, 2.0: http://opensource.org/licenses/apache2.0.php
                                  # Licensed to PSF under a Contributor Agreement
                                  """
                                  Severity: Minor
                                  Found in vector-uefi/fd/efi/StdLib/lib/python.27/wsgiref/validate.py - About 3 hrs to fix

                                    Function GenLibraryClasses has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        def GenLibraryClasses(self, ContainerFile):
                                            EdkLogger.debug(2, "Generate %s ..." % TAB_LIBRARY_CLASSES)
                                            LibraryClasses = {}
                                            #
                                            # Get all include files
                                    Severity: Minor
                                    Found in BaseTools/Source/Python/Common/DscClassObject.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 _GenGuidProtocolPpis has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        def _GenGuidProtocolPpis(self, Type):
                                            Logger.Debug(2, "Generate %s ..." % Type)
                                            #
                                            # Get all Guid/Protocol/Ppis data
                                            #
                                    Severity: Minor
                                    Found in BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.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 ShowWorkspaceBuild has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        def ShowWorkspaceBuild(self):
                                            print self.DscDatabase
                                            print self.InfDatabase
                                            print self.DecDatabase
                                            print 'SupArchList', self.SupArchList
                                    Severity: Minor
                                    Found in BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.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

                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language