Showing 459 of 459 total issues

Similar blocks of code found in 9 locations. Consider refactoring.
Open

  module Compute
    class VcloudDirector
      class Real
        # Retrieve the value of the specified key from vApp template or VM
        # metadata.
lib/fog/vcloud_director/requests/compute/get_catalog_item_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_catalog_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_disk_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_media_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_network_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_vapp_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_vdc_metadata_item_metadata.rb on lines 2..23
lib/fog/vcloud_director/requests/compute/get_vdc_storage_class_metadata_item_metadata.rb on lines 2..20

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 27.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 9 locations. Consider refactoring.
Open

  module Compute
    class VcloudDirector
      class Real
        # Retrieve the value of the specified key from disk metadata.
        #
lib/fog/vcloud_director/requests/compute/get_catalog_item_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_catalog_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_media_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_network_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_vapp_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_vapp_template_metadata_item_metadata.rb on lines 2..22
lib/fog/vcloud_director/requests/compute/get_vdc_metadata_item_metadata.rb on lines 2..23
lib/fog/vcloud_director/requests/compute/get_vdc_storage_class_metadata_item_metadata.rb on lines 2..20

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 27.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 9 locations. Consider refactoring.
Open

  module Compute
    class VcloudDirector
      class Real
        # Retrieve the value of the specified key from catalog metadata.
        #
lib/fog/vcloud_director/requests/compute/get_catalog_item_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_disk_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_media_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_network_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_vapp_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_vapp_template_metadata_item_metadata.rb on lines 2..22
lib/fog/vcloud_director/requests/compute/get_vdc_metadata_item_metadata.rb on lines 2..23
lib/fog/vcloud_director/requests/compute/get_vdc_storage_class_metadata_item_metadata.rb on lines 2..20

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 27.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 9 locations. Consider refactoring.
Open

  module Compute
    class VcloudDirector
      class Real
        # Retrieve the value of the specified key from vApp or VM metadata.
        #
lib/fog/vcloud_director/requests/compute/get_catalog_item_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_catalog_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_disk_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_media_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_network_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_vapp_template_metadata_item_metadata.rb on lines 2..22
lib/fog/vcloud_director/requests/compute/get_vdc_metadata_item_metadata.rb on lines 2..23
lib/fog/vcloud_director/requests/compute/get_vdc_storage_class_metadata_item_metadata.rb on lines 2..20

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 27.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 9 locations. Consider refactoring.
Open

  module Compute
    class VcloudDirector
      class Real
        # Retrieve the value of the specified key from media object metadata.
        #
lib/fog/vcloud_director/requests/compute/get_catalog_item_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_catalog_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_disk_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_network_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_vapp_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_vapp_template_metadata_item_metadata.rb on lines 2..22
lib/fog/vcloud_director/requests/compute/get_vdc_metadata_item_metadata.rb on lines 2..23
lib/fog/vcloud_director/requests/compute/get_vdc_storage_class_metadata_item_metadata.rb on lines 2..20

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 27.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 9 locations. Consider refactoring.
Open

  module Compute
    class VcloudDirector
      class Real
        # Retrieve the value of the specified key from network metadata.
        #
lib/fog/vcloud_director/requests/compute/get_catalog_item_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_catalog_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_disk_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_media_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_vapp_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_vapp_template_metadata_item_metadata.rb on lines 2..22
lib/fog/vcloud_director/requests/compute/get_vdc_metadata_item_metadata.rb on lines 2..23
lib/fog/vcloud_director/requests/compute/get_vdc_storage_class_metadata_item_metadata.rb on lines 2..20

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 27.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 9 locations. Consider refactoring.
Open

  module Compute
    class VcloudDirector
      class Real
        # Retrieve metadata associated with the vDC storage profile.
        #
lib/fog/vcloud_director/requests/compute/get_catalog_item_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_catalog_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_disk_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_media_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_network_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_vapp_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_vapp_template_metadata_item_metadata.rb on lines 2..22
lib/fog/vcloud_director/requests/compute/get_vdc_metadata_item_metadata.rb on lines 2..23

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 27.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 9 locations. Consider refactoring.
Open

  module Compute
    class VcloudDirector
      class Real
        # Retrieve the value of the specified key from virtual datacenter
        # metadata.
lib/fog/vcloud_director/requests/compute/get_catalog_item_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_catalog_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_disk_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_media_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_network_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_vapp_metadata_item_metadata.rb on lines 2..21
lib/fog/vcloud_director/requests/compute/get_vapp_template_metadata_item_metadata.rb on lines 2..22
lib/fog/vcloud_director/requests/compute/get_vdc_storage_class_metadata_item_metadata.rb on lines 2..20

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 27.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

          begin
            response = @connection.request(params)

          rescue Excon::Errors::HTTPStatusError => error
            raise case error
Severity: Minor
Found in lib/fog/dnsmadeeasy/dns.rb and 1 other location - About 20 mins to fix
lib/fog/bare_metal_cloud/compute.rb on lines 77..86

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 27.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

          begin
            response = @connection.request(params)
          rescue Excon::Errors::HTTPStatusError => error
            raise case error
            when Excon::Errors::NotFound
Severity: Minor
Found in lib/fog/bare_metal_cloud/compute.rb and 1 other location - About 20 mins to fix
lib/fog/dnsmadeeasy/dns.rb on lines 104..114

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 27.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

      class Real
        # Retrieve an organization.
        #
        # @param [String] id The object identifier of the organization.
        # @return [Excon:Response]
Severity: Minor
Found in lib/fog/vcloud_director/requests/compute/get_organization.rb and 3 other locations - About 15 mins to fix
lib/fog/vcloud_director/requests/compute/get_catalog.rb on lines 4..24
lib/fog/vcloud_director/requests/compute/get_media.rb on lines 4..24
lib/fog/vcloud_director/requests/compute/get_vapp.rb on lines 4..22

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

      class Real
        # Retrieve a list of all VMs attached to a disk.
        #
        # @param [String] id Object identifier of the disk.
        # @return [Excon::Response]
lib/fog/vcloud_director/requests/compute/get_vapp_metadata.rb on lines 4..22
lib/fog/vcloud_director/requests/compute/get_vm_pending_question.rb on lines 4..29

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

      class Real
        # Get available distributions
        #
        # ==== Parameters
        # * distributionId<~Integer>: id to limit results to
Severity: Minor
Found in lib/fog/linode/requests/compute/avail_distributions.rb and 2 other locations - About 15 mins to fix
lib/fog/linode/requests/compute/linode_list.rb on lines 4..23
lib/fog/linode/requests/dns/domain_list.rb on lines 4..35

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

      class Real
        # Retrieve a media object.
        #
        # @param [String] id Object identifier of the media object.
        # @return [Excon::Response]
Severity: Minor
Found in lib/fog/vcloud_director/requests/compute/get_media.rb and 3 other locations - About 15 mins to fix
lib/fog/vcloud_director/requests/compute/get_catalog.rb on lines 4..24
lib/fog/vcloud_director/requests/compute/get_organization.rb on lines 4..24
lib/fog/vcloud_director/requests/compute/get_vapp.rb on lines 4..22

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

      class Real
        # List of domains (you have access to)
        #
        # ==== Parameters
        # * domain_id<~Integer>: limit the list to the domain ID specified
Severity: Minor
Found in lib/fog/linode/requests/dns/domain_list.rb and 2 other locations - About 15 mins to fix
lib/fog/linode/requests/compute/avail_distributions.rb on lines 4..23
lib/fog/linode/requests/compute/linode_list.rb on lines 4..23

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

      class Real
        # Retrieve a vApp or VM.
        #
        # @param [String] id Object identifier of the vApp or VM.
        # @return [Excon::Response]
Severity: Minor
Found in lib/fog/vcloud_director/requests/compute/get_vapp.rb and 3 other locations - About 15 mins to fix
lib/fog/vcloud_director/requests/compute/get_catalog.rb on lines 4..24
lib/fog/vcloud_director/requests/compute/get_media.rb on lines 4..24
lib/fog/vcloud_director/requests/compute/get_organization.rb on lines 4..24

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

      class Real
        # Retrieve a question being asked by a VM.
        #
        # @param [String] id Object identifier of the VM.
        # @return [Excon::Response]
lib/fog/vcloud_director/requests/compute/get_vapp_metadata.rb on lines 4..22
lib/fog/vcloud_director/requests/compute/get_vms_disk_attached_to.rb on lines 4..22

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  module DNS
    class DNSMadeEasy
      class Real
        # Creates a secondary entry with the specified name. Returns errors if name is not valid or conflicts with another domain.
        #
Severity: Minor
Found in lib/fog/dnsmadeeasy/requests/dns/create_secondary.rb and 1 other location - About 15 mins to fix
lib/fog/dnsmadeeasy/requests/dns/update_secondary.rb on lines 2..28

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

      class Real
        # Retrieve a catalog.
        #
        # @param [String] id Object identifier of the catalog.
        # @return [Excon::Response]
Severity: Minor
Found in lib/fog/vcloud_director/requests/compute/get_catalog.rb and 3 other locations - About 15 mins to fix
lib/fog/vcloud_director/requests/compute/get_media.rb on lines 4..24
lib/fog/vcloud_director/requests/compute/get_organization.rb on lines 4..24
lib/fog/vcloud_director/requests/compute/get_vapp.rb on lines 4..22

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

      class Real
        # List all linodes user has access or delete to
        #
        # ==== Parameters
        # * linodeId<~Integer>: Limit the list to the specified LinodeID
Severity: Minor
Found in lib/fog/linode/requests/compute/linode_list.rb and 2 other locations - About 15 mins to fix
lib/fog/linode/requests/compute/avail_distributions.rb on lines 4..23
lib/fog/linode/requests/dns/domain_list.rb on lines 4..35

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language