conan-io/conan

View on GitHub

Showing 364 of 2,550 total issues

Avoid too many return statements within this function.
Open

                return '-maix32'
Severity: Major
Found in conan/tools/_compilers.py - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

            return "Unix Makefiles"
    Severity: Major
    Found in conan/tools/cmake/toolchain/toolchain.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

          return ["98", "gnu98", "11", "gnu11", "14", "gnu14", "17", "gnu17", "20", "gnu20", "23", "gnu23"]
      Severity: Major
      Found in conan/tools/build/cppstd.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                            return False
        Severity: Major
        Found in conan/tools/scm/__init__.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                              return self._nonzero_items < other._nonzero_items
          Severity: Major
          Found in conan/tools/scm/__init__.py - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                            return '--target=%s-apple-ios%s-macabi' % (apple_arch, subsystem_ios_version)
            Severity: Major
            Found in conan/tools/_compilers.py - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                          return "/Qm32" if str(compiler_base) == "Visual Studio" else "-m32"
              Severity: Major
              Found in conan/tools/_compilers.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                            return "/Qm64" if str(compiler_base) == "Visual Studio" else "-m64"
                Severity: Major
                Found in conan/tools/_compilers.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                              return '-m31'
                  Severity: Major
                  Found in conan/tools/_compilers.py - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                return "/Qm32" if the_os == "Windows" else "-m32"
                    Severity: Major
                    Found in conan/tools/_compilers.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                          return None
                      Severity: Major
                      Found in conan/tools/build/stdcpp_library.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                    return '-m64'
                        Severity: Major
                        Found in conan/tools/_compilers.py - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                  return toolset
                          Severity: Major
                          Found in conan/tools/microsoft/visual.py - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                    return ["98", "gnu98", "11", "gnu11", "14", "gnu14", "17", "gnu17", "20", "gnu20"]
                            Severity: Major
                            Found in conan/tools/build/cppstd.py - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                  return compiler
                              Severity: Major
                              Found in conan/tools/qbs/qbsprofile.py - About 30 mins to fix

                                Function configuration_install has a Cognitive Complexity of 21 (exceeds 20 allowed). Consider refactoring.
                                Open

                                def configuration_install(app, uri, verify_ssl, config_type=None,
                                                          args=None, source_folder=None, target_folder=None):
                                    cache, output, requester = app.cache, app.out, app.requester
                                    configs = []
                                    configs_file = cache.config_install_file
                                Severity: Minor
                                Found in conans/client/conf/config_installer.py - About 25 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 merge_directories has a Cognitive Complexity of 21 (exceeds 20 allowed). Consider refactoring.
                                Open

                                def merge_directories(src, dst, excluded=None):
                                    src = os.path.normpath(src)
                                    dst = os.path.normpath(dst)
                                    excluded = excluded or []
                                    excluded = [os.path.normpath(entry) for entry in excluded]
                                Severity: Minor
                                Found in conans/util/files.py - About 25 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 detected_architecture has a Cognitive Complexity of 21 (exceeds 20 allowed). Consider refactoring.
                                Open

                                def detected_architecture():
                                    # FIXME: Very weak check but not very common to run conan in other architectures
                                    machine = platform.machine()
                                    os_info = OSInfo()
                                    arch = None
                                Severity: Minor
                                Found in conans/client/tools/oss.py - About 25 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 print_search_recipes has a Cognitive Complexity of 21 (exceeds 20 allowed). Consider refactoring.
                                Open

                                    def print_search_recipes(self, search_info, pattern, raw, all_remotes_search):
                                        """ Print all the exported conans information
                                        param pattern: wildcards, e.g., "opencv/*"
                                        """
                                        if not search_info and not raw:
                                Severity: Minor
                                Found in conans/client/printer.py - About 25 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 gather_files has a Cognitive Complexity of 21 (exceeds 20 allowed). Consider refactoring.
                                Open

                                def gather_files(folder):
                                    file_dict = {}
                                    symlinks = {}
                                    keep_python = get_env("CONAN_KEEP_PYTHON_FILES", False)
                                    for root, dirs, files in walk(folder):
                                Severity: Minor
                                Found in conans/model/manifest.py - About 25 mins to fix

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Severity
                                Category
                                Status
                                Source
                                Language