cloudcomputinghust/CAL

View on GitHub

Showing 38 of 240 total issues

Function upload_object has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def upload_object(self, container, obj, contents,
Severity: Minor
Found in calplus/v1/object_storage/client.py - About 45 mins to fix

    Function create has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def create(self, image, flavor,
    Severity: Minor
    Found in calplus/v1/compute/drivers/base.py - About 45 mins to fix

      Function upload_object has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def upload_object(self, container, obj, contents,
      Severity: Minor
      Found in calplus/v1/object_storage/drivers/amazon.py - About 45 mins to fix

        Function upload_object has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def upload_object(self, container, obj, contents,
        Severity: Minor
        Found in calplus/v1/object_storage/drivers/base.py - About 45 mins to fix

          Function create has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def create(self, image_id, flavor_id,
          Severity: Minor
          Found in calplus/v1/compute/drivers/openstack.py - About 45 mins to fix

            Function upload_object has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def upload_object(self, container, obj, contents,
            Severity: Minor
            Found in calplus/v1/object_storage/drivers/openstack.py - About 45 mins to fix

              Function create has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def create(self, image_id, flavor_id,
              Severity: Minor
              Found in calplus/tests/unit/v1/compute/drivers/test_base_driver.py - About 45 mins to fix

                Function create has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def create(self, image_id, flavor_id,
                Severity: Minor
                Found in calplus/v1/compute/drivers/amazon.py - About 45 mins to fix

                  Function create has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def create(self, image, flavor,
                  Severity: Minor
                  Found in calplus/v1/compute/client.py - About 45 mins to fix

                    Function copy_object has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def copy_object(self, container, obj, metadata=None,
                    Severity: Minor
                    Found in calplus/v1/object_storage/drivers/base.py - About 35 mins to fix

                      Function upload_object has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def upload_object(self, container, obj, content,
                      Severity: Minor
                      Found in calplus/tests/unit/v1/object_storage/drivers/test_base_driver.py - About 35 mins to fix

                        Function copy_object has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def copy_object(self, container, obj, metadata=None,
                        Severity: Minor
                        Found in calplus/v1/object_storage/client.py - About 35 mins to fix

                          Function copy_object has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              def copy_object(self, container, obj, metadata=None,
                          Severity: Minor
                          Found in calplus/v1/object_storage/drivers/amazon.py - About 35 mins to fix

                            Function copy_object has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def copy_object(self, container, obj, metadata=None,
                            Severity: Minor
                            Found in calplus/v1/object_storage/drivers/openstack.py - About 35 mins to fix

                              Function _first_hook has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                              def _first_hook(req, resp, resource, params):
                                  if resource.req_ids is None:
                                      raise falcon.HTTPBadRequest(title='Append request id failed',
                                                                  description='Append request id failed')
                              
                              
                              Severity: Minor
                              Found in calplus/tests/unit/test_wsgi.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 test_list_opts has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def test_list_opts(self):
                                      for group, opt_list in opts.list_opts():
                                          if isinstance(group, six.string_types):
                                              self.assertEqual(group, 'DEFAULT')
                                          else:
                              Severity: Minor
                              Found in calplus/tests/unit/conf/test_conf.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 get_list_providers has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                              def get_list_providers():
                                  # ensure all driver groups have been registered
                                  sections = CONF.list_all_sections()
                                  for section in sections:
                                      CONF.register_group(cfg.OptGroup(section))
                              Severity: Minor
                              Found in calplus/utils.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 test_load_config_file_to_realize_all_driver has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def test_load_config_file_to_realize_all_driver(self):
                                      CONF(['--config-file',
                                            'calplus/tests/fake_config_file.conf'])
                                      # TODO: Maybe we need remove example group,
                                      # such as: openstack and amazon
                              Severity: Minor
                              Found in calplus/tests/unit/conf/test_conf.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