jkawamoto/roadie

View on GitHub

Showing 602 of 2,161 total issues

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 *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 *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

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 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/resource/models/template_link.go and 1 other location - About 2 hrs to fix
cloud/azure/resource/models/parameters_link.go on lines 1..47

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

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/resource/models/parameters_link.go and 1 other location - About 2 hrs to fix
cloud/azure/resource/models/template_link.go on lines 1..47

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

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

cloud/azure/batch/models/affinity_information.go on lines 1..46

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

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/affinity_information.go and 1 other location - About 2 hrs to fix
cloud/azure/batch/models/pool_evaluate_auto_scale_parameter.go on lines 1..46

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

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/resource/models/alias_path_type.go and 1 other location - About 2 hrs to fix
cloud/azure/resource/models/resources_move_info.go on lines 1..46

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

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/resource/models/resources_move_info.go and 1 other location - About 2 hrs to fix
cloud/azure/resource/models/alias_path_type.go on lines 1..46

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

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

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

    if err := m.validateRetryCount(formats); err != nil {
        // prop
Severity: Major
Found in cloud/azure/batch/models/start_task_information.go and 17 other locations - About 2 hrs to fix
cloud/azure/batch/models/certificate_add_parameter.go on lines 42..69
cloud/azure/batch/models/certificate_reference.go on lines 46..73
cloud/azure/batch/models/exit_conditions.go on lines 33..60
cloud/azure/batch/models/job_patch_parameter.go on lines 47..74
cloud/azure/batch/models/job_preparation_task.go on lines 55..82
cloud/azure/batch/models/job_preparation_task_execution_information.go on lines 62..89
cloud/azure/batch/models/job_schedule_add_parameter.go on lines 44..71
cloud/azure/batch/models/job_update_parameter.go on lines 48..75
cloud/azure/batch/models/pool_patch_parameter.go on lines 39..66
cloud/azure/batch/models/pool_update_properties_parameter.go on lines 43..70
cloud/azure/batch/models/subtask_information.go on lines 60..87
cloud/azure/compute/models/image_data_disk.go on lines 41..68
cloud/azure/compute/models/usage.go on lines 37..64
cloud/azure/compute/models/virtual_machine_scale_set_data_disk.go on lines 40..67
cloud/azure/compute/models/virtual_machine_scale_set_ip_configuration_properties.go on lines 33..60
cloud/azure/compute/models/virtual_machine_scale_set_vm_profile.go on lines 31..58
cloud/azure/resource/models/deployment_properties.go on lines 41..68

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

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

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

    if err := m.validateID(formats); err != nil {
        // prop
Severity: Major
Found in cloud/azure/batch/models/job_schedule_add_parameter.go and 17 other locations - About 2 hrs to fix
cloud/azure/batch/models/certificate_add_parameter.go on lines 42..69
cloud/azure/batch/models/certificate_reference.go on lines 46..73
cloud/azure/batch/models/exit_conditions.go on lines 33..60
cloud/azure/batch/models/job_patch_parameter.go on lines 47..74
cloud/azure/batch/models/job_preparation_task.go on lines 55..82
cloud/azure/batch/models/job_preparation_task_execution_information.go on lines 62..89
cloud/azure/batch/models/job_update_parameter.go on lines 48..75
cloud/azure/batch/models/pool_patch_parameter.go on lines 39..66
cloud/azure/batch/models/pool_update_properties_parameter.go on lines 43..70
cloud/azure/batch/models/start_task_information.go on lines 58..85
cloud/azure/batch/models/subtask_information.go on lines 60..87
cloud/azure/compute/models/image_data_disk.go on lines 41..68
cloud/azure/compute/models/usage.go on lines 37..64
cloud/azure/compute/models/virtual_machine_scale_set_data_disk.go on lines 40..67
cloud/azure/compute/models/virtual_machine_scale_set_ip_configuration_properties.go on lines 33..60
cloud/azure/compute/models/virtual_machine_scale_set_vm_profile.go on lines 31..58
cloud/azure/resource/models/deployment_properties.go on lines 41..68

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

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

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

    if err := m.validateApplicationPackageReferences(formats); err != nil {
        // prop
cloud/azure/batch/models/certificate_add_parameter.go on lines 42..69
cloud/azure/batch/models/certificate_reference.go on lines 46..73
cloud/azure/batch/models/exit_conditions.go on lines 33..60
cloud/azure/batch/models/job_patch_parameter.go on lines 47..74
cloud/azure/batch/models/job_preparation_task.go on lines 55..82
cloud/azure/batch/models/job_preparation_task_execution_information.go on lines 62..89
cloud/azure/batch/models/job_schedule_add_parameter.go on lines 44..71
cloud/azure/batch/models/job_update_parameter.go on lines 48..75
cloud/azure/batch/models/pool_patch_parameter.go on lines 39..66
cloud/azure/batch/models/start_task_information.go on lines 58..85
cloud/azure/batch/models/subtask_information.go on lines 60..87
cloud/azure/compute/models/image_data_disk.go on lines 41..68
cloud/azure/compute/models/usage.go on lines 37..64
cloud/azure/compute/models/virtual_machine_scale_set_data_disk.go on lines 40..67
cloud/azure/compute/models/virtual_machine_scale_set_ip_configuration_properties.go on lines 33..60
cloud/azure/compute/models/virtual_machine_scale_set_vm_profile.go on lines 31..58
cloud/azure/resource/models/deployment_properties.go on lines 41..68

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

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

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

    if err := m.validateCurrentValue(formats); err != nil {
        // prop
Severity: Major
Found in cloud/azure/compute/models/usage.go and 17 other locations - About 2 hrs to fix
cloud/azure/batch/models/certificate_add_parameter.go on lines 42..69
cloud/azure/batch/models/certificate_reference.go on lines 46..73
cloud/azure/batch/models/exit_conditions.go on lines 33..60
cloud/azure/batch/models/job_patch_parameter.go on lines 47..74
cloud/azure/batch/models/job_preparation_task.go on lines 55..82
cloud/azure/batch/models/job_preparation_task_execution_information.go on lines 62..89
cloud/azure/batch/models/job_schedule_add_parameter.go on lines 44..71
cloud/azure/batch/models/job_update_parameter.go on lines 48..75
cloud/azure/batch/models/pool_patch_parameter.go on lines 39..66
cloud/azure/batch/models/pool_update_properties_parameter.go on lines 43..70
cloud/azure/batch/models/start_task_information.go on lines 58..85
cloud/azure/batch/models/subtask_information.go on lines 60..87
cloud/azure/compute/models/image_data_disk.go on lines 41..68
cloud/azure/compute/models/virtual_machine_scale_set_data_disk.go on lines 40..67
cloud/azure/compute/models/virtual_machine_scale_set_ip_configuration_properties.go on lines 33..60
cloud/azure/compute/models/virtual_machine_scale_set_vm_profile.go on lines 31..58
cloud/azure/resource/models/deployment_properties.go on lines 41..68

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

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

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

    if err := m.validateRetryCount(formats); err != nil {
        // prop
cloud/azure/batch/models/certificate_add_parameter.go on lines 42..69
cloud/azure/batch/models/certificate_reference.go on lines 46..73
cloud/azure/batch/models/exit_conditions.go on lines 33..60
cloud/azure/batch/models/job_patch_parameter.go on lines 47..74
cloud/azure/batch/models/job_preparation_task.go on lines 55..82
cloud/azure/batch/models/job_schedule_add_parameter.go on lines 44..71
cloud/azure/batch/models/job_update_parameter.go on lines 48..75
cloud/azure/batch/models/pool_patch_parameter.go on lines 39..66
cloud/azure/batch/models/pool_update_properties_parameter.go on lines 43..70
cloud/azure/batch/models/start_task_information.go on lines 58..85
cloud/azure/batch/models/subtask_information.go on lines 60..87
cloud/azure/compute/models/image_data_disk.go on lines 41..68
cloud/azure/compute/models/usage.go on lines 37..64
cloud/azure/compute/models/virtual_machine_scale_set_data_disk.go on lines 40..67
cloud/azure/compute/models/virtual_machine_scale_set_ip_configuration_properties.go on lines 33..60
cloud/azure/compute/models/virtual_machine_scale_set_vm_profile.go on lines 31..58
cloud/azure/resource/models/deployment_properties.go on lines 41..68

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

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

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

    if err := m.validateCommandLine(formats); err != nil {
        // prop
Severity: Major
Found in cloud/azure/batch/models/job_preparation_task.go and 17 other locations - About 2 hrs to fix
cloud/azure/batch/models/certificate_add_parameter.go on lines 42..69
cloud/azure/batch/models/certificate_reference.go on lines 46..73
cloud/azure/batch/models/exit_conditions.go on lines 33..60
cloud/azure/batch/models/job_patch_parameter.go on lines 47..74
cloud/azure/batch/models/job_preparation_task_execution_information.go on lines 62..89
cloud/azure/batch/models/job_schedule_add_parameter.go on lines 44..71
cloud/azure/batch/models/job_update_parameter.go on lines 48..75
cloud/azure/batch/models/pool_patch_parameter.go on lines 39..66
cloud/azure/batch/models/pool_update_properties_parameter.go on lines 43..70
cloud/azure/batch/models/start_task_information.go on lines 58..85
cloud/azure/batch/models/subtask_information.go on lines 60..87
cloud/azure/compute/models/image_data_disk.go on lines 41..68
cloud/azure/compute/models/usage.go on lines 37..64
cloud/azure/compute/models/virtual_machine_scale_set_data_disk.go on lines 40..67
cloud/azure/compute/models/virtual_machine_scale_set_ip_configuration_properties.go on lines 33..60
cloud/azure/compute/models/virtual_machine_scale_set_vm_profile.go on lines 31..58
cloud/azure/resource/models/deployment_properties.go on lines 41..68

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

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

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

    if err := m.validateDefault(formats); err != nil {
        // prop
Severity: Major
Found in cloud/azure/batch/models/exit_conditions.go and 17 other locations - About 2 hrs to fix
cloud/azure/batch/models/certificate_add_parameter.go on lines 42..69
cloud/azure/batch/models/certificate_reference.go on lines 46..73
cloud/azure/batch/models/job_patch_parameter.go on lines 47..74
cloud/azure/batch/models/job_preparation_task.go on lines 55..82
cloud/azure/batch/models/job_preparation_task_execution_information.go on lines 62..89
cloud/azure/batch/models/job_schedule_add_parameter.go on lines 44..71
cloud/azure/batch/models/job_update_parameter.go on lines 48..75
cloud/azure/batch/models/pool_patch_parameter.go on lines 39..66
cloud/azure/batch/models/pool_update_properties_parameter.go on lines 43..70
cloud/azure/batch/models/start_task_information.go on lines 58..85
cloud/azure/batch/models/subtask_information.go on lines 60..87
cloud/azure/compute/models/image_data_disk.go on lines 41..68
cloud/azure/compute/models/usage.go on lines 37..64
cloud/azure/compute/models/virtual_machine_scale_set_data_disk.go on lines 40..67
cloud/azure/compute/models/virtual_machine_scale_set_ip_configuration_properties.go on lines 33..60
cloud/azure/compute/models/virtual_machine_scale_set_vm_profile.go on lines 31..58
cloud/azure/resource/models/deployment_properties.go on lines 41..68

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

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

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

    if err := m.validateStoreLocation(formats); err != nil {
        // prop
Severity: Major
Found in cloud/azure/batch/models/certificate_reference.go and 17 other locations - About 2 hrs to fix
cloud/azure/batch/models/certificate_add_parameter.go on lines 42..69
cloud/azure/batch/models/exit_conditions.go on lines 33..60
cloud/azure/batch/models/job_patch_parameter.go on lines 47..74
cloud/azure/batch/models/job_preparation_task.go on lines 55..82
cloud/azure/batch/models/job_preparation_task_execution_information.go on lines 62..89
cloud/azure/batch/models/job_schedule_add_parameter.go on lines 44..71
cloud/azure/batch/models/job_update_parameter.go on lines 48..75
cloud/azure/batch/models/pool_patch_parameter.go on lines 39..66
cloud/azure/batch/models/pool_update_properties_parameter.go on lines 43..70
cloud/azure/batch/models/start_task_information.go on lines 58..85
cloud/azure/batch/models/subtask_information.go on lines 60..87
cloud/azure/compute/models/image_data_disk.go on lines 41..68
cloud/azure/compute/models/usage.go on lines 37..64
cloud/azure/compute/models/virtual_machine_scale_set_data_disk.go on lines 40..67
cloud/azure/compute/models/virtual_machine_scale_set_ip_configuration_properties.go on lines 33..60
cloud/azure/compute/models/virtual_machine_scale_set_vm_profile.go on lines 31..58
cloud/azure/resource/models/deployment_properties.go on lines 41..68

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

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

func (m *ImageDataDisk) 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_data_disk.go and 17 other locations - About 2 hrs to fix
cloud/azure/batch/models/certificate_add_parameter.go on lines 42..69
cloud/azure/batch/models/certificate_reference.go on lines 46..73
cloud/azure/batch/models/exit_conditions.go on lines 33..60
cloud/azure/batch/models/job_patch_parameter.go on lines 47..74
cloud/azure/batch/models/job_preparation_task.go on lines 55..82
cloud/azure/batch/models/job_preparation_task_execution_information.go on lines 62..89
cloud/azure/batch/models/job_schedule_add_parameter.go on lines 44..71
cloud/azure/batch/models/job_update_parameter.go on lines 48..75
cloud/azure/batch/models/pool_patch_parameter.go on lines 39..66
cloud/azure/batch/models/pool_update_properties_parameter.go on lines 43..70
cloud/azure/batch/models/start_task_information.go on lines 58..85
cloud/azure/batch/models/subtask_information.go on lines 60..87
cloud/azure/compute/models/usage.go on lines 37..64
cloud/azure/compute/models/virtual_machine_scale_set_data_disk.go on lines 40..67
cloud/azure/compute/models/virtual_machine_scale_set_ip_configuration_properties.go on lines 33..60
cloud/azure/compute/models/virtual_machine_scale_set_vm_profile.go on lines 31..58
cloud/azure/resource/models/deployment_properties.go on lines 41..68

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

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

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

    if err := m.validateApplicationPackageReferences(formats); err != nil {
        // prop
Severity: Major
Found in cloud/azure/batch/models/pool_patch_parameter.go and 17 other locations - About 2 hrs to fix
cloud/azure/batch/models/certificate_add_parameter.go on lines 42..69
cloud/azure/batch/models/certificate_reference.go on lines 46..73
cloud/azure/batch/models/exit_conditions.go on lines 33..60
cloud/azure/batch/models/job_patch_parameter.go on lines 47..74
cloud/azure/batch/models/job_preparation_task.go on lines 55..82
cloud/azure/batch/models/job_preparation_task_execution_information.go on lines 62..89
cloud/azure/batch/models/job_schedule_add_parameter.go on lines 44..71
cloud/azure/batch/models/job_update_parameter.go on lines 48..75
cloud/azure/batch/models/pool_update_properties_parameter.go on lines 43..70
cloud/azure/batch/models/start_task_information.go on lines 58..85
cloud/azure/batch/models/subtask_information.go on lines 60..87
cloud/azure/compute/models/image_data_disk.go on lines 41..68
cloud/azure/compute/models/usage.go on lines 37..64
cloud/azure/compute/models/virtual_machine_scale_set_data_disk.go on lines 40..67
cloud/azure/compute/models/virtual_machine_scale_set_ip_configuration_properties.go on lines 33..60
cloud/azure/compute/models/virtual_machine_scale_set_vm_profile.go on lines 31..58
cloud/azure/resource/models/deployment_properties.go on lines 41..68

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

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