conan-io/conan

View on GitHub

Showing 364 of 2,550 total issues

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

      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 '-m32'
        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 'clang-cl'
            Severity: Major
            Found in conan/tools/qbs/qbsprofile.py - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

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

                Avoid too many return statements within this function.
                Open

                            return "MinGW 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"]
                  Severity: Major
                  Found in conan/tools/build/cppstd.py - About 30 mins to fix

                    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 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 (self._nonzero_items, self._build) < (other._nonzero_items, other._build)
                        Severity: Major
                        Found in conan/tools/scm/__init__.py - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                      return "/Qm64" if the_os == "Windows" 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 cmd
                            Severity: Major
                            Found in conan/tools/env/environment.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

                                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 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 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

                                Function collect_libs has a Cognitive Complexity of 21 (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 conans/client/tools/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

                                Severity
                                Category
                                Status
                                Source
                                Language