hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

Function decode has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

def decode(input, output, header = 0):
    """Read 'input', apply quoted-printable decoding, and write to 'output'.
    'input' and 'output' are files with readline() and write() methods.
    If 'header' is true, decode underscore as space (per RFC 1522)."""
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/quopri.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 _count_diff_all_purpose has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

def _count_diff_all_purpose(actual, expected):
    'Returns list of (cnt_act, cnt_exp, elem) triples where the counts differ'
    # elements need not be hashable
    s, t = list(actual), list(expected)
    m, n = len(s), len(t)
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/unittest/util.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 _getDeclarations has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

    def _getDeclarations(self):
        """Re-create the internal subset from the DocumentType node.

        This is only needed if we don't already have the
        internalSubset as a string.
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/xml/dom/expatbuilder.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 _ensure_header_written has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

    def _ensure_header_written(self, datasize):
        if not self._nframeswritten:
            if self._comptype in ('ULAW', 'ALAW'):
                if not self._sampwidth:
                    self._sampwidth = 2
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/aifc.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 transform has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

    def transform(self, node, results):
        imports = results['imports']
        if imports.type == syms.import_as_name or not imports.children:
            children = [imports]
        else:

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

    def compile(self, sources,
                output_dir=None, macros=None, include_dirs=None, debug=0,
                extra_preargs=None, extra_postargs=None, depends=None):

        if not self.initialized: self.initialize()
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/distutils/msvccompiler.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 _check_conflict has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

    def _check_conflict(self, option):
        conflict_opts = []
        for opt in option._short_opts:
            if opt in self._short_opt:
                conflict_opts.append((opt, self._short_opt[opt]))
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/optparse.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 com_arglist has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

    def com_arglist(self, nodelist):
        # varargslist:
        #     (fpdef ['=' test] ',')* ('*' NAME [',' '**' NAME] | '**' NAME)
        #   | fpdef ['=' test] (',' fpdef ['=' test])* [',']
        # fpdef: NAME | '(' fplist ')'
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/compiler/transformer.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 classify_class_attrs has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

def classify_class_attrs(cls):
    """Return list of attribute-descriptor tuples.

    For each name in dir(cls), the return list contains a 4-tuple
    with these elements:
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/inspect.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 _spawnvef has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

    def _spawnvef(mode, file, args, env, func):
        # Internal helper; func is the exec*() function to use
        pid = fork()
        if not pid:
            # Child
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/os.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 urljoin has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

def urljoin(base, url, allow_fragments=True):
    """Join a base URL and a possibly relative URL to form an absolute
    interpretation of the latter."""
    if not base:
        return url
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/urlparse.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

File cvslib.py has 302 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"""Utilities for CVS administration."""

import string
import os
import time
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/cvslib.py - About 3 hrs to fix

    File heapq.py has 302 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    Severity: Minor
    Found in AppPkg/Applications/Python/Python-2.7.2/Lib/heapq.py - About 3 hrs to fix

      File heapq.py has 302 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      Severity: Minor
      Found in vector-uefi/fd/efi/StdLib/lib/python.27/heapq.py - About 3 hrs to fix

        Method main has 81 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public static void main(String[] args) throws Exception
            {
                System.out.println("\nLZMA (Java) 4.61  2008-11-23\n");
                
                if (args.length < 1)
        Severity: Major
        Found in vector-uefi/insyde/7zip/Java/SevenZip/LzmaAlone.java - About 3 hrs to fix

          Method Skip has 81 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  public void Skip(UInt32 num)
                  {
                      do
                      {
                          UInt32 lenLimit;
          Severity: Major
          Found in vector-uefi/insyde/7zip/CS/7zip/Compress/LZ/LzBinTree.cs - About 3 hrs to fix

            File LzmaBench.cs has 301 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            using System;
            using System.IO;
            
            namespace SevenZip
            {
            Severity: Minor
            Found in vector-uefi/insyde/7zip/CS/7zip/Compress/LzmaAlone/LzmaBench.cs - About 3 hrs to fix

              File xmlbuilder.py has 300 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              """Implementation of the DOM Level 3 'LS-Load' feature."""
              
              import copy
              import xml.dom
              
              Severity: Minor
              Found in AppPkg/Applications/Python/Python-2.7.2/Lib/xml/dom/xmlbuilder.py - About 3 hrs to fix

                File xmlbuilder.py has 300 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                """Implementation of the DOM Level 3 'LS-Load' feature."""
                
                import copy
                import xml.dom
                
                Severity: Minor
                Found in vector-uefi/fd/efi/StdLib/lib/python.27/xml/dom/xmlbuilder.py - About 3 hrs to fix

                  ValueExpression has 27 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  class ValueExpression(object):
                      # Logical operator mapping
                      LogicalOperators = {
                          '&&' : 'and', '||' : 'or',
                          '!'  : 'not', 'AND': 'and',
                  Severity: Minor
                  Found in BaseTools/Source/Python/Common/Expression.py - About 3 hrs to fix
                    Severity
                    Category
                    Status
                    Source
                    Language