hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

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

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

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

        def open_local_file(self, req):
            import email.utils
            import mimetypes
            host = req.get_host()
            filename = req.get_selector()
    Severity: Minor
    Found in vector-uefi/fd/efi/StdLib/lib/python.27/urllib2.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 __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def __init__(self, addr, requestHandler=SimpleXMLRPCRequestHandler,
    Severity: Minor
    Found in vector-uefi/fd/efi/StdLib/lib/python.27/SimpleXMLRPCServer.py - About 45 mins to fix

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

          def __init__(self, host, port=NNTP_PORT, user=None, password=None,
      Severity: Minor
      Found in vector-uefi/fd/efi/StdLib/lib/python.27/nntplib.py - About 45 mins to fix

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

            def __init__(self,stdin,stdout,stderr,environ,
        Severity: Minor
        Found in vector-uefi/fd/efi/StdLib/lib/python.27/wsgiref/handlers.py - About 45 mins to fix

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

              def __init__(self, addr, requestHandler=SimpleXMLRPCRequestHandler,
          Severity: Minor
          Found in vector-uefi/fd/efi/StdLib/lib/python.27/SimpleXMLRPCServer.py - About 45 mins to fix

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

                def _split(self, text):
                    """_split(text : string) -> [string]
            
                    Split the text to wrap into indivisible chunks.  Chunks are
                    not quite the same as words; see _wrap_chunks() for full
            Severity: Minor
            Found in vector-uefi/fd/efi/StdLib/lib/python.27/textwrap.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 post has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
            Open

                def post(self, f):
                    """Process a POST command.  Arguments:
                    - f: file containing the article
                    Returns:
                    - resp: server response if successful"""
            Severity: Minor
            Found in vector-uefi/fd/efi/StdLib/lib/python.27/nntplib.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 make_table has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def make_table(self,fromlines,tolines,fromdesc='',todesc='',context=False,
            Severity: Minor
            Found in vector-uefi/fd/efi/StdLib/lib/python.27/difflib.py - About 45 mins to fix

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

              Severity: Minor
              Found in vector-uefi/fd/efi/StdLib/lib/python.27/tarfile.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 _getmember has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

              Severity: Minor
              Found in vector-uefi/fd/efi/StdLib/lib/python.27/tarfile.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 epilogue == '':
                                          self._last.epilogue = None
                                      elif epilogue is not None:
                                          mo = NLCRE_eol.search(epilogue)
                                          if mo:
              Severity: Major
              Found in vector-uefi/fd/efi/StdLib/lib/python.27/email/feedparser.py - About 45 mins to fix

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

                    def __init__(self, s=None, charset=None,
                Severity: Minor
                Found in vector-uefi/fd/efi/StdLib/lib/python.27/email/header.py - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                          if not mo:
                                              self._input.unreadline(line)
                                              break
                                      # Recurse to parse this subpart; the input stream points
                                      # at the subpart's first line.
                  Severity: Major
                  Found in vector-uefi/fd/efi/StdLib/lib/python.27/email/feedparser.py - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            if retval is NeedMoreData:
                                                yield NeedMoreData
                                                continue
                                            break
                    Severity: Major
                    Found in vector-uefi/fd/efi/StdLib/lib/python.27/email/feedparser.py - About 45 mins to fix

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

                          def scan_opcodes(self, co,
                                           unpack = struct.unpack):
                              # Scan the code, and yield 'interesting' opcode combinations
                              # Version for Python 2.4 and older
                              code = co.co_code
                      Severity: Minor
                      Found in vector-uefi/fd/efi/StdLib/lib/python.27/modulefinder.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 get_param has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def get_param(self, param, failobj=None, header='content-type',
                                        unquote=True):
                              """Return the parameter value if found in the Content-Type header.
                      
                              Optional failobj is the object to return if there is no Content-Type
                      Severity: Minor
                      Found in vector-uefi/fd/efi/StdLib/lib/python.27/email/message.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 getdomain has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def getdomain(self):
                              """Get the complete domain name from an address."""
                              sdlist = []
                              while self.pos < len(self.field):
                                  if self.field[self.pos] in self.LWS:
                      Severity: Minor
                      Found in vector-uefi/fd/efi/StdLib/lib/python.27/email/_parseaddr.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 preamble:
                                                  # According to RFC 2046, the last newline belongs
                                                  # to the boundary.
                                                  lastline = preamble[-1]
                                                  eolmo = NLCRE_eol.search(lastline)
                      Severity: Major
                      Found in vector-uefi/fd/efi/StdLib/lib/python.27/email/feedparser.py - About 45 mins to fix

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

                            def getaddrspec(self):
                                """Parse an RFC 2822 addr-spec."""
                                aslist = []
                        
                                self.gotonext()
                        Severity: Minor
                        Found in vector-uefi/fd/efi/StdLib/lib/python.27/email/_parseaddr.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

                        Severity
                        Category
                        Status
                        Source
                        Language