hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

File copy.py has 374 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"""Generic (shallow and deep) copying operations.

Interface summary:

        import copy
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/copy.py - About 5 hrs to fix

    File plistlib.py has 374 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    r"""plistlib.py -- a tool to generate and parse MacOSX .plist files.
    
    The PropertyList (.plist) file format is a simple XML pickle supporting
    basic object types, like dictionaries, lists, numbers and strings.
    Usually the top level object is a dictionary.
    Severity: Minor
    Found in vector-uefi/fd/efi/StdLib/lib/python.27/plistlib.py - About 5 hrs to fix

      File copy.py has 374 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      """Generic (shallow and deep) copying operations.
      
      Interface summary:
      
              import copy
      Severity: Minor
      Found in vector-uefi/fd/efi/StdLib/lib/python.27/copy.py - About 5 hrs to fix

        File freeze.py has 373 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        #! /usr/bin/env python
        
        """Freeze a Python script into a binary.
        
        usage: freeze [options...] script [module]...
        Severity: Minor
        Found in AppPkg/Applications/Python/Python-2.7.2/Tools/freeze/freeze.py - About 4 hrs to fix

          File DecPomAlignment.py has 372 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          ## @file DecPomAlignment.py
          # This file contained the adapter for convert INF parser object to POM Object
          #
          # Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
          #
          Severity: Minor
          Found in BaseTools/Source/Python/UPT/PomAdapter/DecPomAlignment.py - About 4 hrs to fix

            Function _GenModuleHeader has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
            Open

                def _GenModuleHeader(self):
                    Logger.Debug(2, "Generate ModuleHeader ...")
                    #
                    # Get all defines information form InfParser Object
                    #
            Severity: Minor
            Found in BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py - About 4 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 _GetLibraryClasses has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
            Open

                def _GetLibraryClasses(self):
                    if self._LibraryClasses == None:
                        self._LibraryInstances = []
                        #
                        # tdict is a special dict kind of type, used for selecting correct
            Severity: Minor
            Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.py - About 4 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 _GetDynamicVpdPcd has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
            Open

                def _GetDynamicVpdPcd(self, Type):
                    
                    SkuObj = SkuClass(self.SkuIdentifier,self.SkuIds)
                    
                    Pcds = sdict()
            Severity: Minor
            Found in BaseTools/Source/Python/Workspace/WorkspaceDatabase.py - About 4 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 multiplicative_expression has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
            Open

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

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

                def labeled_statement(self, ):
            
                    labeled_statement_StartIndex = self.input.index()
                    try:
                        try:
            Severity: Minor
            Found in BaseTools/Source/Python/Eot/CParser.py - About 4 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 multiplicative_expression has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
            Open

                def multiplicative_expression(self, ):
            
                    multiplicative_expression_StartIndex = self.input.index()
                    try:
                        try:
            Severity: Minor
            Found in BaseTools/Source/Python/Eot/CParser.py - About 4 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 run has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
            Open

                def run(self, callback, key=None, completer=None, onerror=None):
                    if key: key = lower(key)
                    self.quit = False
                    seen = {}
            
            Severity: Minor
            Found in AppPkg/Applications/Python/PyMod-2.7.2/Lib/pydoc.py - About 4 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 write has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
            Open

            Severity: Minor
            Found in AppPkg/Applications/Python/Python-2.7.2/Tools/i18n/pygettext.py - About 4 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 run has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
            Open

                def run(self, callback, key=None, completer=None, onerror=None):
                    if key: key = lower(key)
                    self.quit = False
                    seen = {}
            
            Severity: Minor
            Found in AppPkg/Applications/Python/Python-2.7.2/Lib/pydoc.py - About 4 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 _cookie_attrs has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
            Open

                def _cookie_attrs(self, cookies):
                    """Return a list of cookie-attributes to be returned to server.
            
                    like ['foo="bar"; $Path="/"', ...]
            
            Severity: Minor
            Found in AppPkg/Applications/Python/Python-2.7.2/Lib/cookielib.py - About 4 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 _is_import_binding has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
            Open

            def _is_import_binding(node, name, package=None):
                """ Will reuturn node if node will import name, or node
                    will import * from package.  None is returned otherwise.
                    See test cases for examples. """
            
            Severity: Minor
            Found in AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixer_util.py - About 4 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 search_function has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
            Open

            def search_function(encoding):
            
                # Cache lookup
                entry = _cache.get(encoding, _unknown)
                if entry is not _unknown:
            Severity: Minor
            Found in AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/__init__.py - About 4 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 read has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
            Open

                def read(self, size=-1, chars=-1, firstline=False):
            
                    """ Decodes data from the stream self.stream and returns the
                        resulting object.
            
            Severity: Minor
            Found in AppPkg/Applications/Python/Python-2.7.2/Lib/codecs.py - About 4 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 33 (exceeds 5 allowed). Consider refactoring.
            Open

                def __init__(self, filename=None):
                    if filename is None:
                        if "HOME" in os.environ:
                            filename = os.path.join(os.environ["HOME"],
                                                    ".netrc")
            Severity: Minor
            Found in AppPkg/Applications/Python/Python-2.7.2/Lib/ftplib.py - About 4 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