conan-io/conan

View on GitHub

Showing 365 of 2,578 total issues

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

                    Avoid too many return statements within this function.
                    Open

                        return False
                    Severity: Major
                    Found in conan/tools/build/cross_building.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 '-m31'
                        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 '--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 ["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 ["98", "gnu98", "11", "gnu11", "14", "gnu14", "17", "gnu17"]
                                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 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 _download_recipe has a Cognitive Complexity of 21 (exceeds 20 allowed). Consider refactoring.
                                  Open

                                      def _download_recipe(self, layout, ref, output, remotes, remote, recorder):
                                  
                                          def _retrieve_from_remote(the_remote):
                                              output.info("Trying with '%s'..." % the_remote.name)
                                              # If incomplete, resolve the latest in server
                                  Severity: Minor
                                  Found in conans/client/graph/proxy.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