conan-io/conan

View on GitHub
conans/client/command.py

Summary

Maintainability
F
1 wk
Test Coverage

Function info has a Cognitive Complexity of 41 (exceeds 20 allowed). Consider refactoring.
Open

    def info(self, *args):
        """
        Gets information about the dependency graph of a recipe.

        It can be used with a recipe or a reference for any existing package in
Severity: Minor
Found in conans/client/command.py - About 3 hrs 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 config has a Cognitive Complexity of 23 (exceeds 20 allowed). Consider refactoring.
Open

    def config(self, *args):
        """
        Manages Conan configuration.

        Used to edit conan.conf, or install config files.
Severity: Minor
Found in conans/client/command.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 search has a Cognitive Complexity of 23 (exceeds 20 allowed). Consider refactoring.
Open

    def search(self, *args):
        """
        Searches package recipes and binaries in the local cache or a remote.
        Unless a remote is specified only the local cache is searched.

Severity: Minor
Found in conans/client/command.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 start:
                            break
                        start = True
Severity: Major
Found in conans/client/command.py - About 45 mins to fix

    Function remote has a Cognitive Complexity of 22 (exceeds 20 allowed). Consider refactoring.
    Open

        def remote(self, *args):
            """
            Manages the remote list and the package recipes associated with a remote.
            """
            parser = argparse.ArgumentParser(description=self.remote.__doc__,
    Severity: Minor
    Found in conans/client/command.py - About 35 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 too many return statements within this function.
    Open

                return self._conan.remote_remove_pref(package_reference)
    Severity: Major
    Found in conans/client/command.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                  return self._conan.remote_add_pref(package_reference, remote_name)
      Severity: Major
      Found in conans/client/command.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                    return self._conan.remote_update_ref(reference, remote_name)
        Severity: Major
        Found in conans/client/command.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                          return
          Severity: Major
          Found in conans/client/command.py - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                        return self._conan.remote_clean()
            Severity: Major
            Found in conans/client/command.py - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                          return self._conan.remote_set_disabled_state(remote_name, False)
              Severity: Major
              Found in conans/client/command.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                            return self._conan.remote_remove_ref(reference)
                Severity: Major
                Found in conans/client/command.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                                  return
                  Severity: Major
                  Found in conans/client/command.py - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                return self._conan.config_install(args.item, verify_ssl, args.type, args.args,
                    Severity: Major
                    Found in conans/client/command.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                  return self._conan.config_init(force=args.force)
                      Severity: Major
                      Found in conans/client/command.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                    return self._conan.remote_update_pref(package_reference, remote_name)
                        Severity: Major
                        Found in conans/client/command.py - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                      return self._conan.remote_add_ref(reference, remote_name)
                          Severity: Major
                          Found in conans/client/command.py - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                        return self._conan.remote_set_disabled_state(remote_name, True)
                            Severity: Major
                            Found in conans/client/command.py - About 30 mins to fix

                              Identical blocks of code found in 2 locations. Consider refactoring.
                              Open

                              class Extender(argparse.Action):
                                  """Allows using the same flag several times in command and creates a list with the values.
                                  For example:
                                      conan install MyPackage/1.2@user/channel -o qt:value -o mode:2 -s cucumber:true
                                    It creates:
                              Severity: Major
                              Found in conans/client/command.py and 1 other location - About 1 day to fix
                              conans/cli/command.py on lines 7..33

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 139.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Identical blocks of code found in 2 locations. Consider refactoring.
                              Open

                              class OnceArgument(argparse.Action):
                                  """Allows declaring a parameter that can have only one value, by default argparse takes the
                                  latest declared and it's very confusing.
                                  """
                                  def __call__(self, parser, namespace, values, option_string=None):
                              Severity: Major
                              Found in conans/client/command.py and 1 other location - About 4 hrs to fix
                              conans/cli/command.py on lines 36..45

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 85.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                          elif args.bundlecommand == "build-order":
                                              build_order = self._conan.lock_bundle_build_order(args.bundle)
                                              self._out.writeln(build_order)
                                              if args.json:
                                                  json_file = _make_abs_path(args.json)
                              Severity: Major
                              Found in conans/client/command.py and 1 other location - About 3 hrs to fix
                              conans/client/command.py on lines 2034..2039

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 62.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                      elif args.subcommand == "build-order":
                                          build_order = self._conan.lock_build_order(args.lockfile)
                                          self._out.writeln(build_order)
                                          if args.json:
                                              json_file = _make_abs_path(args.json)
                              Severity: Major
                              Found in conans/client/command.py and 1 other location - About 3 hrs to fix
                              conans/client/command.py on lines 2028..2033

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 62.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 4 locations. Consider refactoring.
                              Open

                                  def options_args(machine, short_suffix="", long_suffix=""):
                                      parser.add_argument("-o{}".format(short_suffix),
                                                          "--options{}".format(long_suffix),
                                                          nargs=1, action=Extender,
                                                          dest="options_{}".format(machine),
                              Severity: Major
                              Found in conans/client/command.py and 3 other locations - About 2 hrs to fix
                              conans/client/command.py on lines 2286..2293
                              conans/client/command.py on lines 2310..2317
                              conans/client/command.py on lines 2319..2327

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 59.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 4 locations. Consider refactoring.
                              Open

                                  def conf_args(machine, short_suffix="", long_suffix=""):
                                      parser.add_argument("-c{}".format(short_suffix),
                                                          "--conf{}".format(long_suffix),
                                                          nargs=1, action=Extender,
                                                          dest='conf_{}'.format(machine),
                              Severity: Major
                              Found in conans/client/command.py and 3 other locations - About 2 hrs to fix
                              conans/client/command.py on lines 2286..2293
                              conans/client/command.py on lines 2295..2301
                              conans/client/command.py on lines 2310..2317

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 59.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 4 locations. Consider refactoring.
                              Open

                                  def settings_args(machine, short_suffix="", long_suffix=""):
                                      parser.add_argument("-s{}".format(short_suffix),
                                                          "--settings{}".format(long_suffix),
                                                          nargs=1, action=Extender,
                                                          dest='settings_{}'.format(machine),
                              Severity: Major
                              Found in conans/client/command.py and 3 other locations - About 2 hrs to fix
                              conans/client/command.py on lines 2286..2293
                              conans/client/command.py on lines 2295..2301
                              conans/client/command.py on lines 2319..2327

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 59.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 4 locations. Consider refactoring.
                              Open

                                  def environment_args(machine, short_suffix="", long_suffix=""):
                                      parser.add_argument("-e{}".format(short_suffix),
                                                          "--env{}".format(long_suffix),
                                                          nargs=1, action=Extender,
                                                          dest="env_{}".format(machine),
                              Severity: Major
                              Found in conans/client/command.py and 3 other locations - About 2 hrs to fix
                              conans/client/command.py on lines 2295..2301
                              conans/client/command.py on lines 2310..2317
                              conans/client/command.py on lines 2319..2327

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 59.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                          if args.json:
                                              json_arg = True if args.json == "1" else args.json
                                              self._outputer.json_nodes_to_build(nodes, json_arg, os.getcwd())
                                          else:
                                              self._outputer.nodes_to_build(nodes)
                              Severity: Major
                              Found in conans/client/command.py and 1 other location - About 2 hrs to fix
                              conans/client/command.py on lines 753..757

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 56.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                          if args.json:
                                              json_arg = True if args.json == "1" else args.json
                                              self._outputer.json_build_order(ret, json_arg, os.getcwd())
                                          else:
                                              self._outputer.build_order(ret)
                              Severity: Major
                              Found in conans/client/command.py and 1 other location - About 2 hrs to fix
                              conans/client/command.py on lines 772..776

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 56.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                      except SystemExit as exc:
                                          if exc.code != 0:
                                              logger.error(exc)
                                              self._out.error("Exiting with code: %d" % exc.code)
                                          ret_code = exc.code
                              Severity: Major
                              Found in conans/client/command.py and 1 other location - About 2 hrs to fix
                              conans/cli/cli.py on lines 183..187

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 53.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Identical blocks of code found in 2 locations. Consider refactoring.
                              Open

                                  try:
                                      conan_api, _, _ = Conan.factory()
                                  except ConanMigrationError:  # Error migrating
                                      sys.exit(ERROR_MIGRATION)
                                  except ConanException as e:
                              Severity: Major
                              Found in conans/client/command.py and 1 other location - About 1 hr to fix
                              conans/cli/cli.py on lines 154..160

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 46.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Identical blocks of code found in 2 locations. Consider refactoring.
                              Open

                                      if any([user, channel]) and not all([user, channel]):
                                          # Or user/channel or nothing, but not partial
                                          raise ConanException("Invalid parameter '%s', "
                                                               "specify the full reference or user/channel" % args.reference)
                              Severity: Major
                              Found in conans/client/command.py and 1 other location - About 1 hr to fix
                              conans/client/command.py on lines 1110..1113

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 42.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Identical blocks of code found in 2 locations. Consider refactoring.
                              Open

                                      if any([user, channel]) and not all([user, channel]):
                                          # Or user/channel or nothing, but not partial
                                          raise ConanException("Invalid parameter '%s', "
                                                               "specify the full reference or user/channel" % args.reference)
                              Severity: Major
                              Found in conans/client/command.py and 1 other location - About 1 hr to fix
                              conans/client/command.py on lines 361..364

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 42.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                      try:
                                          if "@" in args.path and ConanFileReference.loads(args.path):
                                              raise ArgumentError(None,
                                                                  "'conan source' doesn't accept a reference anymore. "
                                                                  "If you were using it as a concurrency workaround, "
                              Severity: Major
                              Found in conans/client/command.py and 2 other locations - About 1 hr to fix
                              conans/client/command.py on lines 935..946
                              conans/client/command.py on lines 983..987

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 41.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                      try:
                                          if "@" in args.path and ConanFileReference.loads(args.path):
                                              raise ArgumentError(None, "Parameter 'path' cannot be a reference. Use a folder "
                                                                        "containing a conanfile.py or conanfile.txt file.")
                                      except ConanException:
                              Severity: Major
                              Found in conans/client/command.py and 2 other locations - About 1 hr to fix
                              conans/client/command.py on lines 838..847
                              conans/client/command.py on lines 935..946

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 41.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 3 locations. Consider refactoring.
                              Open

                                      try:
                                          if "@" in args.path and ConanFileReference.loads(args.path):
                                              raise ArgumentError(None,
                                                                  "'conan package' doesn't accept a reference anymore. "
                                                                  "The path parameter should be a conanfile.py or a folder "
                              Severity: Major
                              Found in conans/client/command.py and 2 other locations - About 1 hr to fix
                              conans/client/command.py on lines 838..847
                              conans/client/command.py on lines 983..987

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 41.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                      except Exception as exc:
                                          import traceback
                                          print(traceback.format_exc())
                                          ret_code = ERROR_GENERAL
                                          msg = exception_message_safe(exc)
                              Severity: Major
                              Found in conans/client/command.py and 1 other location - About 1 hr to fix
                              conans/cli/cli.py on lines 194..199

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 41.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                      if len(matches) > 1:
                                          self._out.writeln("The most similar commands are")
                                      else:
                                          self._out.writeln("The most similar command is")
                              Severity: Minor
                              Found in conans/client/command.py and 1 other location - About 55 mins to fix
                              conans/cli/cli.py on lines 85..88

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 37.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                      if args.lockfile and (args.profile_host or args.settings_host or args.options_host or
                                                            args.env_host or args.conf_host):
                                          raise ConanException("Cannot use profile, settings, options, env or conf 'host' when "
                              Severity: Minor
                              Found in conans/client/command.py and 1 other location - About 50 mins to fix
                              conans/client/command.py on lines 2150..2152

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 36.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                      if args.lockfile and (args.profile_build or args.settings_build or args.options_build or
                                                            args.env_build or args.conf_build):
                                          raise ConanException("Cannot use profile, settings, options, env or conf 'build' when "
                              Severity: Minor
                              Found in conans/client/command.py and 1 other location - About 50 mins to fix
                              conans/client/command.py on lines 2154..2156

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 36.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                          try:
                                              command = args[0][0]
                                          except IndexError:  # No parameters
                                              self._show_help()
                                              return False
                              Severity: Minor
                              Found in conans/client/command.py and 1 other location - About 40 mins to fix
                              conans/cli/cli.py on lines 108..112

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 34.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 8 locations. Consider refactoring.
                              Open

                                          profile_build = ProfileData(profiles=args.profile_build, settings=args.settings_build,
                                                                      options=args.options_build, env=args.env_build,
                                                                      conf=args.conf_build)
                              Severity: Major
                              Found in conans/client/command.py and 7 other locations - About 35 mins to fix
                              conans/client/command.py on lines 299..301
                              conans/client/command.py on lines 374..376
                              conans/client/command.py on lines 508..510
                              conans/client/command.py on lines 723..725
                              conans/client/command.py on lines 1044..1046
                              conans/client/command.py on lines 1857..1859
                              conans/client/command.py on lines 2046..2048

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 33.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 8 locations. Consider refactoring.
                              Open

                                      profile_build = ProfileData(profiles=args.profile_build, settings=args.settings_build,
                                                                  options=args.options_build, env=args.env_build,
                                                                  conf=args.conf_build)
                              Severity: Major
                              Found in conans/client/command.py and 7 other locations - About 35 mins to fix
                              conans/client/command.py on lines 299..301
                              conans/client/command.py on lines 374..376
                              conans/client/command.py on lines 508..510
                              conans/client/command.py on lines 723..725
                              conans/client/command.py on lines 1044..1046
                              conans/client/command.py on lines 2043..2045
                              conans/client/command.py on lines 2046..2048

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 33.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 8 locations. Consider refactoring.
                              Open

                                          profile_host = ProfileData(profiles=args.profile_host, settings=args.settings_host,
                                                                     options=args.options_host, env=args.env_host,
                                                                     conf=args.conf_host)
                              Severity: Major
                              Found in conans/client/command.py and 7 other locations - About 35 mins to fix
                              conans/client/command.py on lines 299..301
                              conans/client/command.py on lines 374..376
                              conans/client/command.py on lines 508..510
                              conans/client/command.py on lines 723..725
                              conans/client/command.py on lines 1044..1046
                              conans/client/command.py on lines 1857..1859
                              conans/client/command.py on lines 2043..2045

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 33.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 8 locations. Consider refactoring.
                              Open

                                          profile_build = ProfileData(profiles=args.profile_build, settings=args.settings_build,
                                                                      options=args.options_build, env=args.env_build,
                                                                      conf=args.conf_build)
                              Severity: Major
                              Found in conans/client/command.py and 7 other locations - About 35 mins to fix
                              conans/client/command.py on lines 299..301
                              conans/client/command.py on lines 508..510
                              conans/client/command.py on lines 723..725
                              conans/client/command.py on lines 1044..1046
                              conans/client/command.py on lines 1857..1859
                              conans/client/command.py on lines 2043..2045
                              conans/client/command.py on lines 2046..2048

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 33.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 8 locations. Consider refactoring.
                              Open

                                      profile_build = ProfileData(profiles=args.profile_build, settings=args.settings_build,
                                                                  options=args.options_build, env=args.env_build,
                                                                  conf=args.conf_build)
                              Severity: Major
                              Found in conans/client/command.py and 7 other locations - About 35 mins to fix
                              conans/client/command.py on lines 299..301
                              conans/client/command.py on lines 374..376
                              conans/client/command.py on lines 508..510
                              conans/client/command.py on lines 1044..1046
                              conans/client/command.py on lines 1857..1859
                              conans/client/command.py on lines 2043..2045
                              conans/client/command.py on lines 2046..2048

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 33.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 8 locations. Consider refactoring.
                              Open

                                          profile_build = ProfileData(profiles=args.profile_build, settings=args.settings_build,
                                                                      options=args.options_build, env=args.env_build,
                                                                      conf=args.conf_build)
                              Severity: Major
                              Found in conans/client/command.py and 7 other locations - About 35 mins to fix
                              conans/client/command.py on lines 299..301
                              conans/client/command.py on lines 374..376
                              conans/client/command.py on lines 508..510
                              conans/client/command.py on lines 723..725
                              conans/client/command.py on lines 1857..1859
                              conans/client/command.py on lines 2043..2045
                              conans/client/command.py on lines 2046..2048

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 33.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 8 locations. Consider refactoring.
                              Open

                                      profile_build = ProfileData(profiles=args.profile_build, settings=args.settings_build,
                                                                  options=args.options_build, env=args.env_build,
                                                                  conf=args.conf_build)
                              Severity: Major
                              Found in conans/client/command.py and 7 other locations - About 35 mins to fix
                              conans/client/command.py on lines 374..376
                              conans/client/command.py on lines 508..510
                              conans/client/command.py on lines 723..725
                              conans/client/command.py on lines 1044..1046
                              conans/client/command.py on lines 1857..1859
                              conans/client/command.py on lines 2043..2045
                              conans/client/command.py on lines 2046..2048

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 33.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 8 locations. Consider refactoring.
                              Open

                                      profile_build = ProfileData(profiles=args.profile_build, settings=args.settings_build,
                                                                  options=args.options_build, env=args.env_build,
                                                                  conf=args.conf_build)
                              Severity: Major
                              Found in conans/client/command.py and 7 other locations - About 35 mins to fix
                              conans/client/command.py on lines 299..301
                              conans/client/command.py on lines 374..376
                              conans/client/command.py on lines 723..725
                              conans/client/command.py on lines 1044..1046
                              conans/client/command.py on lines 1857..1859
                              conans/client/command.py on lines 2043..2045
                              conans/client/command.py on lines 2046..2048

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 33.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Similar blocks of code found in 2 locations. Consider refactoring.
                              Open

                                              if command in ["-v", "--version"]:
                                                  self._out.success("Conan version %s" % client_version)
                                                  return False
                              Severity: Minor
                              Found in conans/client/command.py and 1 other location - About 35 mins to fix
                              conans/cli/cli.py on lines 116..118

                              Duplicated Code

                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                              Tuning

                              This issue has a mass of 33.

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

                              Line too long (101 > 100 characters)
                              Open

                                      _add_common_install_arguments(parser, build_help=_help_build_policies.format("package name"))
                              Severity: Minor
                              Found in conans/client/command.py by pep8

                              Limit all lines to a maximum of 79 characters.

                              There are still many devices around that are limited to 80 character
                              lines; plus, limiting windows to 80 characters makes it possible to
                              have several windows side-by-side.  The default wrapping on such
                              devices looks ugly.  Therefore, please limit all lines to a maximum
                              of 79 characters. For flowing long blocks of text (docstrings or
                              comments), limiting the length to 72 characters is recommended.
                              
                              Reports error E501.

                              Line too long (105 > 100 characters)
                              Open

                                                                     help="git repository, local file or folder or zip file (local or "
                              Severity: Minor
                              Found in conans/client/command.py by pep8

                              Limit all lines to a maximum of 79 characters.

                              There are still many devices around that are limited to 80 character
                              lines; plus, limiting windows to 80 characters makes it possible to
                              have several windows side-by-side.  The default wrapping on such
                              devices looks ugly.  Therefore, please limit all lines to a maximum
                              of 79 characters. For flowing long blocks of text (docstrings or
                              comments), limiting the length to 72 characters is recommended.
                              
                              Reports error E501.

                              There are no issues that match your filters.

                              Category
                              Status