jkawamoto/roadie

View on GitHub
cloud/azure/compute/client/availability_sets/availability_sets_client.go

Summary

Maintainability
A
3 hrs
Test Coverage

TODO found
Open

    // TODO: Validate the params before sending

TODO found
Open

    // TODO: Validate the params before sending

TODO found
Open

    // TODO: Validate the params before sending

TODO found
Open

    // TODO: Validate the params before sending

TODO found
Open

    // TODO: Validate the params before sending

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

func (a *Client) AvailabilitySetsDelete(params *AvailabilitySetsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*AvailabilitySetsDeleteOK, *AvailabilitySetsDeleteNoContent, error) {
    // TODO: Validate the params before sending
    if params == nil {
        params = NewAvailabilitySetsDeleteParams()
    }
cloud/azure/compute/client/images/images_client.go on lines 28..58
cloud/azure/compute/client/virtual_machine_extensions/virtual_machine_extensions_client.go on lines 28..58
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_client.go on lines 28..58
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_client.go on lines 187..217
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_client.go on lines 222..252
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_client.go on lines 257..287
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_client.go on lines 292..322
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_client.go on lines 327..357
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_client.go on lines 28..58
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_client.go on lines 63..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_client.go on lines 135..165
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_client.go on lines 315..345
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_client.go on lines 350..380
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_client.go on lines 385..415
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_client.go on lines 420..450
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_client.go on lines 455..485
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_client.go on lines 490..520
cloud/azure/compute/client/virtual_machines/virtual_machines_client.go on lines 28..58
cloud/azure/compute/client/virtual_machines/virtual_machines_client.go on lines 63..93
cloud/azure/compute/client/virtual_machines/virtual_machines_client.go on lines 98..128
cloud/azure/compute/client/virtual_machines/virtual_machines_client.go on lines 133..163
cloud/azure/compute/client/virtual_machines/virtual_machines_client.go on lines 350..380
cloud/azure/compute/client/virtual_machines/virtual_machines_client.go on lines 385..415
cloud/azure/compute/client/virtual_machines/virtual_machines_client.go on lines 420..450
cloud/azure/compute/client/virtual_machines/virtual_machines_client.go on lines 455..485
cloud/azure/resource/client/deployments/deployments_client.go on lines 90..120
cloud/azure/resource/client/deployments/deployments_client.go on lines 127..157
cloud/azure/resource/client/resource_groups/resource_groups_client.go on lines 57..87
cloud/azure/resource/client/resource_groups/resource_groups_client.go on lines 94..124
cloud/azure/resource/client/resources/resources_client.go on lines 323..353
cloud/azure/resource/client/tags/tags_client.go on lines 30..60
cloud/azure/resource/client/tags/tags_client.go on lines 65..95
cloud/azure/resource/client/tags/tags_client.go on lines 102..132
cloud/azure/resource/client/tags/tags_client.go on lines 137..167

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

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

don't use an underscore in package name
Open

package availability_sets

There are no issues that match your filters.

Category
Status