hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

Function get_python_lib has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
    """Return the directory containing the Python library (standard or
    site additions).

    If 'plat_specific' is true, return the directory containing
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/distutils/sysconfig.py - About 2 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 getmodule has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

def getmodule(object, _filename=None):
    """Return the module an object was defined in, or None if not found."""
    if ismodule(object):
        return object
    if hasattr(object, '__module__'):
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/inspect.py - About 2 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 copytree has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

def copytree(src, dst, symlinks=False, ignore=None):
    """Recursively copy a directory tree using copy2().

    The destination directory must not already exist.
    If exception(s) occur, an Error is raised with a list of reasons.
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/shutil.py - About 2 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 _parse_format_specifier has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

def _parse_format_specifier(format_spec, _localeconv=None):
    """Parse and validate a format specifier.

    Turns a standard numeric format specifier into a dict, with the
    following entries:
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/decimal.py - About 2 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 fma has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    def fma(self, other, third, context=None):
        """Fused multiply-add.

        Returns self*other+third with no rounding of the intermediate
        product self*other.
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/decimal.py - About 2 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

File numbers.py has 281 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.

"""Abstract Base Classes (ABCs) for numbers, according to PEP 3141.
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/numbers.py - About 2 hrs to fix

    File numbers.py has 281 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    # Copyright 2007 Google, Inc. All Rights Reserved.
    # Licensed to PSF under a Contributor Agreement.
    
    """Abstract Base Classes (ABCs) for numbers, according to PEP 3141.
    
    Severity: Minor
    Found in vector-uefi/fd/efi/StdLib/lib/python.27/numbers.py - About 2 hrs to fix

      Method Parse has 68 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              public boolean Parse(String[] args) throws Exception
              {
                  int pos = 0;
                  boolean switchMode = true;
                  for (int i = 0; i < args.length; i++)
      Severity: Major
      Found in vector-uefi/insyde/7zip/Java/SevenZip/LzmaAlone.java - About 2 hrs to fix

        Function _Init has 68 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def _Init(self, Workspace, ModuleFile, Target, Toolchain, Arch, PlatformFile):
                EdkLogger.debug(EdkLogger.DEBUG_9, "AutoGen module [%s] [%s]" % (ModuleFile, Arch))
                GlobalData.gProcessingFile = "%s [%s, %s, %s]" % (ModuleFile, Arch, Toolchain, Target)
        
                self.Workspace = Workspace
        Severity: Major
        Found in BaseTools/Source/Python/AutoGen/AutoGen.py - About 2 hrs to fix

          File DecObject.py has 279 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          ## @file
          # This file is used to define class objects for DEC file. It will consumed by 
          #DecParser
          #
          # Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
          Severity: Minor
          Found in BaseTools/Source/Python/UPT/Object/Parser/DecObject.py - About 2 hrs to fix

            File posixpath.py has 278 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            """Common operations on Posix pathnames.
            
            Instead of importing this module directly, import os and refer to
            this module as os.path.  The "os.path" name is an alias for this
            module on Posix systems; on other systems (e.g. Mac, Windows),
            Severity: Minor
            Found in AppPkg/Applications/Python/Python-2.7.2/Lib/posixpath.py - About 2 hrs to fix

              File stringold.py has 278 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              # module 'string' -- A collection of string operations
              
              # Warning: most of the code you see here isn't normally used nowadays.  With
              # Python 1.6, many of these functions are implemented as methods on the
              # standard string object. They used to be implemented by a built-in module
              Severity: Minor
              Found in AppPkg/Applications/Python/Python-2.7.2/Lib/stringold.py - About 2 hrs to fix

                File config.py has 278 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                """distutils.command.config
                
                Implements the Distutils 'config' command, a (mostly) empty command class
                that exists mainly to be sub-classed by specific module distributions and
                applications.  The idea is that while every "config" command is different,

                  File posixpath.py has 278 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  """Common operations on Posix pathnames.
                  
                  Instead of importing this module directly, import os and refer to
                  this module as os.path.  The "os.path" name is an alias for this
                  module on Posix systems; on other systems (e.g. Mac, Windows),
                  Severity: Minor
                  Found in vector-uefi/fd/efi/StdLib/lib/python.27/posixpath.py - About 2 hrs to fix

                    File stringold.py has 278 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    # module 'string' -- A collection of string operations
                    
                    # Warning: most of the code you see here isn't normally used nowadays.  With
                    # Python 1.6, many of these functions are implemented as methods on the
                    # standard string object. They used to be implemented by a built-in module
                    Severity: Minor
                    Found in vector-uefi/fd/efi/StdLib/lib/python.27/stringold.py - About 2 hrs to fix

                      File config.py has 278 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      """distutils.command.config
                      
                      Implements the Distutils 'config' command, a (mostly) empty command class
                      that exists mainly to be sub-classed by specific module distributions and
                      applications.  The idea is that while every "config" command is different,
                      Severity: Minor
                      Found in vector-uefi/fd/efi/StdLib/lib/python.27/distutils/command/config.py - About 2 hrs to fix

                        GzipFile has 24 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        class GzipFile(io.BufferedIOBase):
                            """The GzipFile class simulates most of the methods of a file object with
                            the exception of the readinto() and truncate() methods.
                        
                            """
                        Severity: Minor
                        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/gzip.py - About 2 hrs to fix

                          IOBase has 24 functions (exceeds 20 allowed). Consider refactoring.
                          Open

                          class IOBase:
                              __metaclass__ = abc.ABCMeta
                          
                              """The abstract base class for all I/O classes, acting on streams of
                              bytes. There is no public constructor.
                          Severity: Minor
                          Found in AppPkg/Applications/Python/Python-2.7.2/Lib/_pyio.py - About 2 hrs to fix

                            Maildir has 24 functions (exceeds 20 allowed). Consider refactoring.
                            Open

                            class Maildir(Mailbox):
                                """A qmail-style Maildir mailbox."""
                            
                                colon = ':'
                            
                            Severity: Minor
                            Found in AppPkg/Applications/Python/Python-2.7.2/Lib/mailbox.py - About 2 hrs to fix

                              HTMLParser has 24 functions (exceeds 20 allowed). Consider refactoring.
                              Open

                              class HTMLParser(markupbase.ParserBase):
                                  """Find tags and other markup and call handler functions.
                              
                                  Usage:
                                      p = HTMLParser()
                              Severity: Minor
                              Found in AppPkg/Applications/Python/Python-2.7.2/Lib/HTMLParser.py - About 2 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language