hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

Function visitSlice has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    def visitSlice(self, node, aug_flag=None):
        # aug_flag is used by visitAugSlice
        self.visit(node.expr)
        slice = 0
        if node.lower:
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/compiler/pycodegen.py - About 1 hr 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 visitContinue has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    def visitContinue(self, node):
        if not self.setups:
            raise SyntaxError, "'continue' outside loop (%s, %d)" % \
                  (node.filename, node.lineno)
        kind, block = self.setups.top()
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/compiler/pycodegen.py - About 1 hr 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 _nameOp has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    def _nameOp(self, prefix, name):
        name = self.mangle(name)
        scope = self.scope.check_name(name)
        if scope == SC_LOCAL:
            if not self.optimized:
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/compiler/pycodegen.py - About 1 hr 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 getfile has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

def getfile(object):
    """Work out which source or compiled file an object was defined in."""
    if ismodule(object):
        if hasattr(object, '__file__'):
            return object.__file__
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/inspect.py - About 1 hr 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 removemessages has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    def removemessages(self, list):
        """Remove one or more messages -- may raise os.error."""
        errors = []
        deleted = []
        for n in list:
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/mhlib.py - About 1 hr 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 shutdown has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

def shutdown(handlerList=_handlerList):
    """
    Perform any cleanup actions in the logging system (e.g. flushing
    buffers).
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/logging/__init__.py - About 1 hr 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 _copysequences has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    def _copysequences(self, fromfolder, refileditems):
        """Helper for refilemessages() to copy sequences."""
        fromsequences = fromfolder.getsequences()
        tosequences = self.getsequences()
        changed = 0
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/mhlib.py - About 1 hr 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 callHandlers has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    def callHandlers(self, record):
        """
        Pass a record to all relevant handlers.

        Loop through all handlers for this logger and its parents in the
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/logging/__init__.py - About 1 hr 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 readframes has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    def readframes(self, nframes):
        if self._data_seek_needed:
            self._data_chunk.seek(0, 0)
            pos = self._soundpos * self._framesize
            if pos:
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/wave.py - About 1 hr 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 10 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def __init__(self,
Severity: Major
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/argparse.py - About 1 hr to fix

    Function _make_tarball has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

    def _make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0,
                      owner=None, group=None, logger=None):
        """Create a (possibly compressed) tar file from all the files under
        'base_dir'.
    
    Severity: Minor
    Found in AppPkg/Applications/Python/Python-2.7.2/Lib/shutil.py - About 1 hr 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 10 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def __init__(self,
    Severity: Major
    Found in AppPkg/Applications/Python/Python-2.7.2/Lib/argparse.py - About 1 hr to fix

      Function makedirs has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      def makedirs(name, mode=0777):
          """makedirs(path [, mode=0777])
      
          Super-mkdir; create a leaf directory and all intermediate ones.
          Works like mkdir, except that any intermediate path segment (not
      Severity: Minor
      Found in AppPkg/Applications/Python/Python-2.7.2/Lib/os.py - About 1 hr 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 10 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def __init__(self,
      Severity: Major
      Found in AppPkg/Applications/Python/Python-2.7.2/Lib/argparse.py - About 1 hr to fix

        Function generic_visit has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

            def generic_visit(self, node):
                """Called if no explicit visitor function exists for a node."""
                for field, value in iter_fields(node):
                    if isinstance(value, list):
                        for item in value:
        Severity: Minor
        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/ast.py - About 1 hr 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 dump has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

        def dump(node, annotate_fields=True, include_attributes=False):
            """
            Return a formatted dump of the tree in *node*.  This is mainly useful for
            debugging purposes.  The returned string will show the names and the values
            for fields.  This makes the code impossible to evaluate, so if evaluation is
        Severity: Minor
        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/ast.py - About 1 hr 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 iter_child_nodes has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

        def iter_child_nodes(node):
            """
            Yield all direct child nodes of *node*, that is, all fields that are nodes
            and all items of fields that are lists of nodes.
            """
        Severity: Minor
        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/ast.py - About 1 hr 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 __floordiv__ has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

            def __floordiv__(self, other, context=None):
                """self // other"""
                other = _convert_other(other)
                if other is NotImplemented:
                    return other
        Severity: Minor
        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/decimal.py - About 1 hr 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 _url_collapse_path_split has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

        def _url_collapse_path_split(path):
            """
            Given a URL path, remove extra '/'s and '.' path elements and collapse
            any '..' references.
        
        Severity: Minor
        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/CGIHTTPServer.py - About 1 hr 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 __divmod__ has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

            def __divmod__(self, other, context=None):
                """
                Return (self // other, self % other)
                """
                other = _convert_other(other)
        Severity: Minor
        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/decimal.py - About 1 hr 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