hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

Function getfqdn has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

def getfqdn(name=''):
    """Get fully qualified domain name from name.

    An empty argument is interpreted as meaning the local host.
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/socket.py - About 45 mins 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 http_error_307 has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def http_error_307(self, url, fp, errcode, errmsg, headers, data=None):
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/urllib.py - About 45 mins to fix

    Function _readmark has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

        def _readmark(self, chunk):
            nmarkers = _read_short(chunk)
            # Some files appear to contain invalid counts.
            # Cope with this by testing for EOF.
            try:
    Severity: Minor
    Found in vector-uefi/fd/efi/StdLib/lib/python.27/aifc.py - About 45 mins 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 http_error_301 has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def http_error_301(self, url, fp, errcode, errmsg, headers, data=None):
    Severity: Minor
    Found in vector-uefi/fd/efi/StdLib/lib/python.27/urllib.py - About 45 mins to fix

      Function __init__ has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

          def __init__(self, count=1, trace=1, countfuncs=0, countcallers=0,
                       ignoremods=(), ignoredirs=(), infile=None, outfile=None,
                       timing=False):
              """
              @param count true iff it should count number of times each
      Severity: Minor
      Found in vector-uefi/fd/efi/StdLib/lib/python.27/trace.py - About 45 mins 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

      Avoid deeply nested control flow statements.
      Open

                          if isinstance(k, QName):
                              k = k.text
                          if isinstance(v, QName):
      Severity: Major
      Found in vector-uefi/fd/efi/StdLib/lib/python.27/xml/etree/ElementTree.py - About 45 mins to fix

        Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def __init__(self, hex=None, bytes=None, bytes_le=None, fields=None,
        Severity: Minor
        Found in vector-uefi/fd/efi/StdLib/lib/python.27/uuid.py - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                              if isinstance(v, QName):
                                  v = qnames[v.text]
                              else:
                                  v = _escape_attrib(v, encoding)
                              write(" %s=\"%s\"" % (qnames[k], v))
          Severity: Major
          Found in vector-uefi/fd/efi/StdLib/lib/python.27/xml/etree/ElementTree.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                        if not data:
                                            break
                                        buffers.append(data)
            Severity: Major
            Found in vector-uefi/fd/efi/StdLib/lib/python.27/socket.py - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                  if isinstance(v, QName):
                                      v = qnames[v.text]
                                  else:
                                      v = _escape_attrib_html(v, encoding)
                                  # FIXME: handle boolean attributes
              Severity: Major
              Found in vector-uefi/fd/efi/StdLib/lib/python.27/xml/etree/ElementTree.py - About 45 mins to fix

                Function http_error_302 has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def http_error_302(self, url, fp, errcode, errmsg, headers, data=None):
                Severity: Minor
                Found in vector-uefi/fd/efi/StdLib/lib/python.27/urllib.py - About 45 mins to fix

                  Function _randbelow has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def _randbelow(self, n, _log=_log, int=int, _maxwidth=1L<<BPF,
                  Severity: Minor
                  Found in vector-uefi/fd/efi/StdLib/lib/python.27/random.py - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            if not re.match('^([^/:]+)://', address):
                                                address = '%s://%s' % (protocol, address)
                                            proxies[protocol] = address
                    Severity: Major
                    Found in vector-uefi/fd/efi/StdLib/lib/python.27/urllib.py - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                              if self.trace:
                                                  print (" --- modulename: %s, funcname: %s"
                                                         % (modulename, code.co_name))
                                              return self.localtrace
                      Severity: Major
                      Found in vector-uefi/fd/efi/StdLib/lib/python.27/trace.py - About 45 mins to fix

                        Function load_module has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def load_module(self, name, stuff):
                                file, filename, info = stuff
                                (suff, mode, type) = info
                                try:
                                    if type == BUILTIN_MODULE:
                        Severity: Minor
                        Found in vector-uefi/fd/efi/StdLib/lib/python.27/ihooks.py - About 45 mins 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 http_error has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def http_error(self, url, fp, errcode, errmsg, headers, data=None):
                        Severity: Minor
                        Found in vector-uefi/fd/efi/StdLib/lib/python.27/urllib.py - About 45 mins to fix

                          Function http_error_303 has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              def http_error_303(self, url, fp, errcode, errmsg, headers, data=None):
                          Severity: Minor
                          Found in vector-uefi/fd/efi/StdLib/lib/python.27/urllib.py - About 45 mins to fix

                            Function http_error_407 has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def http_error_407(self, url, fp, errcode, errmsg, headers, data=None):
                            Severity: Minor
                            Found in vector-uefi/fd/efi/StdLib/lib/python.27/urllib.py - About 45 mins to fix

                              Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  def __init__(self, user, passwd, host, port, dirs,
                              Severity: Minor
                              Found in vector-uefi/fd/efi/StdLib/lib/python.27/urllib.py - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                        if ((v[1]/total) >= consistency and
                                                            (delimiters is None or k in delimiters)):
                                                            delims[k] = v
                                                consistency -= 0.01
                                Severity: Major
                                Found in vector-uefi/fd/efi/StdLib/lib/python.27/csv.py - About 45 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language