conan-io/conan

View on GitHub

Showing 364 of 2,550 total issues

Function upload has 11 arguments (exceeds 10 allowed). Consider refactoring.
Open

    def upload(self, pattern, package=None, remote_name=None, all_packages=False, confirm=False,
Severity: Major
Found in conans/client/conan_api.py - About 35 mins to fix

    Function _create_new_node has 11 arguments (exceeds 10 allowed). Consider refactoring.
    Open

        def _create_new_node(self, current_node, dep_graph, requirement, check_updates,
    Severity: Major
    Found in conans/client/graph/graph_builder.py - About 35 mins to fix

      Function msvc_build_command has 11 arguments (exceeds 10 allowed). Consider refactoring.
      Open

      def msvc_build_command(settings, sln_path, targets=None, upgrade_project=True, build_type=None,
      Severity: Major
      Found in conans/client/tools/win.py - About 35 mins to fix

        Function _expand_node has 11 arguments (exceeds 10 allowed). Consider refactoring.
        Open

            def _expand_node(self, node, graph, down_reqs, down_ref, down_options, check_updates, update,
        Severity: Major
        Found in conans/client/graph/graph_builder.py - About 35 mins to fix

          Function _load_graph has 11 arguments (exceeds 10 allowed). Consider refactoring.
          Open

              def _load_graph(self, root_node, check_updates, update, build_mode, remotes,
          Severity: Major
          Found in conans/client/graph/graph_manager.py - About 35 mins to fix

            Function run has 11 arguments (exceeds 10 allowed). Consider refactoring.
            Open

                def run(self, command, output=True, cwd=None, win_bash=False, subsystem=None, msys_mingw=True,
            Severity: Major
            Found in conans/model/conan_file.py - About 35 mins to fix

              Function __init__ has 11 arguments (exceeds 10 allowed). Consider refactoring.
              Open

                  def __init__(self, ref, package_id, prev, python_requires, options, requires, build_requires,
              Severity: Major
              Found in conans/model/graph_lock.py - About 35 mins to fix

                Function download has 11 arguments (exceeds 10 allowed). Consider refactoring.
                Open

                def download(conanfile, url, filename, verify=True, retry=None, retry_wait=None,
                Severity: Major
                Found in conan/tools/files/files.py - About 35 mins to fix

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

                      def command_line(self):
                          if self.generator_platform and not is_generator_platform_supported(self.generator):
                              raise ConanException('CMake does not support generator platform with generator '
                                                   '"%s:. Please check your conan profile to either remove the '
                                                   'generator platform, or change the CMake generator.'
                  Severity: Minor
                  Found in conans/client/build/cmake.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

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

                  def _parse_conanfile(conan_file_path):
                      """ From a given path, obtain the in memory python import module
                      """
                  
                      if not os.path.exists(conan_file_path):
                  Severity: Minor
                  Found in conans/client/loader.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

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

                  def _get_local_infos_min(server_store, ref, look_in_all_rrevs):
                  
                      result = {}
                      rrevs = server_store.get_recipe_revisions(ref) if look_in_all_rrevs else [None]
                  
                  
                  Severity: Minor
                  Found in conans/server/service/common/search.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

                  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

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

                  def _profile_parse_args(settings, options, envs, conf):
                      """ return a Profile object result of parsing raw data
                      """
                      def _get_tuples_list_from_extender_arg(items):
                          if not items:
                  Severity: Minor
                  Found in conans/client/profile_loader.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

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

                      def update_settings(self, new_settings):
                          """Mix the specified settings with the current profile.
                          Specified settings are prioritized to profile"""
                  
                          assert(isinstance(new_settings, OrderedDict))
                  Severity: Minor
                  Found in conans/model/profile.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

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

                  def collect_libs(conanfile, folder=None):
                      if not conanfile.package_folder:
                          return []
                      if folder:
                          lib_folders = [os.path.join(conanfile.package_folder, folder)]
                  Severity: Minor
                  Found in conan/tools/files/files.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

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

                      def generate(self):
                          toolchain_file = self._conanfile.conf.get("tools.cmake.cmaketoolchain:toolchain_file")
                          if toolchain_file is None:  # The main toolchain file generated only if user dont define
                              save(os.path.join(self._conanfile.generators_folder, self.filename), self.content)
                          # If we're using Intel oneAPI, we need to generate the environment file and run it
                  Severity: Minor
                  Found in conan/tools/cmake/toolchain/toolchain.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 "MinGW Makefiles"  # it is valid only under Windows
                  Severity: Major
                  Found in conans/client/build/cmake_flags.py - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

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

                      Avoid too many return statements within this function.
                      Open

                                      return root.findall("./entry/commit")[0].get("revision")
                      Severity: Major
                      Found in conans/client/tools/scm.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                    return AutotoolsDeps
                        Severity: Major
                        Found in conans/client/generators/__init__.py - About 30 mins to fix
                          Severity
                          Category
                          Status
                          Source
                          Language