jkawamoto/roadie

View on GitHub

Showing 2,161 of 2,161 total issues

FileGetFromTaskParams has 27 methods (exceeds 20 allowed). Consider refactoring.
Open

type FileGetFromTaskParams struct {

    /*IfModifiedSince
      Specify this header to perform the operation only if the resource has been modified since the specified date/time.

Severity: Minor
Found in cloud/azure/batch/client/files/file_get_from_task_parameters.go - About 3 hrs to fix

    Function TestCmdDataPut has a Cognitive Complexity of 37 (exceeds 20 allowed). Consider refactoring.
    Open

    func TestCmdDataPut(t *testing.T) {
    
        var err error
        var output bytes.Buffer
        opt := optDataPut{
    Severity: Minor
    Found in command/data_test.go - About 3 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Method TaskUpdateParams.WriteToRequest has a Cognitive Complexity of 37 (exceeds 20 allowed). Consider refactoring.
    Open

    func (o *TaskUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
    
        r.SetTimeout(o.requestTimeout)
        var res []error
    
    
    Severity: Minor
    Found in cloud/azure/batch/client/tasks/task_update_parameters.go - About 3 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Method AccountListNodeAgentSkusParams.WriteToRequest has a Cognitive Complexity of 37 (exceeds 20 allowed). Consider refactoring.
    Open

    func (o *AccountListNodeAgentSkusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
    
        r.SetTimeout(o.requestTimeout)
        var res []error
    
    

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function TestDeleteTask has a Cognitive Complexity of 37 (exceeds 20 allowed). Consider refactoring.
    Open

    func TestDeleteTask(t *testing.T) {
    
        var err error
        ctx := context.Background()
        m := NewQueueManager()
    Severity: Minor
    Found in cloud/mock/queue_test.go - About 3 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

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

    func (m *VirtualMachine) Validate(formats strfmt.Registry) error {
        var res []error
    
        if err := m.Resource.Validate(formats); err != nil {
            res = append(res, err)
    Severity: Major
    Found in cloud/azure/compute/models/virtual_machine.go and 3 other locations - About 3 hrs to fix
    cloud/azure/compute/models/virtual_machine_scale_set.go on lines 100..131
    cloud/azure/compute/models/virtual_machine_scale_set_vm.go on lines 114..145
    cloud/azure/resource/models/generic_resource.go on lines 65..96

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

    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

    func (m *VirtualMachineScaleSetVM) Validate(formats strfmt.Registry) error {
        var res []error
    
        if err := m.Resource.Validate(formats); err != nil {
            res = append(res, err)
    Severity: Major
    Found in cloud/azure/compute/models/virtual_machine_scale_set_vm.go and 3 other locations - About 3 hrs to fix
    cloud/azure/compute/models/virtual_machine.go on lines 101..132
    cloud/azure/compute/models/virtual_machine_scale_set.go on lines 100..131
    cloud/azure/resource/models/generic_resource.go on lines 65..96

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

    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

    func (m *VirtualMachineScaleSet) Validate(formats strfmt.Registry) error {
        var res []error
    
        if err := m.Resource.Validate(formats); err != nil {
            res = append(res, err)
    Severity: Major
    Found in cloud/azure/compute/models/virtual_machine_scale_set.go and 3 other locations - About 3 hrs to fix
    cloud/azure/compute/models/virtual_machine.go on lines 101..132
    cloud/azure/compute/models/virtual_machine_scale_set_vm.go on lines 114..145
    cloud/azure/resource/models/generic_resource.go on lines 65..96

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

    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

    func (m *GenericResource) Validate(formats strfmt.Registry) error {
        var res []error
    
        if err := m.Resource.Validate(formats); err != nil {
            res = append(res, err)
    Severity: Major
    Found in cloud/azure/resource/models/generic_resource.go and 3 other locations - About 3 hrs to fix
    cloud/azure/compute/models/virtual_machine.go on lines 101..132
    cloud/azure/compute/models/virtual_machine_scale_set.go on lines 100..131
    cloud/azure/compute/models/virtual_machine_scale_set_vm.go on lines 114..145

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

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

    func (a *Client) VirtualMachinesConvertToManagedDisks(params *VirtualMachinesConvertToManagedDisksParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualMachinesConvertToManagedDisksOK, *VirtualMachinesConvertToManagedDisksAccepted, error) {
        // TODO: Validate the params before sending
        if params == nil {
            params = NewVirtualMachinesConvertToManagedDisksParams()
        }
    cloud/azure/compute/client/availability_sets/availability_sets_client.go on lines 57..87
    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 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

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

    func (a *Client) VirtualMachineScaleSetsCreateOrUpdate(params *VirtualMachineScaleSetsCreateOrUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualMachineScaleSetsCreateOrUpdateOK, *VirtualMachineScaleSetsCreateOrUpdateCreated, error) {
        // TODO: Validate the params before sending
        if params == nil {
            params = NewVirtualMachineScaleSetsCreateOrUpdateParams()
        }
    cloud/azure/compute/client/availability_sets/availability_sets_client.go on lines 57..87
    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 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

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

    func (a *Client) VirtualMachineScaleSetVmsReimageAll(params *VirtualMachineScaleSetVmsReimageAllParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualMachineScaleSetVmsReimageAllOK, *VirtualMachineScaleSetVmsReimageAllAccepted, error) {
        // TODO: Validate the params before sending
        if params == nil {
            params = NewVirtualMachineScaleSetVmsReimageAllParams()
        }
    cloud/azure/compute/client/availability_sets/availability_sets_client.go on lines 57..87
    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 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

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

    func (a *Client) VirtualMachinesRestart(params *VirtualMachinesRestartParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualMachinesRestartOK, *VirtualMachinesRestartAccepted, error) {
        // TODO: Validate the params before sending
        if params == nil {
            params = NewVirtualMachinesRestartParams()
        }
    cloud/azure/compute/client/availability_sets/availability_sets_client.go on lines 57..87
    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 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

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

    func (a *Client) VirtualMachineExtensionsCreateOrUpdate(params *VirtualMachineExtensionsCreateOrUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualMachineExtensionsCreateOrUpdateOK, *VirtualMachineExtensionsCreateOrUpdateCreated, error) {
        // TODO: Validate the params before sending
        if params == nil {
            params = NewVirtualMachineExtensionsCreateOrUpdateParams()
        }
    cloud/azure/compute/client/availability_sets/availability_sets_client.go on lines 57..87
    cloud/azure/compute/client/images/images_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

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

    func (a *Client) VirtualMachinesStart(params *VirtualMachinesStartParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualMachinesStartOK, *VirtualMachinesStartAccepted, error) {
        // TODO: Validate the params before sending
        if params == nil {
            params = NewVirtualMachinesStartParams()
        }
    cloud/azure/compute/client/availability_sets/availability_sets_client.go on lines 57..87
    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/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

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

    func (a *Client) VirtualMachineScaleSetsPowerOff(params *VirtualMachineScaleSetsPowerOffParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualMachineScaleSetsPowerOffOK, *VirtualMachineScaleSetsPowerOffAccepted, error) {
        // TODO: Validate the params before sending
        if params == nil {
            params = NewVirtualMachineScaleSetsPowerOffParams()
        }
    cloud/azure/compute/client/availability_sets/availability_sets_client.go on lines 57..87
    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 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

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

    func (a *Client) TagsDeleteValue(params *TagsDeleteValueParams, authInfo runtime.ClientAuthInfoWriter) (*TagsDeleteValueOK, *TagsDeleteValueNoContent, error) {
        // TODO: Validate the params before sending
        if params == nil {
            params = NewTagsDeleteValueParams()
        }
    Severity: Major
    Found in cloud/azure/resource/client/tags/tags_client.go and 34 other locations - About 3 hrs to fix
    cloud/azure/compute/client/availability_sets/availability_sets_client.go on lines 57..87
    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

    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

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

    func (a *Client) VirtualMachineScaleSetVmsPowerOff(params *VirtualMachineScaleSetVmsPowerOffParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualMachineScaleSetVmsPowerOffOK, *VirtualMachineScaleSetVmsPowerOffAccepted, error) {
        // TODO: Validate the params before sending
        if params == nil {
            params = NewVirtualMachineScaleSetVmsPowerOffParams()
        }
    cloud/azure/compute/client/availability_sets/availability_sets_client.go on lines 57..87
    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 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

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

    func (a *Client) VirtualMachineScaleSetsUpdateInstances(params *VirtualMachineScaleSetsUpdateInstancesParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualMachineScaleSetsUpdateInstancesOK, *VirtualMachineScaleSetsUpdateInstancesAccepted, error) {
        // TODO: Validate the params before sending
        if params == nil {
            params = NewVirtualMachineScaleSetsUpdateInstancesParams()
        }
    cloud/azure/compute/client/availability_sets/availability_sets_client.go on lines 57..87
    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_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

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

    func (a *Client) VirtualMachinesDeallocate(params *VirtualMachinesDeallocateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualMachinesDeallocateOK, *VirtualMachinesDeallocateAccepted, error) {
        // TODO: Validate the params before sending
        if params == nil {
            params = NewVirtualMachinesDeallocateParams()
        }
    cloud/azure/compute/client/availability_sets/availability_sets_client.go on lines 57..87
    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 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

    Severity
    Category
    Status
    Source
    Language