jkawamoto/roadie

View on GitHub

Showing 2,161 of 2,161 total issues

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

func (a *Client) VirtualMachinesCreateOrUpdate(params *VirtualMachinesCreateOrUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualMachinesCreateOrUpdateOK, *VirtualMachinesCreateOrUpdateCreated, error) {
    // TODO: Validate the params before sending
    if params == nil {
        params = NewVirtualMachinesCreateOrUpdateParams()
    }
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 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) VirtualMachinesPowerOff(params *VirtualMachinesPowerOffParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualMachinesPowerOffOK, *VirtualMachinesPowerOffAccepted, error) {
    // TODO: Validate the params before sending
    if params == nil {
        params = NewVirtualMachinesPowerOffParams()
    }
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 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) VirtualMachineScaleSetsReimageAll(params *VirtualMachineScaleSetsReimageAllParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualMachineScaleSetsReimageAllOK, *VirtualMachineScaleSetsReimageAllAccepted, error) {
    // TODO: Validate the params before sending
    if params == nil {
        params = NewVirtualMachineScaleSetsReimageAllParams()
    }
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 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) 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

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

func (m *PoolStatistics) Validate(formats strfmt.Registry) error {
    var res []error

    if err := m.validateLastUpdateTime(formats); err != nil {
        // prop
Severity: Major
Found in cloud/azure/batch/models/pool_statistics.go and 3 other locations - About 3 hrs to fix
cloud/azure/compute/models/image_o_s_disk.go on lines 45..77
cloud/azure/compute/models/virtual_machine_instance_view.go on lines 43..75
cloud/azure/compute/models/virtual_machine_scale_set_vm_instance_view.go on lines 46..78

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

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 *VirtualMachineScaleSetVMInstanceView) Validate(formats strfmt.Registry) error {
    var res []error

    if err := m.validateBootDiagnostics(formats); err != nil {
        // prop
cloud/azure/batch/models/pool_statistics.go on lines 38..70
cloud/azure/compute/models/image_o_s_disk.go on lines 45..77
cloud/azure/compute/models/virtual_machine_instance_view.go on lines 43..75

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

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 *ImageOSDisk) Validate(formats strfmt.Registry) error {
    var res []error

    if err := m.validateCaching(formats); err != nil {
        // prop
Severity: Major
Found in cloud/azure/compute/models/image_o_s_disk.go and 3 other locations - About 3 hrs to fix
cloud/azure/batch/models/pool_statistics.go on lines 38..70
cloud/azure/compute/models/virtual_machine_instance_view.go on lines 43..75
cloud/azure/compute/models/virtual_machine_scale_set_vm_instance_view.go on lines 46..78

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

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 *VirtualMachineInstanceView) Validate(formats strfmt.Registry) error {
    var res []error

    if err := m.validateBootDiagnostics(formats); err != nil {
        // prop
Severity: Major
Found in cloud/azure/compute/models/virtual_machine_instance_view.go and 3 other locations - About 3 hrs to fix
cloud/azure/batch/models/pool_statistics.go on lines 38..70
cloud/azure/compute/models/image_o_s_disk.go on lines 45..77
cloud/azure/compute/models/virtual_machine_scale_set_vm_instance_view.go on lines 46..78

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

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

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

func (o *PoolEnableAutoScaleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

    r.SetTimeout(o.requestTimeout)
    var res []error

Severity: Minor
Found in cloud/azure/batch/client/pools/pool_enable_auto_scale_parameters.go - About 2 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 PoolResizeParams.WriteToRequest has a Cognitive Complexity of 36 (exceeds 20 allowed). Consider refactoring.
Open

func (o *PoolResizeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

    r.SetTimeout(o.requestTimeout)
    var res []error

Severity: Minor
Found in cloud/azure/batch/client/pools/pool_resize_parameters.go - About 2 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 JobUpdateParams.WriteToRequest has a Cognitive Complexity of 36 (exceeds 20 allowed). Consider refactoring.
Open

func (o *JobUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

    r.SetTimeout(o.requestTimeout)
    var res []error

Severity: Minor
Found in cloud/azure/batch/client/jobs/job_update_parameters.go - About 2 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 PoolUpgradeOSParams.WriteToRequest has a Cognitive Complexity of 36 (exceeds 20 allowed). Consider refactoring.
Open

func (o *PoolUpgradeOSParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

    r.SetTimeout(o.requestTimeout)
    var res []error

Severity: Minor
Found in cloud/azure/batch/client/pools/pool_upgrade_o_s_parameters.go - About 2 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 PoolPatchParams.WriteToRequest has a Cognitive Complexity of 36 (exceeds 20 allowed). Consider refactoring.
Open

func (o *PoolPatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

    r.SetTimeout(o.requestTimeout)
    var res []error

Severity: Minor
Found in cloud/azure/batch/client/pools/pool_patch_parameters.go - About 2 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 JobScheduleUpdateParams.WriteToRequest has a Cognitive Complexity of 36 (exceeds 20 allowed). Consider refactoring.
Open

func (o *JobScheduleUpdateParams) 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

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

func (o *JobPatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

    r.SetTimeout(o.requestTimeout)
    var res []error

Severity: Minor
Found in cloud/azure/batch/client/jobs/job_patch_parameters.go - About 2 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 JobTerminateParams.WriteToRequest has a Cognitive Complexity of 36 (exceeds 20 allowed). Consider refactoring.
Open

func (o *JobTerminateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

    r.SetTimeout(o.requestTimeout)
    var res []error

Severity: Minor
Found in cloud/azure/batch/client/jobs/job_terminate_parameters.go - About 2 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 PoolRemoveNodesParams.WriteToRequest has a Cognitive Complexity of 36 (exceeds 20 allowed). Consider refactoring.
Open

func (o *PoolRemoveNodesParams) 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

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

func (o *JobDisableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

    r.SetTimeout(o.requestTimeout)
    var res []error

Severity: Minor
Found in cloud/azure/batch/client/jobs/job_disable_parameters.go - About 2 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 JobSchedulePatchParams.WriteToRequest has a Cognitive Complexity of 36 (exceeds 20 allowed). Consider refactoring.
Open

func (o *JobSchedulePatchParams) 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

JobEnableParams has 25 methods (exceeds 20 allowed). Consider refactoring.
Open

type JobEnableParams struct {

    /*IfMatch
      An ETag is specified. Specify this header to perform the operation only if the resource's ETag is an exact match as specified.

Severity: Minor
Found in cloud/azure/batch/client/jobs/job_enable_parameters.go - About 2 hrs to fix
    Severity
    Category
    Status
    Source
    Language