cloudfoundry-community/bosh-cloudstack-cpi

View on GitHub

Showing 548 of 1,705 total issues

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

    def user_data(server_name, network_spec, public_key = nil)
      data = {}

      data['registry'] = { 'endpoint' => @registry.endpoint }
      data['server'] = { 'name' => server_name }
Severity: Minor
Found in bosh_openstack_cpi/lib/cloud/openstack/cloud.rb and 1 other location - About 40 mins to fix
bosh_cloudstack_cpi/lib/cloud/cloudstack/cloud.rb on lines 658..669

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

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 Network
    include Helpers

    ##
    # Creates a new network
Severity: Major
Found in bosh_cloudstack_cpi/lib/cloud/cloudstack/network.rb and 2 other locations - About 40 mins to fix
bosh_aws_cpi/lib/cloud/aws/network.rb on lines 6..33
bosh_openstack_cpi/lib/cloud/openstack/network.rb on lines 7..34

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

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

    create_data_type("vim.profile.ComplianceResult", "ComplianceResult", "vmodl.DynamicData", "vim.version.version5", [["profile", "vim.profile.Profile", "vim.version.version5", {:optional => true}], ["complianceStatus", "string", "vim.version.version5"], ["entity", "vim.ManagedEntity", "vim.version.version5", {:optional => true}], ["checkTime", "vmodl.DateTime", "vim.version.version5", {:optional => true}], ["failure", "vim.profile.ComplianceResult.ComplianceFailure[]", "vim.version.version5", {:optional => true}]])
Severity: Minor
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 1 other location - About 40 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1871..1871

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

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

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

      def parse_user_data(raw_user_data)
        begin
          user_data = Yajl::Parser.parse(raw_user_data)
        rescue Yajl::ParseError => e
          raise LoadSettingsError, "Cannot parse user data #{raw_user_data.inspect}: #{e.message}"
Severity: Minor
Found in bosh_agent/lib/bosh_agent/infrastructure/openstack/registry.rb and 1 other location - About 40 mins to fix
bosh_agent/lib/bosh_agent/infrastructure/cloudstack/registry.rb on lines 173..184

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

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

    create_data_type("vim.dvs.VmwareDistributedVirtualSwitch.ConfigInfo", "VMwareDVSConfigInfo", "vim.DistributedVirtualSwitch.ConfigInfo", "vim.version.version5", [["vspanSession", "vim.dvs.VmwareDistributedVirtualSwitch.VspanSession[]", "vim.version.version7", {:optional => true}], ["pvlanConfig", "vim.dvs.VmwareDistributedVirtualSwitch.PvlanMapEntry[]", "vim.version.version5", {:optional => true}], ["maxMtu", "int", "vim.version.version5"], ["linkDiscoveryProtocolConfig", "vim.host.LinkDiscoveryProtocolConfig", "vim.version.version5", {:optional => true}], ["ipfixConfig", "vim.dvs.VmwareDistributedVirtualSwitch.IpfixConfig", "vim.version.version7", {:optional => true}]])
Severity: Minor
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 1 other location - About 40 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1477..1477

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

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

    create_data_type("vim.UserSession", "UserSession", "vmodl.DynamicData", "vim.version.version1", [["key", "string", "vim.version.version1"], ["userName", "string", "vim.version.version1"], ["fullName", "string", "vim.version.version1"], ["loginTime", "vmodl.DateTime", "vim.version.version1"], ["lastActiveTime", "vmodl.DateTime", "vim.version.version1"], ["locale", "string", "vim.version.version1"], ["messageLocale", "string", "vim.version.version1"], ["extensionSession", "boolean", "vim.version.version7"]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 3 other locations - About 40 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1078..1078
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2277..2277
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2479..2479

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

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

    create_data_type("vim.fault.CpuIncompatible1ECX", "CpuIncompatible1ECX", "vim.fault.CpuIncompatible", "vim.version.version2", [["sse3", "boolean", "vim.version.version2"], ["pclmulqdq", "boolean", "vim.version.version7"], ["ssse3", "boolean", "vim.version.version2"], ["sse41", "boolean", "vim.version.version2"], ["sse42", "boolean", "vim.version.version2"], ["aes", "boolean", "vim.version.version7"], ["other", "boolean", "vim.version.version2"], ["otherOnly", "boolean", "vim.version.version2"]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 3 other locations - About 40 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 353..353
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1078..1078
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2277..2277

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

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

    case int64Val:
        y := y.(int64Val)
        switch op {
        case token.EQL:
            return x == y
Severity: Minor
Found in go_agent/src/code.google.com/p/go.tools/go/exact/exact.go and 1 other location - About 40 mins to fix
go_agent/src/code.google.com/p/go.tools/go/exact/exact.go on lines 748..763

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

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

    case stringVal:
        y := y.(stringVal)
        switch op {
        case token.EQL:
            return x == y
Severity: Minor
Found in go_agent/src/code.google.com/p/go.tools/go/exact/exact.go and 1 other location - About 40 mins to fix
go_agent/src/code.google.com/p/go.tools/go/exact/exact.go on lines 714..729

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

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

    for _, c := range b.Succs {
        found := false
        for _, bb := range c.Preds {
            if bb == b {
                found = true
Severity: Minor
Found in go_agent/src/code.google.com/p/go.tools/ssa/sanity.go and 1 other location - About 40 mins to fix
go_agent/src/code.google.com/p/go.tools/ssa/sanity.go on lines 262..276

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

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

    for _, a := range b.Preds {
        found := false
        for _, bb := range a.Succs {
            if bb == b {
                found = true
Severity: Minor
Found in go_agent/src/code.google.com/p/go.tools/ssa/sanity.go and 1 other location - About 40 mins to fix
go_agent/src/code.google.com/p/go.tools/ssa/sanity.go on lines 277..291

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

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

    def get_network_settings(network_name, network_properties)
      type = network_properties["type"] || "manual"
      unless type && SUPPORTED_NETWORK_TYPES.include?(type)
        raise Bosh::Agent::StateError, "Unsupported network type '%s', valid types are: %s" %
                                       [type, SUPPORTED_NETWORK_TYPES.join(", ")]
Severity: Minor
Found in bosh_agent/lib/bosh_agent/infrastructure/openstack/settings.rb and 2 other locations - About 40 mins to fix
bosh_agent/lib/bosh_agent/infrastructure/aws/settings.rb on lines 44..55
bosh_agent/lib/bosh_agent/infrastructure/cloudstack/settings.rb on lines 62..72

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

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

    def get_network_settings(network_name, network_properties)
      type = network_properties["type"] || "manual"
      unless type && SUPPORTED_NETWORK_TYPES.include?(type)
        raise Bosh::Agent::StateError, "Unsupported network type '%s', valid types are: %s" %
                                       [type, SUPPORTED_NETWORK_TYPES.join(", ")]
bosh_agent/lib/bosh_agent/infrastructure/aws/settings.rb on lines 44..55
bosh_agent/lib/bosh_agent/infrastructure/openstack/settings.rb on lines 62..72

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

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
      db_configs.each do |rds_db_conf|
        rds_args = { vpc_receipt: vpc_receipt, rds_db_conf: rds_db_conf }
        rds_db = RdsDb.new(rds_args)
        dbs << rds_db
bosh_cli_plugin_aws/migrations/20130412183544_create_rds_dbs.rb on lines 16..31

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

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
      db_configs.each do |rds_db_conf|
        rds_args = { vpc_receipt: vpc_receipt, rds_db_conf: rds_db_conf }
        rds_db = RdsDb.new(rds_args)
        dbs << rds_db
Severity: Minor
Found in bosh_cli_plugin_aws/migrations/20130412183544_create_rds_dbs.rb and 1 other location - About 40 mins to fix
bosh_cli_plugin_aws/migrations/20130531180445_create_bosh_rds_db.rb on lines 11..26

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

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

    def get_network_settings(network_name, properties)
      type = properties["type"] || "manual"
      unless type && SUPPORTED_NETWORK_TYPES.include?(type)
        raise Bosh::Agent::StateError,
              "Unsupported network type '%s', valid types are: %s" %
Severity: Minor
Found in bosh_agent/lib/bosh_agent/infrastructure/aws/settings.rb and 2 other locations - About 40 mins to fix
bosh_agent/lib/bosh_agent/infrastructure/cloudstack/settings.rb on lines 62..72
bosh_agent/lib/bosh_agent/infrastructure/openstack/settings.rb on lines 62..72

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

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

    create_data_type("vim.host.MultipathInfo.LogicalUnit", "HostMultipathInfoLogicalUnit", "vmodl.DynamicData", "vim.version.version1", [["key", "string", "vim.version.version1"], ["id", "string", "vim.version.version1"], ["lun", "vim.host.ScsiLun", "vim.version.version1", {:link => true}], ["path", "vim.host.MultipathInfo.Path[]", "vim.version.version1"], ["policy", "vim.host.MultipathInfo.LogicalUnitPolicy", "vim.version.version1"], ["storageArrayTypePolicy", "vim.host.MultipathInfo.LogicalUnitStorageArrayTypePolicy", "vim.version.version5", {:optional => true}]])
Severity: Minor
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 1 other location - About 35 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 251..251

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

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

    create_data_type("vim.HttpNfcLease.Info", "HttpNfcLeaseInfo", "vmodl.DynamicData", "vim.version.version5", [["lease", "vim.HttpNfcLease", "vim.version.version5"], ["entity", "vim.ManagedEntity", "vim.version.version5"], ["deviceUrl", "vim.HttpNfcLease.DeviceUrl[]", "vim.version.version5", {:optional => true}], ["totalDiskCapacityInKB", "long", "vim.version.version5"], ["leaseTimeout", "int", "vim.version.version5"], ["hostMap", "vim.HttpNfcLease.DatastoreLeaseInfo[]", "vim.version.version6", {:optional => true}]])
Severity: Minor
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 1 other location - About 35 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1208..1208

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

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 7 locations. Consider refactoring.
Open

    create_data_type("vim.VirtualMachine.Ticket", "VirtualMachineTicket", "vmodl.DynamicData", "vim.version.version6", [["ticket", "string", "vim.version.version6"], ["cfgFile", "string", "vim.version.version6"], ["host", "string", "vim.version.version6", {:optional => true}], ["port", "int", "vim.version.version6", {:optional => true}], ["sslThumbprint", "string", "vim.version.version6", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 6 other locations - About 35 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 289..289
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 492..492
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 950..950
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1364..1364
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1861..1861
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2478..2478

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

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 7 locations. Consider refactoring.
Open

    create_data_type("vim.VirtualMachine.MksTicket", "VirtualMachineMksTicket", "vmodl.DynamicData", "vim.version.version1", [["ticket", "string", "vim.version.version1"], ["cfgFile", "string", "vim.version.version1"], ["host", "string", "vim.version.version1", {:optional => true}], ["port", "int", "vim.version.version1", {:optional => true}], ["sslThumbprint", "string", "vim.version.version2", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 6 other locations - About 35 mins to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 289..289
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 492..492
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 950..950
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1364..1364
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1860..1860
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2478..2478

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

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