hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

Avoid deeply nested control flow statements.
Open

                        if config.has_option(server, key):
                            current[key] = config.get(server, key)
                        else:
                            current[key] = default
                    if (current['server'] == repository or
Severity: Major
Found in AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/config.py - About 45 mins to fix

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

        def preprocess(self, source,
    Severity: Minor
    Found in AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/unixccompiler.py - About 45 mins to fix

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

          def copy_tree(self, infile, outfile,
      Severity: Minor
      Found in AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/cmd.py - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                            if not dry_run:
                                compile(file, cfile, dfile)
                        else:
        Severity: Major
        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/util.py - About 45 mins to fix

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

              def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
          Severity: Minor
          Found in AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/emxccompiler.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                if "$" in after:
                                    notdone[name] = value
                                else:
                                    try: value = int(value)
                                    except ValueError:
            Severity: Major
            Found in AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/sysconfig.py - About 45 mins to fix

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

                  def __init__(self, versionPredicateStr):
                      """Parse a version predicate string.
                      """
                      # Fields:
                      #    name:  package name

              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 copy_file has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def copy_file(self, infile, outfile,
              Severity: Minor
              Found in AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/cmd.py - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                    if not os.path.exists(sdk):
                                        for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED',
                                             # a number of derived variables. These need to be
                                             # patched up as well.
                                            'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
                Severity: Major
                Found in AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/sysconfig.py - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                      for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED',
                                          # a number of derived variables. These need to be
                                          # patched up as well.
                                          'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
                  
                  Severity: Major
                  Found in AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/sysconfig.py - About 45 mins to fix

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

                        def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
                    Severity: Minor
                    Found in AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/unixccompiler.py - About 45 mins to fix

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

                          def make_archive(self, base_name, format, root_dir=None, base_dir=None,
                      Severity: Minor
                      Found in AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/cmd.py - About 45 mins to fix

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

                            def preprocess (self,
                        Severity: Minor
                        Found in AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/bcppcompiler.py - About 45 mins to fix

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

                          def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0,
                                           dry_run=0, owner=None, group=None):
                              """Create an archive file (eg. zip or tar).
                          
                              'base_name' is the name of the file to create, minus any format-specific
                          Severity: Minor
                          Found in AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/archive_util.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 os.path.isfile(path):
                                                  zip.write(path, path)
                                                  log.info("adding '%s'" % path)
                                      zip.close()
                          Severity: Major
                          Found in AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/archive_util.py - About 45 mins to fix

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

                                def ngettext(self, msgid1, msgid2, n):
                                    try:
                                        tmsg = self._catalog[(msgid1, self.plural(n))]
                                        if self._output_charset:
                                            return tmsg.encode(self._output_charset)
                            Severity: Minor
                            Found in AppPkg/Applications/Python/Python-2.7.2/Lib/gettext.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 extractLineNo has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                            Open

                            def extractLineNo(ast):
                                if not isinstance(ast[1], tuple):
                                    # get a terminal node
                                    return ast[2]
                                for child in ast[1:]:
                            Severity: Minor
                            Found in AppPkg/Applications/Python/Python-2.7.2/Lib/compiler/transformer.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_comparable has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def make_comparable(self, other):
                                    if isinstance(other, DateTime):
                                        s = self.value
                                        o = other.value
                                    elif datetime and isinstance(other, datetime.datetime):
                            Severity: Minor
                            Found in AppPkg/Applications/Python/Python-2.7.2/Lib/xmlrpclib.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 ch[0] == token.DOUBLESTAR:
                                                        raise SyntaxError, "can't assign to operator"
                                                    primary = self.com_apply_trailer(primary, ch)
                            Severity: Major
                            Found in AppPkg/Applications/Python/Python-2.7.2/Lib/compiler/transformer.py - About 45 mins to fix

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

                                  def send_flowing_data(self, data):
                                      if not data: return
                                      atbreak = self.atbreak or data[0].isspace()
                                      col = self.col
                                      maxcol = self.maxcol
                              Severity: Minor
                              Found in AppPkg/Applications/Python/Python-2.7.2/Lib/formatter.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