hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

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

def filterwarnings(action, message="", category=Warning, module="", lineno=0,
Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/warnings.py - About 45 mins to fix

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

        def set_flags(self, flags):
            """Set the given flags and unset all others."""
            flags = set(flags)
            status_flags, xstatus_flags = '', ''
            for flag in ('R', 'O'):
    Severity: Minor
    Found in AppPkg/Applications/Python/Python-2.7.2/Lib/mailbox.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 sourcematch("<"):
                            # named group: skip forward to end of name
                            name = ""
                            while 1:
                                char = sourceget()
    Severity: Major
    Found in AppPkg/Applications/Python/Python-2.7.2/Lib/sre_parse.py - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                          while source.next in FLAGS:
                              state.flags = state.flags | FLAGS[sourceget()]
                  if group:
      Severity: Major
      Found in AppPkg/Applications/Python/Python-2.7.2/Lib/sre_parse.py - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                            if this == "]":
                                if code1[0] is IN:
                                    code1 = code1[1][0]
                                setappend(code1)
                                setappend((LITERAL, ord("-")))
        Severity: Major
        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/sre_parse.py - About 45 mins to fix

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

          def test():
              import sys
              if sys.argv[1:]:
                  file = sys.argv[1]
              else:
          Severity: Minor
          Found in AppPkg/Applications/Python/Python-2.7.2/Lib/StringIO.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 not sourcematch(")"):
                                  raise error, "unbalanced parenthesis"
                              if char == "=":
          Severity: Major
          Found in AppPkg/Applications/Python/Python-2.7.2/Lib/sre_parse.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                if isname(condname):
                                    condgroup = state.groupdict.get(condname)
                                    if condgroup is None:
                                        raise error, "unknown group name"
                                else:
            Severity: Major
            Found in AppPkg/Applications/Python/Python-2.7.2/Lib/sre_parse.py - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                  if char == ")":
                                      break
                                  raise error, "unknown extension"
              Severity: Major
              Found in AppPkg/Applications/Python/Python-2.7.2/Lib/sre_parse.py - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                    if m:  # unquoted value
                                        text = unmatched(m)
                                        value = m.group(1)
                                        value = value.rstrip()
                                    else:
                Severity: Major
                Found in AppPkg/Applications/Python/Python-2.7.2/Lib/cookielib.py - About 45 mins to fix

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

                  def _parse_feature_string(s):
                      features = []
                      parts = s.split()
                      i = 0
                      length = len(parts)
                  Severity: Minor
                  Found in AppPkg/Applications/Python/Python-2.7.2/Lib/xml/dom/domreg.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 py_scanstring has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def py_scanstring(s, end, encoding=None, strict=True,
                  Severity: Minor
                  Found in AppPkg/Applications/Python/Python-2.7.2/Lib/json/decoder.py - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                        if isinstance(k, QName):
                                            k = k.text
                                        if isinstance(v, QName):
                    Severity: Major
                    Found in AppPkg/Applications/Python/Python-2.7.2/Lib/xml/etree/ElementTree.py - About 45 mins to fix

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

                          def update(self, dict=None, **kwargs):
                              if dict is None:
                                  pass
                              elif isinstance(dict, UserDict):
                                  self.data.update(dict.data)
                      Severity: Minor
                      Found in AppPkg/Applications/Python/Python-2.7.2/Lib/UserDict.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_wholeText has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def _get_wholeText(self):
                              L = [self.data]
                              n = self.previousSibling
                              while n is not None:
                                  if n.nodeType in (Node.TEXT_NODE, Node.CDATA_SECTION_NODE):
                      Severity: Minor
                      Found in AppPkg/Applications/Python/Python-2.7.2/Lib/xml/dom/minidom.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 _handleModuleFixture has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def _handleModuleFixture(self, test, result):
                              previousModule = self._get_previous_module(result)
                              currentModule = test.__class__.__module__
                              if currentModule == previousModule:
                                  return
                      Severity: Minor
                      Found in AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/suite.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 AppPkg/Applications/Python/Python-2.7.2/Lib/xml/etree/ElementTree.py - About 45 mins to fix

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

                        def encode(input, output):
                            """Encode a file."""
                            while True:
                                s = input.read(MAXBINSIZE)
                                if not s:
                        Severity: Minor
                        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/base64.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 AppPkg/Applications/Python/Python-2.7.2/Lib/rfc822.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_message has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def get_message(self, key):
                                """Return a Message representation or raise a KeyError."""
                                start, stop = self._lookup(key)
                                self._file.seek(start)
                                self._file.readline()   # Skip '1,' line specifying labels.
                        Severity: Minor
                        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/mailbox.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