hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

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

    def redirect_request(self, req, fp, code, msg, headers, newurl):
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/urllib2.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 AppPkg/Applications/Python/Python-2.7.2/Lib/nntplib.py - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                          for line in b[j1:j2]:
                              yield prefix[tag] + line
      
      Severity: Major
      Found in AppPkg/Applications/Python/Python-2.7.2/Lib/difflib.py - About 45 mins to fix

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

            def __init__(self, examples, globs, name, filename, lineno, docstring):
        Severity: Minor
        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/doctest.py - About 45 mins to fix

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

              def _import_fromlist(self, package, fromlist):
                  'Import any sub-modules in the "from" list.'
          
                  # if '*' is present in the fromlist, then look for the '__all__'
                  # variable to find additional items (modules) to import.
          Severity: Minor
          Found in AppPkg/Applications/Python/Python-2.7.2/Lib/imputil.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

                              for line in a[i1:i2]:
                                  yield prefix[tag] + line
          
          Severity: Major
          Found in AppPkg/Applications/Python/Python-2.7.2/Lib/difflib.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    if token in (')', ',') and level == 1:
                                        n = "".join(super)
                                        if n in dict:
                                            # we know this super class
                                            n = dict[n]
            Severity: Major
            Found in AppPkg/Applications/Python/Python-2.7.2/Lib/pyclbr.py - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                      if token == '(':
                                          level += 1
                                      elif token == ')':
                                          level -= 1
                                          if level == 0:
              Severity: Major
              Found in AppPkg/Applications/Python/Python-2.7.2/Lib/pyclbr.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 AppPkg/Applications/Python/Python-2.7.2/Lib/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 _fancy_helper has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def _fancy_helper(self, a, alo, ahi, b, blo, bhi):
                Severity: Minor
                Found in AppPkg/Applications/Python/Python-2.7.2/Lib/difflib.py - About 45 mins to fix

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

                  Severity: Minor
                  Found in AppPkg/Applications/Python/Python-2.7.2/Lib/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 find_head_package has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def find_head_package(self, parent, name):
                          self.msgin(4, "find_head_package", parent, name)
                          if '.' in name:
                              i = name.find('.')
                              head = name[:i]
                  Severity: Minor
                  Found in AppPkg/Applications/Python/Python-2.7.2/Lib/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 _format has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def _format(self, object, stream, indent, allowance, context, level):
                  Severity: Minor
                  Found in AppPkg/Applications/Python/Python-2.7.2/Lib/pprint.py - About 45 mins to fix

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

                        def stop_here(self, frame):
                            # (CT) stopframe may now also be None, see dispatch_call.
                            # (CT) the former test for None is therefore removed from here.
                            if self.skip and \
                                   self.is_skipped_module(frame.f_globals.get('__name__')):
                    Severity: Minor
                    Found in AppPkg/Applications/Python/Python-2.7.2/Lib/bdb.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=DocXMLRPCRequestHandler,
                    Severity: Minor
                    Found in AppPkg/Applications/Python/Python-2.7.2/Lib/DocXMLRPCServer.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 AppPkg/Applications/Python/Python-2.7.2/Lib/SimpleXMLRPCServer.py - About 45 mins to fix

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

                        Severity: Minor
                        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/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 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 AppPkg/Applications/Python/Python-2.7.2/Lib/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

                        Avoid deeply nested control flow statements.
                        Open

                                                if isinstance(payload, basestring):
                                                    mo = NLCRE_eol.search(payload)
                                                    if mo:
                                                        payload = payload[:-len(mo.group(0))]
                                                        self._last.set_payload(payload)
                        Severity: Major
                        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/email/feedparser.py - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                  if mm.__code__ is None:
                                                      m.starimports[name] = 1
                                              else:
                          Severity: Major
                          Found in AppPkg/Applications/Python/Python-2.7.2/Lib/modulefinder.py - About 45 mins to fix
                            Severity
                            Category
                            Status
                            Source
                            Language