cloudfoundry-community/bosh-cloudstack-cpi

View on GitHub

Showing 548 of 1,705 total issues

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

    create_data_type("vim.vm.PowerPolicy.Profile", "VirtualMachinePowerPolicyProfile", "vmodl.DynamicData", "vim.version.cvp", [["cpuMode", "string", "vim.version.cvp", {:optional => true}], ["monitorTimeout", "int", "vim.version.cvp", {:optional => true}], ["hardDiskTimeout", "int", "vim.version.cvp", {:optional => true}], ["hibernateTimeout", "int", "vim.version.cvp", {:optional => true}], ["suspendTimeout", "int", "vim.version.cvp", {:optional => true}], ["forcedThrottle", "int", "vim.version.cvp", {:optional => true}], ["minProcessorState", "int", "vim.version.cvp", {:optional => true}], ["maxProcessorState", "int", "vim.version.cvp", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 3 other locations - About 1 hr to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1533..1533
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1712..1712
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2417..2417

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

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.vm.device.VirtualDisk.SeSparseBackingInfo", "VirtualDiskSeSparseBackingInfo", "vim.vm.device.VirtualDevice.FileBackingInfo", "vim.version.dev", [["diskMode", "string", "vim.version.dev"], ["writeThrough", "boolean", "vim.version.dev", {:optional => true}], ["uuid", "string", "vim.version.dev", {:optional => true}], ["contentId", "string", "vim.version.dev", {:optional => true}], ["changeId", "string", "vim.version.dev", {:optional => true}], ["parent", "vim.vm.device.VirtualDisk.SeSparseBackingInfo", "vim.version.dev", {:optional => true}], ["deltaDiskFormat", "string", "vim.version.dev", {:optional => true}], ["digestEnabled", "boolean", "vim.version.dev", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 3 other locations - About 1 hr to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 952..952
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1516..1516
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1706..1706

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

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.event.EventEx", "EventEx", "vim.event.Event", "vim.version.version5", [["eventTypeId", "string", "vim.version.version5"], ["severity", "string", "vim.version.version5", {:optional => true}], ["message", "string", "vim.version.version5", {:optional => true}], ["arguments", "vmodl.KeyAnyValue[]", "vim.version.version5", {:optional => true}], ["objectId", "string", "vim.version.version5", {:optional => true}], ["objectType", "vmodl.TypeName", "vim.version.version5", {:optional => true}], ["objectName", "string", "vim.version.version6", {:optional => true}], ["fault", "vmodl.MethodFault", "vim.version.version6", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 3 other locations - About 1 hr to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1516..1516
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1706..1706
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1709..1709

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

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.vm.device.VirtualDisk.SparseVer2BackingInfo", "VirtualDiskSparseVer2BackingInfo", "vim.vm.device.VirtualDevice.FileBackingInfo", "vim.version.version1", [["diskMode", "string", "vim.version.version1"], ["split", "boolean", "vim.version.version1", {:optional => true}], ["writeThrough", "boolean", "vim.version.version1", {:optional => true}], ["spaceUsedInKB", "long", "vim.version.version1", {:optional => true}], ["uuid", "string", "vim.version.version2", {:optional => true}], ["contentId", "string", "vim.version.version5", {:optional => true}], ["changeId", "string", "vim.version.version5", {:optional => true}], ["parent", "vim.vm.device.VirtualDisk.SparseVer2BackingInfo", "vim.version.version5", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 3 other locations - About 1 hr to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 952..952
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1516..1516
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1709..1709

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

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.vApp.CloneSpec", "VAppCloneSpec", "vmodl.DynamicData", "vim.version.version5", [["location", "vim.Datastore", "vim.version.version5"], ["host", "vim.HostSystem", "vim.version.version5", {:optional => true}], ["resourceSpec", "vim.ResourceConfigSpec", "vim.version.version5", {:optional => true}], ["vmFolder", "vim.Folder", "vim.version.version5", {:optional => true}], ["networkMapping", "vim.vApp.CloneSpec.NetworkMappingPair[]", "vim.version.version5", {:optional => true}], ["property", "vim.KeyValue[]", "vim.version.version5", {:optional => true}], ["resourceMapping", "vim.vApp.CloneSpec.ResourceMap[]", "vim.version.version6", {:optional => true}], ["provisioning", "string", "vim.version.version6", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 3 other locations - About 1 hr to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 952..952
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1706..1706
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 1709..1709

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

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

func ensureCap(s []byte, n int) []byte {
    if n <= cap(s) {
        return s
    }
    // logic adapted from appendslice1 in runtime
go_agent/src/code.google.com/p/go-charset/charset/charset.go on lines 271..294

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

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

func ensureCap(s []byte, n int) []byte {
    if n <= cap(s) {
        return s
    }
    // logic adapted from appendslice1 in runtime
go_agent/src/code.google.com/p/go-charset/charset/iconv/iconv.go on lines 153..176

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

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 setup_openssh_key
      public_key = Infrastructure::Aws::Registry.get_openssh_key
      if public_key.nil? || public_key.empty?
        return
      end
Severity: Major
Found in bosh_agent/lib/bosh_agent/infrastructure/aws/settings.rb and 2 other locations - About 1 hr to fix
bosh_agent/lib/bosh_agent/infrastructure/cloudstack/settings.rb on lines 43..53
bosh_agent/lib/bosh_agent/infrastructure/openstack/settings.rb on lines 43..53

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

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

      result = {
        'name' => director_name,
        'logging' => {
          'level' => 'DEBUG'
        },
bosh-dev/lib/bosh/dev/cloudstack/micro_bosh_deployment_manifest.rb on lines 17..50

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

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

      result = {
        'name' => director_name,
        'logging' => {
          'level' => 'DEBUG'
        },
bosh-dev/lib/bosh/dev/openstack/micro_bosh_deployment_manifest.rb on lines 17..50

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

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 setup_openssh_key
      public_key = Infrastructure::Openstack::Registry.get_openssh_key
      return if public_key.nil? || public_key.empty?

      FileUtils.mkdir_p(File.dirname(authorized_keys))
bosh_agent/lib/bosh_agent/infrastructure/aws/settings.rb on lines 24..36
bosh_agent/lib/bosh_agent/infrastructure/cloudstack/settings.rb on lines 43..53

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

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 setup_openssh_key
      public_key = Infrastructure::Cloudstack::Registry.get_openssh_key
      return if public_key.nil? || public_key.empty?

      FileUtils.mkdir_p(File.dirname(authorized_keys))
bosh_agent/lib/bosh_agent/infrastructure/aws/settings.rb on lines 24..36
bosh_agent/lib/bosh_agent/infrastructure/openstack/settings.rb on lines 43..53

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

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

func redir(w http.ResponseWriter, r *http.Request) (redirected bool) {
    canonical := pathpkg.Clean(r.URL.Path)
    if !strings.HasSuffix(canonical, "/") {
        canonical += "/"
    }
go_agent/src/code.google.com/p/go.tools/godoc/server.go on lines 395..407

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

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

func redirect(w http.ResponseWriter, r *http.Request) (redirected bool) {
    canonical := pathpkg.Clean(r.URL.Path)
    if !strings.HasSuffix(canonical, "/") {
        canonical += "/"
    }
Severity: Major
Found in go_agent/src/code.google.com/p/go.tools/godoc/server.go and 1 other location - About 1 hr to fix
go_agent/src/code.google.com/p/go.tools/cmd/godoc/codewalk.go on lines 85..97

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

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

      @packages.each do |package|
        say("#{package.name} (#{package.version})".ljust(30), " ")
        if remote_package_exists?(package)
          say("SKIP".make_yellow)
          next
Severity: Major
Found in bosh_cli/lib/cli/release_compiler.rb and 1 other location - About 1 hr to fix
bosh_cli/lib/cli/release_compiler.rb on lines 69..81

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

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.cluster.ConfigInfoEx", "ClusterConfigInfoEx", "vim.ComputeResource.ConfigInfo", "vim.version.version2", [["dasConfig", "vim.cluster.DasConfigInfo", "vim.version.version2"], ["dasVmConfig", "vim.cluster.DasVmConfigInfo[]", "vim.version.version2", {:optional => true}], ["drsConfig", "vim.cluster.DrsConfigInfo", "vim.version.version2"], ["drsVmConfig", "vim.cluster.DrsVmConfigInfo[]", "vim.version.version2", {:optional => true}], ["rule", "vim.cluster.RuleInfo[]", "vim.version.version2", {:optional => true}], ["dpmConfigInfo", "vim.cluster.DpmConfigInfo", "vim.version.version2", {:optional => true}], ["dpmHostConfig", "vim.cluster.DpmHostConfigInfo[]", "vim.version.version2", {:optional => true}], ["group", "vim.cluster.GroupInfo[]", "vim.version.version6", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 1 other location - About 1 hr to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2264..2264

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

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

      @jobs.each do |job|
        say("#{job.name} (#{job.version})".ljust(30), " ")
        if remote_job_exists?(job)
          say("SKIP".make_yellow)
          next
Severity: Major
Found in bosh_cli/lib/cli/release_compiler.rb and 1 other location - About 1 hr to fix
bosh_cli/lib/cli/release_compiler.rb on lines 53..65

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

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.InternetScsiHba.StaticTarget", "HostInternetScsiHbaStaticTarget", "vmodl.DynamicData", "vim.version.version1", [["address", "string", "vim.version.version1"], ["port", "int", "vim.version.version1", {:optional => true}], ["iScsiName", "string", "vim.version.version1"], ["authenticationProperties", "vim.host.InternetScsiHba.AuthenticationProperties", "vim.version.version5", {:optional => true}], ["digestProperties", "vim.host.InternetScsiHba.DigestProperties", "vim.version.version5", {:optional => true}], ["supportedAdvancedOptions", "vim.option.OptionDef[]", "vim.version.version5", {:optional => true}], ["advancedOptions", "vim.host.InternetScsiHba.ParamValue[]", "vim.version.version5", {:optional => true}], ["parent", "string", "vim.version.version5", {:optional => true}]])
Severity: Major
Found in bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb and 1 other location - About 1 hr to fix
bosh_vsphere_cpi/lib/ruby_vim_sdk/server_objects.rb on lines 2416..2416

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

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 *ast.SwitchStmt:
        anyReachable := false
        hasDefault := false
        for _, cas := range x.Body.List {
            cc := cas.(*ast.CaseClause)
Severity: Major
Found in go_agent/src/code.google.com/p/go.tools/cmd/vet/deadcode.go and 1 other location - About 1 hr to fix
go_agent/src/code.google.com/p/go.tools/cmd/vet/deadcode.go on lines 264..278

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

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 *ast.TypeSwitchStmt:
        anyReachable := false
        hasDefault := false
        for _, cas := range x.Body.List {
            cc := cas.(*ast.CaseClause)
Severity: Major
Found in go_agent/src/code.google.com/p/go.tools/cmd/vet/deadcode.go and 1 other location - About 1 hr to fix
go_agent/src/code.google.com/p/go.tools/cmd/vet/deadcode.go on lines 248..262

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

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