jkawamoto/roadie

View on GitHub

Showing 2,161 of 2,161 total issues

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

package virtual_machines

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

cloud/azure/compute/client/availability_sets/availability_sets_delete_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_deallocate_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_power_off_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_reimage_all_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_reimage_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_restart_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_start_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_deallocate_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_delete_instances_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_power_off_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_reimage_all_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_reimage_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_restart_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_start_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_update_instances_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_capture_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_convert_to_managed_disks_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_deallocate_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_redeploy_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_restart_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_start_responses.go on lines 1..93

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

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

package virtual_machines

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

cloud/azure/compute/client/availability_sets/availability_sets_delete_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_deallocate_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_power_off_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_reimage_all_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_reimage_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_restart_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_start_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_deallocate_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_delete_instances_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_power_off_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_reimage_all_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_reimage_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_restart_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_start_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_update_instances_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_capture_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_convert_to_managed_disks_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_deallocate_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_power_off_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_redeploy_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_restart_responses.go on lines 1..93

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

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

package virtual_machine_scale_sets

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

cloud/azure/compute/client/availability_sets/availability_sets_delete_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_deallocate_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_power_off_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_reimage_all_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_reimage_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_restart_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_start_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_deallocate_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_delete_instances_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_power_off_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_reimage_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_restart_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_start_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_update_instances_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_capture_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_convert_to_managed_disks_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_deallocate_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_power_off_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_redeploy_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_restart_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_start_responses.go on lines 1..93

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

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

package virtual_machines

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

cloud/azure/compute/client/availability_sets/availability_sets_delete_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_deallocate_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_power_off_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_reimage_all_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_reimage_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_restart_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_start_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_deallocate_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_delete_instances_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_power_off_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_reimage_all_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_reimage_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_restart_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_start_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_update_instances_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_capture_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_convert_to_managed_disks_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_deallocate_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_power_off_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_restart_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_start_responses.go on lines 1..93

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

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

package virtual_machine_scale_sets

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

cloud/azure/compute/client/availability_sets/availability_sets_delete_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_deallocate_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_power_off_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_reimage_all_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_reimage_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_restart_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_start_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_deallocate_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_delete_instances_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_power_off_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_reimage_all_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_reimage_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_restart_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_start_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_capture_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_convert_to_managed_disks_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_deallocate_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_power_off_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_redeploy_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_restart_responses.go on lines 1..93
cloud/azure/compute/client/virtual_machines/virtual_machines_start_responses.go on lines 1..93

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

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

    if err := m.validateKernelCPUTime(formats); err != nil {
        // prop
Severity: Major
Found in cloud/azure/batch/models/job_statistics.go and 1 other location - About 1 day to fix
cloud/azure/batch/models/job_schedule_statistics.go on lines 79..156

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

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

    if err := m.validateKernelCPUTime(formats); err != nil {
        // prop
Severity: Major
Found in cloud/azure/batch/models/job_schedule_statistics.go and 1 other location - About 1 day to fix
cloud/azure/batch/models/job_statistics.go on lines 81..158

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

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

    if err := m.validateAllocationState(formats); err != nil {
        // prop
Severity: Major
Found in cloud/azure/batch/models/cloud_pool.go and 3 other locations - About 7 hrs to fix
cloud/azure/batch/models/cloud_job.go on lines 113..185
cloud/azure/batch/models/cloud_task.go on lines 107..179
cloud/azure/batch/models/resource_statistics.go on lines 71..143

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

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

    if err := m.validateAffinityInfo(formats); err != nil {
        // prop
Severity: Major
Found in cloud/azure/batch/models/cloud_task.go and 3 other locations - About 7 hrs to fix
cloud/azure/batch/models/cloud_job.go on lines 113..185
cloud/azure/batch/models/cloud_pool.go on lines 148..220
cloud/azure/batch/models/resource_statistics.go on lines 71..143

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

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

    if err := m.validateCommonEnvironmentSettings(formats); err != nil {
        // prop
Severity: Major
Found in cloud/azure/batch/models/cloud_job.go and 3 other locations - About 7 hrs to fix
cloud/azure/batch/models/cloud_pool.go on lines 148..220
cloud/azure/batch/models/cloud_task.go on lines 107..179
cloud/azure/batch/models/resource_statistics.go on lines 71..143

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

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

    if err := m.validateAvgCPUPercentage(formats); err != nil {
        // prop
Severity: Major
Found in cloud/azure/batch/models/resource_statistics.go and 3 other locations - About 7 hrs to fix
cloud/azure/batch/models/cloud_job.go on lines 113..185
cloud/azure/batch/models/cloud_pool.go on lines 148..220
cloud/azure/batch/models/cloud_task.go on lines 107..179

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

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

Function TestStorageService has 209 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func TestStorageService(t *testing.T) {

    var err error
    server := mock.NewStorageServer()
    defer server.Close()
Severity: Major
Found in cloud/azure/storage_test.go - About 7 hrs to fix

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

    package tags
    
    // This file was generated by the swagger tool.
    // Editing this file might prove futile when you re-run the swagger generate command
    
    
    cloud/azure/resource/client/deployments/deployments_check_existence_responses.go on lines 1..82
    cloud/azure/resource/client/deployments/deployments_delete_responses.go on lines 1..82
    cloud/azure/resource/client/resource_groups/resource_groups_check_existence_responses.go on lines 1..82
    cloud/azure/resource/client/resource_groups/resource_groups_delete_responses.go on lines 1..82
    cloud/azure/resource/client/resources/resources_check_existence_by_id_responses.go on lines 1..82
    cloud/azure/resource/client/resources/resources_check_existence_responses.go on lines 1..82
    cloud/azure/resource/client/resources/resources_move_resources_responses.go on lines 1..82
    cloud/azure/resource/client/tags/tags_delete_responses.go on lines 1..82

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

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

    package resource_groups
    
    // This file was generated by the swagger tool.
    // Editing this file might prove futile when you re-run the swagger generate command
    
    
    cloud/azure/resource/client/deployments/deployments_check_existence_responses.go on lines 1..82
    cloud/azure/resource/client/deployments/deployments_delete_responses.go on lines 1..82
    cloud/azure/resource/client/resource_groups/resource_groups_delete_responses.go on lines 1..82
    cloud/azure/resource/client/resources/resources_check_existence_by_id_responses.go on lines 1..82
    cloud/azure/resource/client/resources/resources_check_existence_responses.go on lines 1..82
    cloud/azure/resource/client/resources/resources_move_resources_responses.go on lines 1..82
    cloud/azure/resource/client/tags/tags_delete_responses.go on lines 1..82
    cloud/azure/resource/client/tags/tags_delete_value_responses.go on lines 1..82

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

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

    package deployments
    
    // This file was generated by the swagger tool.
    // Editing this file might prove futile when you re-run the swagger generate command
    
    
    cloud/azure/resource/client/deployments/deployments_delete_responses.go on lines 1..82
    cloud/azure/resource/client/resource_groups/resource_groups_check_existence_responses.go on lines 1..82
    cloud/azure/resource/client/resource_groups/resource_groups_delete_responses.go on lines 1..82
    cloud/azure/resource/client/resources/resources_check_existence_by_id_responses.go on lines 1..82
    cloud/azure/resource/client/resources/resources_check_existence_responses.go on lines 1..82
    cloud/azure/resource/client/resources/resources_move_resources_responses.go on lines 1..82
    cloud/azure/resource/client/tags/tags_delete_responses.go on lines 1..82
    cloud/azure/resource/client/tags/tags_delete_value_responses.go on lines 1..82

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

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

    package resources
    
    // This file was generated by the swagger tool.
    // Editing this file might prove futile when you re-run the swagger generate command
    
    
    cloud/azure/resource/client/deployments/deployments_check_existence_responses.go on lines 1..82
    cloud/azure/resource/client/deployments/deployments_delete_responses.go on lines 1..82
    cloud/azure/resource/client/resource_groups/resource_groups_check_existence_responses.go on lines 1..82
    cloud/azure/resource/client/resource_groups/resource_groups_delete_responses.go on lines 1..82
    cloud/azure/resource/client/resources/resources_check_existence_by_id_responses.go on lines 1..82
    cloud/azure/resource/client/resources/resources_check_existence_responses.go on lines 1..82
    cloud/azure/resource/client/tags/tags_delete_responses.go on lines 1..82
    cloud/azure/resource/client/tags/tags_delete_value_responses.go on lines 1..82

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

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

    package resources
    
    // This file was generated by the swagger tool.
    // Editing this file might prove futile when you re-run the swagger generate command
    
    
    cloud/azure/resource/client/deployments/deployments_check_existence_responses.go on lines 1..82
    cloud/azure/resource/client/deployments/deployments_delete_responses.go on lines 1..82
    cloud/azure/resource/client/resource_groups/resource_groups_check_existence_responses.go on lines 1..82
    cloud/azure/resource/client/resource_groups/resource_groups_delete_responses.go on lines 1..82
    cloud/azure/resource/client/resources/resources_check_existence_responses.go on lines 1..82
    cloud/azure/resource/client/resources/resources_move_resources_responses.go on lines 1..82
    cloud/azure/resource/client/tags/tags_delete_responses.go on lines 1..82
    cloud/azure/resource/client/tags/tags_delete_value_responses.go on lines 1..82

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

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

    package resources
    
    // This file was generated by the swagger tool.
    // Editing this file might prove futile when you re-run the swagger generate command
    
    
    cloud/azure/resource/client/deployments/deployments_check_existence_responses.go on lines 1..82
    cloud/azure/resource/client/deployments/deployments_delete_responses.go on lines 1..82
    cloud/azure/resource/client/resource_groups/resource_groups_check_existence_responses.go on lines 1..82
    cloud/azure/resource/client/resource_groups/resource_groups_delete_responses.go on lines 1..82
    cloud/azure/resource/client/resources/resources_check_existence_by_id_responses.go on lines 1..82
    cloud/azure/resource/client/resources/resources_move_resources_responses.go on lines 1..82
    cloud/azure/resource/client/tags/tags_delete_responses.go on lines 1..82
    cloud/azure/resource/client/tags/tags_delete_value_responses.go on lines 1..82

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

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

    package deployments
    
    // This file was generated by the swagger tool.
    // Editing this file might prove futile when you re-run the swagger generate command
    
    
    cloud/azure/resource/client/deployments/deployments_check_existence_responses.go on lines 1..82
    cloud/azure/resource/client/resource_groups/resource_groups_check_existence_responses.go on lines 1..82
    cloud/azure/resource/client/resource_groups/resource_groups_delete_responses.go on lines 1..82
    cloud/azure/resource/client/resources/resources_check_existence_by_id_responses.go on lines 1..82
    cloud/azure/resource/client/resources/resources_check_existence_responses.go on lines 1..82
    cloud/azure/resource/client/resources/resources_move_resources_responses.go on lines 1..82
    cloud/azure/resource/client/tags/tags_delete_responses.go on lines 1..82
    cloud/azure/resource/client/tags/tags_delete_value_responses.go on lines 1..82

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

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

    package tags
    
    // This file was generated by the swagger tool.
    // Editing this file might prove futile when you re-run the swagger generate command
    
    
    Severity: Major
    Found in cloud/azure/resource/client/tags/tags_delete_responses.go and 8 other locations - About 7 hrs to fix
    cloud/azure/resource/client/deployments/deployments_check_existence_responses.go on lines 1..82
    cloud/azure/resource/client/deployments/deployments_delete_responses.go on lines 1..82
    cloud/azure/resource/client/resource_groups/resource_groups_check_existence_responses.go on lines 1..82
    cloud/azure/resource/client/resource_groups/resource_groups_delete_responses.go on lines 1..82
    cloud/azure/resource/client/resources/resources_check_existence_by_id_responses.go on lines 1..82
    cloud/azure/resource/client/resources/resources_check_existence_responses.go on lines 1..82
    cloud/azure/resource/client/resources/resources_move_resources_responses.go on lines 1..82
    cloud/azure/resource/client/tags/tags_delete_value_responses.go on lines 1..82

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

    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