hackedteam/vector-edk

View on GitHub

Showing 9,525 of 13,510 total issues

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

    def print_commands(self):
        """Print out a help message listing all available commands with a
        description of each.  The list is divided into "standard commands"
        (listed in distutils.command.__all__) and "extra commands"
        (mentioned in self.cmdclass, but not a standard command).  The
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/distutils/dist.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_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 vector-uefi/fd/efi/StdLib/lib/python.27/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

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
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/distutils/versionpredicate.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 copy_tree has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def copy_tree(self, infile, outfile,
Severity: Minor
Found in vector-uefi/fd/efi/StdLib/lib/python.27/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 vector-uefi/fd/efi/StdLib/lib/python.27/distutils/bcppcompiler.py - About 45 mins to fix

      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 vector-uefi/fd/efi/StdLib/lib/python.27/distutils/archive_util.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 vector-uefi/fd/efi/StdLib/lib/python.27/distutils/sysconfig.py - About 45 mins to fix

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

              def run (self):
                  if not self.skip_build:
                      self.run_command('build_scripts')
                  self.outfiles = self.copy_tree(self.build_dir, self.install_dir)
                  if os.name == 'posix':

          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 _check_macro_definitions has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              def _check_macro_definitions(self, definitions):
                  """Ensures that every element of 'definitions' is a valid macro
                  definition, ie. either (name,value) 2-tuple or a (name,) tuple.  Do
                  nothing if all definitions are OK, raise TypeError otherwise.
                  """
          Severity: Minor
          Found in vector-uefi/fd/efi/StdLib/lib/python.27/distutils/ccompiler.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 copy_file has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def copy_file(self, infile, outfile,
          Severity: Minor
          Found in vector-uefi/fd/efi/StdLib/lib/python.27/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 vector-uefi/fd/efi/StdLib/lib/python.27/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 vector-uefi/fd/efi/StdLib/lib/python.27/distutils/cygwinccompiler.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 vector-uefi/fd/efi/StdLib/lib/python.27/distutils/sysconfig.py - About 45 mins to fix

                  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 vector-uefi/fd/efi/StdLib/lib/python.27/distutils/config.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 vector-uefi/fd/efi/StdLib/lib/python.27/distutils/sysconfig.py - About 45 mins to fix

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

                          def take_action(self, action, dest, opt, value, values, parser):
                      Severity: Minor
                      Found in vector-uefi/fd/efi/StdLib/lib/python.27/optparse.py - About 45 mins to fix

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

                            def __dump(self, value, write):
                                try:
                                    f = self.dispatch[type(value)]
                                except KeyError:
                                    # check if this object can be marshalled as a structure
                        Severity: Minor
                        Found in vector-uefi/fd/efi/StdLib/lib/python.27/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

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

                        def translation(domain, localedir=None, languages=None,
                        Severity: Minor
                        Found in vector-uefi/fd/efi/StdLib/lib/python.27/gettext.py - About 45 mins to fix

                          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 vector-uefi/fd/efi/StdLib/lib/python.27/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

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

                              def add_option_group(self, *args, **kwargs):
                                  # XXX lots of overlap with OptionContainer.add_option()
                                  if type(args[0]) is types.StringType:
                                      group = OptionGroup(self, *args, **kwargs)
                                  elif len(args) == 1 and not kwargs:
                          Severity: Minor
                          Found in vector-uefi/fd/efi/StdLib/lib/python.27/optparse.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