jkawamoto/roadie

View on GitHub

Showing 2,161 of 2,161 total issues

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

package tasks

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

cloud/azure/batch/client/certificates/certificate_add_responses.go on lines 1..132
cloud/azure/batch/client/certificates/certificate_cancel_deletion_responses.go on lines 1..132
cloud/azure/batch/client/compute_nodes/compute_node_add_user_responses.go on lines 1..132
cloud/azure/batch/client/compute_nodes/compute_node_disable_scheduling_responses.go on lines 1..132
cloud/azure/batch/client/compute_nodes/compute_node_enable_scheduling_responses.go on lines 1..132
cloud/azure/batch/client/compute_nodes/compute_node_reboot_responses.go on lines 1..132
cloud/azure/batch/client/compute_nodes/compute_node_reimage_responses.go on lines 1..132
cloud/azure/batch/client/compute_nodes/compute_node_update_user_responses.go on lines 1..132
cloud/azure/batch/client/compute_nodes/pool_remove_nodes_responses.go on lines 1..132
cloud/azure/batch/client/job_schedules/job_schedule_add_responses.go on lines 1..132
cloud/azure/batch/client/job_schedules/job_schedule_disable_responses.go on lines 1..132
cloud/azure/batch/client/job_schedules/job_schedule_enable_responses.go on lines 1..132
cloud/azure/batch/client/job_schedules/job_schedule_patch_responses.go on lines 1..132
cloud/azure/batch/client/job_schedules/job_schedule_terminate_responses.go on lines 1..132
cloud/azure/batch/client/job_schedules/job_schedule_update_responses.go on lines 1..132
cloud/azure/batch/client/jobs/job_add_responses.go on lines 1..132
cloud/azure/batch/client/jobs/job_disable_responses.go on lines 1..132
cloud/azure/batch/client/jobs/job_enable_responses.go on lines 1..132
cloud/azure/batch/client/jobs/job_patch_responses.go on lines 1..132
cloud/azure/batch/client/jobs/job_terminate_responses.go on lines 1..132
cloud/azure/batch/client/jobs/job_update_responses.go on lines 1..132
cloud/azure/batch/client/pools/pool_add_responses.go on lines 1..132
cloud/azure/batch/client/pools/pool_disable_auto_scale_responses.go on lines 1..132
cloud/azure/batch/client/pools/pool_enable_auto_scale_responses.go on lines 1..132
cloud/azure/batch/client/pools/pool_patch_responses.go on lines 1..132
cloud/azure/batch/client/pools/pool_resize_responses.go on lines 1..132
cloud/azure/batch/client/pools/pool_stop_resize_responses.go on lines 1..132
cloud/azure/batch/client/pools/pool_update_properties_responses.go on lines 1..132
cloud/azure/batch/client/pools/pool_upgrade_o_s_responses.go on lines 1..132
cloud/azure/batch/client/tasks/task_add_responses.go on lines 1..132
cloud/azure/batch/client/tasks/task_terminate_responses.go on lines 1..132
cloud/azure/batch/client/tasks/task_update_responses.go on lines 1..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 784.

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

package virtual_machine_scale_set_vms

// 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/images/images_delete_responses.go on lines 1..121
cloud/azure/compute/client/virtual_machine_extensions/virtual_machine_extensions_delete_responses.go on lines 1..121
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_delete_responses.go on lines 1..121
cloud/azure/compute/client/virtual_machines/virtual_machines_delete_responses.go on lines 1..121

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

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 5 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/images/images_delete_responses.go on lines 1..121
cloud/azure/compute/client/virtual_machine_extensions/virtual_machine_extensions_delete_responses.go on lines 1..121
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_delete_responses.go on lines 1..121
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_delete_responses.go on lines 1..121

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

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

package images

// 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/virtual_machine_extensions/virtual_machine_extensions_delete_responses.go on lines 1..121
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_delete_responses.go on lines 1..121
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_delete_responses.go on lines 1..121
cloud/azure/compute/client/virtual_machines/virtual_machines_delete_responses.go on lines 1..121

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

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

package virtual_machine_extensions

// 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/images/images_delete_responses.go on lines 1..121
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_delete_responses.go on lines 1..121
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_delete_responses.go on lines 1..121
cloud/azure/compute/client/virtual_machines/virtual_machines_delete_responses.go on lines 1..121

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

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 5 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/images/images_delete_responses.go on lines 1..121
cloud/azure/compute/client/virtual_machine_extensions/virtual_machine_extensions_delete_responses.go on lines 1..121
cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_delete_responses.go on lines 1..121
cloud/azure/compute/client/virtual_machines/virtual_machines_delete_responses.go on lines 1..121

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

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

package job_schedules

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

cloud/azure/batch/client/compute_nodes/compute_node_delete_user_responses.go on lines 1..114
cloud/azure/batch/client/files/file_delete_from_compute_node_responses.go on lines 1..114
cloud/azure/batch/client/files/file_delete_from_task_responses.go on lines 1..114
cloud/azure/batch/client/jobs/job_delete_responses.go on lines 1..114
cloud/azure/batch/client/pools/pool_delete_responses.go on lines 1..114
cloud/azure/batch/client/tasks/task_delete_responses.go on lines 1..114

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

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

package compute_nodes

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

cloud/azure/batch/client/files/file_delete_from_compute_node_responses.go on lines 1..114
cloud/azure/batch/client/files/file_delete_from_task_responses.go on lines 1..114
cloud/azure/batch/client/job_schedules/job_schedule_delete_responses.go on lines 1..114
cloud/azure/batch/client/jobs/job_delete_responses.go on lines 1..114
cloud/azure/batch/client/pools/pool_delete_responses.go on lines 1..114
cloud/azure/batch/client/tasks/task_delete_responses.go on lines 1..114

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

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

package files

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

cloud/azure/batch/client/compute_nodes/compute_node_delete_user_responses.go on lines 1..114
cloud/azure/batch/client/files/file_delete_from_task_responses.go on lines 1..114
cloud/azure/batch/client/job_schedules/job_schedule_delete_responses.go on lines 1..114
cloud/azure/batch/client/jobs/job_delete_responses.go on lines 1..114
cloud/azure/batch/client/pools/pool_delete_responses.go on lines 1..114
cloud/azure/batch/client/tasks/task_delete_responses.go on lines 1..114

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

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

package pools

// 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/batch/client/pools/pool_delete_responses.go and 6 other locations - About 1 day to fix
cloud/azure/batch/client/compute_nodes/compute_node_delete_user_responses.go on lines 1..114
cloud/azure/batch/client/files/file_delete_from_compute_node_responses.go on lines 1..114
cloud/azure/batch/client/files/file_delete_from_task_responses.go on lines 1..114
cloud/azure/batch/client/job_schedules/job_schedule_delete_responses.go on lines 1..114
cloud/azure/batch/client/jobs/job_delete_responses.go on lines 1..114
cloud/azure/batch/client/tasks/task_delete_responses.go on lines 1..114

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

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

package jobs

// 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/batch/client/jobs/job_delete_responses.go and 6 other locations - About 1 day to fix
cloud/azure/batch/client/compute_nodes/compute_node_delete_user_responses.go on lines 1..114
cloud/azure/batch/client/files/file_delete_from_compute_node_responses.go on lines 1..114
cloud/azure/batch/client/files/file_delete_from_task_responses.go on lines 1..114
cloud/azure/batch/client/job_schedules/job_schedule_delete_responses.go on lines 1..114
cloud/azure/batch/client/pools/pool_delete_responses.go on lines 1..114
cloud/azure/batch/client/tasks/task_delete_responses.go on lines 1..114

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

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

package tasks

// 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/batch/client/tasks/task_delete_responses.go and 6 other locations - About 1 day to fix
cloud/azure/batch/client/compute_nodes/compute_node_delete_user_responses.go on lines 1..114
cloud/azure/batch/client/files/file_delete_from_compute_node_responses.go on lines 1..114
cloud/azure/batch/client/files/file_delete_from_task_responses.go on lines 1..114
cloud/azure/batch/client/job_schedules/job_schedule_delete_responses.go on lines 1..114
cloud/azure/batch/client/jobs/job_delete_responses.go on lines 1..114
cloud/azure/batch/client/pools/pool_delete_responses.go on lines 1..114

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

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

package files

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

cloud/azure/batch/client/compute_nodes/compute_node_delete_user_responses.go on lines 1..114
cloud/azure/batch/client/files/file_delete_from_compute_node_responses.go on lines 1..114
cloud/azure/batch/client/job_schedules/job_schedule_delete_responses.go on lines 1..114
cloud/azure/batch/client/jobs/job_delete_responses.go on lines 1..114
cloud/azure/batch/client/pools/pool_delete_responses.go on lines 1..114
cloud/azure/batch/client/tasks/task_delete_responses.go on lines 1..114

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

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

package models

// 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/batch/models/task_scheduling_error.go and 1 other location - About 1 day to fix
cloud/azure/batch/models/job_scheduling_error.go on lines 1..119

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

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

package models

// 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/batch/models/job_scheduling_error.go and 1 other location - About 1 day to fix
cloud/azure/batch/models/task_scheduling_error.go on lines 1..119

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

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 a Cognitive Complexity of 82 (exceeds 20 allowed). Consider refactoring.
Open

func TestStorageService(t *testing.T) {

    var err error
    server := mock.NewStorageServer()
    defer server.Close()
Severity: Minor
Found in cloud/azure/storage_test.go - About 1 day 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 StorageServer.ServeHTTP has a Cognitive Complexity of 81 (exceeds 20 allowed). Consider refactoring.
Open

func (s *StorageServer) ServeHTTP(res http.ResponseWriter, req *http.Request) {

    var container, filename string
    if sp := strings.SplitN(strings.TrimPrefix(req.URL.Path, "/"), "/", 2); len(sp) == 1 {
        container = sp[0]
Severity: Minor
Found in cloud/azure/mock/storage.go - About 1 day 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 2 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/resources/resources_delete_responses.go on lines 1..110

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

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

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/resources/resources_delete_by_id_responses.go on lines 1..110

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

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/compute/client/images/images_create_or_update_responses.go on lines 1..101
cloud/azure/compute/client/virtual_machine_extensions/virtual_machine_extensions_create_or_update_responses.go on lines 1..101
cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_create_or_update_responses.go on lines 1..101
cloud/azure/compute/client/virtual_machines/virtual_machines_create_or_update_responses.go on lines 1..101
cloud/azure/resource/client/deployments/deployments_create_or_update_responses.go on lines 1..101
cloud/azure/resource/client/deployments/deployments_validate_responses.go on lines 1..101
cloud/azure/resource/client/tags/tags_create_or_update_responses.go on lines 1..101
cloud/azure/resource/client/tags/tags_create_or_update_value_responses.go on lines 1..101

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

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