jkawamoto/roadie

View on GitHub

Showing 2,161 of 2,161 total issues

Method FileGetNodeFilePropertiesFromComputeNodeParams.WriteToRequest has 12 return statements (exceeds 4 allowed).
Open

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

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

    Method JobScheduleEnableParams.WriteToRequest has 12 return statements (exceeds 4 allowed).
    Open

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

      Method JobScheduleDeleteParams.WriteToRequest has 12 return statements (exceeds 4 allowed).
      Open

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

        Function TestCmdDelete has 54 lines of code (exceeds 50 allowed). Consider refactoring.
        Open

        func TestCmdDelete(t *testing.T) {
        
            var err error
            var output bytes.Buffer
            files := []string{
        Severity: Minor
        Found in command/helper_test.go - About 1 hr to fix

          Method ResourcesListParams.WriteToRequest has 54 lines of code (exceeds 50 allowed). Consider refactoring.
          Open

          func (o *ResourcesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
          
              if err := r.SetTimeout(o.timeout); err != nil {
                  return err
              }
          Severity: Minor
          Found in cloud/azure/resource/client/resources/resources_list_parameters.go - About 1 hr to fix

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

            func (m *DeploymentProperties) validateDebugSetting(formats strfmt.Registry) error {
            
                if swag.IsZero(m.DebugSetting) { // not required
                    return nil
                }
            Severity: Major
            Found in cloud/azure/resource/models/deployment_properties.go and 19 other locations - About 1 hr to fix
            cloud/azure/resource/models/deployment_extended.go on lines 58..75
            cloud/azure/resource/models/deployment_operation.go on lines 44..61
            cloud/azure/resource/models/deployment_operation_properties.go on lines 75..92
            cloud/azure/resource/models/deployment_operation_properties.go on lines 94..111
            cloud/azure/resource/models/deployment_operation_properties.go on lines 113..130
            cloud/azure/resource/models/deployment_properties.go on lines 130..147
            cloud/azure/resource/models/deployment_properties.go on lines 149..166
            cloud/azure/resource/models/deployment_properties_extended.go on lines 101..118
            cloud/azure/resource/models/deployment_properties_extended.go on lines 188..205
            cloud/azure/resource/models/deployment_properties_extended.go on lines 234..251
            cloud/azure/resource/models/deployment_validate_result.go on lines 44..61
            cloud/azure/resource/models/deployment_validate_result.go on lines 63..80
            cloud/azure/resource/models/generic_resource.go on lines 98..115
            cloud/azure/resource/models/generic_resource.go on lines 130..147
            cloud/azure/resource/models/generic_resource.go on lines 149..166
            cloud/azure/resource/models/resource_group.go on lines 68..85
            cloud/azure/resource/models/resource_group_export_result.go on lines 39..56
            cloud/azure/resource/models/tag_details.go on lines 52..69
            cloud/azure/resource/models/tag_value.go on lines 42..59

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

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

            func (m *ResourceGroupExportResult) validateError(formats strfmt.Registry) error {
            
                if swag.IsZero(m.Error) { // not required
                    return nil
                }
            cloud/azure/resource/models/deployment_extended.go on lines 58..75
            cloud/azure/resource/models/deployment_operation.go on lines 44..61
            cloud/azure/resource/models/deployment_operation_properties.go on lines 75..92
            cloud/azure/resource/models/deployment_operation_properties.go on lines 94..111
            cloud/azure/resource/models/deployment_operation_properties.go on lines 113..130
            cloud/azure/resource/models/deployment_properties.go on lines 70..87
            cloud/azure/resource/models/deployment_properties.go on lines 130..147
            cloud/azure/resource/models/deployment_properties.go on lines 149..166
            cloud/azure/resource/models/deployment_properties_extended.go on lines 101..118
            cloud/azure/resource/models/deployment_properties_extended.go on lines 188..205
            cloud/azure/resource/models/deployment_properties_extended.go on lines 234..251
            cloud/azure/resource/models/deployment_validate_result.go on lines 44..61
            cloud/azure/resource/models/deployment_validate_result.go on lines 63..80
            cloud/azure/resource/models/generic_resource.go on lines 98..115
            cloud/azure/resource/models/generic_resource.go on lines 130..147
            cloud/azure/resource/models/generic_resource.go on lines 149..166
            cloud/azure/resource/models/resource_group.go on lines 68..85
            cloud/azure/resource/models/tag_details.go on lines 52..69
            cloud/azure/resource/models/tag_value.go on lines 42..59

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

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

            func (m *DeploymentProperties) validateTemplateLink(formats strfmt.Registry) error {
            
                if swag.IsZero(m.TemplateLink) { // not required
                    return nil
                }
            Severity: Major
            Found in cloud/azure/resource/models/deployment_properties.go and 19 other locations - About 1 hr to fix
            cloud/azure/resource/models/deployment_extended.go on lines 58..75
            cloud/azure/resource/models/deployment_operation.go on lines 44..61
            cloud/azure/resource/models/deployment_operation_properties.go on lines 75..92
            cloud/azure/resource/models/deployment_operation_properties.go on lines 94..111
            cloud/azure/resource/models/deployment_operation_properties.go on lines 113..130
            cloud/azure/resource/models/deployment_properties.go on lines 70..87
            cloud/azure/resource/models/deployment_properties.go on lines 130..147
            cloud/azure/resource/models/deployment_properties_extended.go on lines 101..118
            cloud/azure/resource/models/deployment_properties_extended.go on lines 188..205
            cloud/azure/resource/models/deployment_properties_extended.go on lines 234..251
            cloud/azure/resource/models/deployment_validate_result.go on lines 44..61
            cloud/azure/resource/models/deployment_validate_result.go on lines 63..80
            cloud/azure/resource/models/generic_resource.go on lines 98..115
            cloud/azure/resource/models/generic_resource.go on lines 130..147
            cloud/azure/resource/models/generic_resource.go on lines 149..166
            cloud/azure/resource/models/resource_group.go on lines 68..85
            cloud/azure/resource/models/resource_group_export_result.go on lines 39..56
            cloud/azure/resource/models/tag_details.go on lines 52..69
            cloud/azure/resource/models/tag_value.go on lines 42..59

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

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

            func (m *DeploymentPropertiesExtended) validateTemplateLink(formats strfmt.Registry) error {
            
                if swag.IsZero(m.TemplateLink) { // not required
                    return nil
                }
            cloud/azure/resource/models/deployment_extended.go on lines 58..75
            cloud/azure/resource/models/deployment_operation.go on lines 44..61
            cloud/azure/resource/models/deployment_operation_properties.go on lines 75..92
            cloud/azure/resource/models/deployment_operation_properties.go on lines 94..111
            cloud/azure/resource/models/deployment_operation_properties.go on lines 113..130
            cloud/azure/resource/models/deployment_properties.go on lines 70..87
            cloud/azure/resource/models/deployment_properties.go on lines 130..147
            cloud/azure/resource/models/deployment_properties.go on lines 149..166
            cloud/azure/resource/models/deployment_properties_extended.go on lines 101..118
            cloud/azure/resource/models/deployment_properties_extended.go on lines 188..205
            cloud/azure/resource/models/deployment_validate_result.go on lines 44..61
            cloud/azure/resource/models/deployment_validate_result.go on lines 63..80
            cloud/azure/resource/models/generic_resource.go on lines 98..115
            cloud/azure/resource/models/generic_resource.go on lines 130..147
            cloud/azure/resource/models/generic_resource.go on lines 149..166
            cloud/azure/resource/models/resource_group.go on lines 68..85
            cloud/azure/resource/models/resource_group_export_result.go on lines 39..56
            cloud/azure/resource/models/tag_details.go on lines 52..69
            cloud/azure/resource/models/tag_value.go on lines 42..59

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

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

            func (m *DeploymentOperation) validateProperties(formats strfmt.Registry) error {
            
                if swag.IsZero(m.Properties) { // not required
                    return nil
                }
            Severity: Major
            Found in cloud/azure/resource/models/deployment_operation.go and 19 other locations - About 1 hr to fix
            cloud/azure/resource/models/deployment_extended.go on lines 58..75
            cloud/azure/resource/models/deployment_operation_properties.go on lines 75..92
            cloud/azure/resource/models/deployment_operation_properties.go on lines 94..111
            cloud/azure/resource/models/deployment_operation_properties.go on lines 113..130
            cloud/azure/resource/models/deployment_properties.go on lines 70..87
            cloud/azure/resource/models/deployment_properties.go on lines 130..147
            cloud/azure/resource/models/deployment_properties.go on lines 149..166
            cloud/azure/resource/models/deployment_properties_extended.go on lines 101..118
            cloud/azure/resource/models/deployment_properties_extended.go on lines 188..205
            cloud/azure/resource/models/deployment_properties_extended.go on lines 234..251
            cloud/azure/resource/models/deployment_validate_result.go on lines 44..61
            cloud/azure/resource/models/deployment_validate_result.go on lines 63..80
            cloud/azure/resource/models/generic_resource.go on lines 98..115
            cloud/azure/resource/models/generic_resource.go on lines 130..147
            cloud/azure/resource/models/generic_resource.go on lines 149..166
            cloud/azure/resource/models/resource_group.go on lines 68..85
            cloud/azure/resource/models/resource_group_export_result.go on lines 39..56
            cloud/azure/resource/models/tag_details.go on lines 52..69
            cloud/azure/resource/models/tag_value.go on lines 42..59

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

            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

                t.Run("delete the first task", func(t *testing.T) {
                    err = m.DeleteTask(ctx, indexedName(queueBase, 5), indexedName(task.Name, 0))
                    if err != nil {
                        t.Fatalf("DeleteTasks returns an error: %v", err)
                    }
            Severity: Major
            Found in cloud/mock/queue_test.go and 1 other location - About 1 hr to fix
            cloud/mock/queue_test.go on lines 739..749

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

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

            func (m *DeploymentProperties) validateParametersLink(formats strfmt.Registry) error {
            
                if swag.IsZero(m.ParametersLink) { // not required
                    return nil
                }
            Severity: Major
            Found in cloud/azure/resource/models/deployment_properties.go and 19 other locations - About 1 hr to fix
            cloud/azure/resource/models/deployment_extended.go on lines 58..75
            cloud/azure/resource/models/deployment_operation.go on lines 44..61
            cloud/azure/resource/models/deployment_operation_properties.go on lines 75..92
            cloud/azure/resource/models/deployment_operation_properties.go on lines 94..111
            cloud/azure/resource/models/deployment_operation_properties.go on lines 113..130
            cloud/azure/resource/models/deployment_properties.go on lines 70..87
            cloud/azure/resource/models/deployment_properties.go on lines 149..166
            cloud/azure/resource/models/deployment_properties_extended.go on lines 101..118
            cloud/azure/resource/models/deployment_properties_extended.go on lines 188..205
            cloud/azure/resource/models/deployment_properties_extended.go on lines 234..251
            cloud/azure/resource/models/deployment_validate_result.go on lines 44..61
            cloud/azure/resource/models/deployment_validate_result.go on lines 63..80
            cloud/azure/resource/models/generic_resource.go on lines 98..115
            cloud/azure/resource/models/generic_resource.go on lines 130..147
            cloud/azure/resource/models/generic_resource.go on lines 149..166
            cloud/azure/resource/models/resource_group.go on lines 68..85
            cloud/azure/resource/models/resource_group_export_result.go on lines 39..56
            cloud/azure/resource/models/tag_details.go on lines 52..69
            cloud/azure/resource/models/tag_value.go on lines 42..59

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

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

            func (m *DeploymentExtended) validateProperties(formats strfmt.Registry) error {
            
                if swag.IsZero(m.Properties) { // not required
                    return nil
                }
            Severity: Major
            Found in cloud/azure/resource/models/deployment_extended.go and 19 other locations - About 1 hr to fix
            cloud/azure/resource/models/deployment_operation.go on lines 44..61
            cloud/azure/resource/models/deployment_operation_properties.go on lines 75..92
            cloud/azure/resource/models/deployment_operation_properties.go on lines 94..111
            cloud/azure/resource/models/deployment_operation_properties.go on lines 113..130
            cloud/azure/resource/models/deployment_properties.go on lines 70..87
            cloud/azure/resource/models/deployment_properties.go on lines 130..147
            cloud/azure/resource/models/deployment_properties.go on lines 149..166
            cloud/azure/resource/models/deployment_properties_extended.go on lines 101..118
            cloud/azure/resource/models/deployment_properties_extended.go on lines 188..205
            cloud/azure/resource/models/deployment_properties_extended.go on lines 234..251
            cloud/azure/resource/models/deployment_validate_result.go on lines 44..61
            cloud/azure/resource/models/deployment_validate_result.go on lines 63..80
            cloud/azure/resource/models/generic_resource.go on lines 98..115
            cloud/azure/resource/models/generic_resource.go on lines 130..147
            cloud/azure/resource/models/generic_resource.go on lines 149..166
            cloud/azure/resource/models/resource_group.go on lines 68..85
            cloud/azure/resource/models/resource_group_export_result.go on lines 39..56
            cloud/azure/resource/models/tag_details.go on lines 52..69
            cloud/azure/resource/models/tag_value.go on lines 42..59

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

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

            func (m *DeploymentPropertiesExtended) validateParametersLink(formats strfmt.Registry) error {
            
                if swag.IsZero(m.ParametersLink) { // not required
                    return nil
                }
            cloud/azure/resource/models/deployment_extended.go on lines 58..75
            cloud/azure/resource/models/deployment_operation.go on lines 44..61
            cloud/azure/resource/models/deployment_operation_properties.go on lines 75..92
            cloud/azure/resource/models/deployment_operation_properties.go on lines 94..111
            cloud/azure/resource/models/deployment_operation_properties.go on lines 113..130
            cloud/azure/resource/models/deployment_properties.go on lines 70..87
            cloud/azure/resource/models/deployment_properties.go on lines 130..147
            cloud/azure/resource/models/deployment_properties.go on lines 149..166
            cloud/azure/resource/models/deployment_properties_extended.go on lines 101..118
            cloud/azure/resource/models/deployment_properties_extended.go on lines 234..251
            cloud/azure/resource/models/deployment_validate_result.go on lines 44..61
            cloud/azure/resource/models/deployment_validate_result.go on lines 63..80
            cloud/azure/resource/models/generic_resource.go on lines 98..115
            cloud/azure/resource/models/generic_resource.go on lines 130..147
            cloud/azure/resource/models/generic_resource.go on lines 149..166
            cloud/azure/resource/models/resource_group.go on lines 68..85
            cloud/azure/resource/models/resource_group_export_result.go on lines 39..56
            cloud/azure/resource/models/tag_details.go on lines 52..69
            cloud/azure/resource/models/tag_value.go on lines 42..59

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

            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

                t.Run("delete the last task", func(t *testing.T) {
                    err = m.DeleteTask(ctx, indexedName(queueBase, 2), indexedName(task.Name, 2))
                    if err != nil {
                        t.Fatalf("DeleteTasks returns an error: %v", err)
                    }
            Severity: Major
            Found in cloud/mock/queue_test.go and 1 other location - About 1 hr to fix
            cloud/mock/queue_test.go on lines 727..737

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

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

            func (m *GenericResource) validateIdentity(formats strfmt.Registry) error {
            
                if swag.IsZero(m.Identity) { // not required
                    return nil
                }
            Severity: Major
            Found in cloud/azure/resource/models/generic_resource.go and 19 other locations - About 1 hr to fix
            cloud/azure/resource/models/deployment_extended.go on lines 58..75
            cloud/azure/resource/models/deployment_operation.go on lines 44..61
            cloud/azure/resource/models/deployment_operation_properties.go on lines 75..92
            cloud/azure/resource/models/deployment_operation_properties.go on lines 94..111
            cloud/azure/resource/models/deployment_operation_properties.go on lines 113..130
            cloud/azure/resource/models/deployment_properties.go on lines 70..87
            cloud/azure/resource/models/deployment_properties.go on lines 130..147
            cloud/azure/resource/models/deployment_properties.go on lines 149..166
            cloud/azure/resource/models/deployment_properties_extended.go on lines 101..118
            cloud/azure/resource/models/deployment_properties_extended.go on lines 188..205
            cloud/azure/resource/models/deployment_properties_extended.go on lines 234..251
            cloud/azure/resource/models/deployment_validate_result.go on lines 44..61
            cloud/azure/resource/models/deployment_validate_result.go on lines 63..80
            cloud/azure/resource/models/generic_resource.go on lines 130..147
            cloud/azure/resource/models/generic_resource.go on lines 149..166
            cloud/azure/resource/models/resource_group.go on lines 68..85
            cloud/azure/resource/models/resource_group_export_result.go on lines 39..56
            cloud/azure/resource/models/tag_details.go on lines 52..69
            cloud/azure/resource/models/tag_value.go on lines 42..59

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

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

            func (m *DeploymentValidateResult) validateProperties(formats strfmt.Registry) error {
            
                if swag.IsZero(m.Properties) { // not required
                    return nil
                }
            Severity: Major
            Found in cloud/azure/resource/models/deployment_validate_result.go and 19 other locations - About 1 hr to fix
            cloud/azure/resource/models/deployment_extended.go on lines 58..75
            cloud/azure/resource/models/deployment_operation.go on lines 44..61
            cloud/azure/resource/models/deployment_operation_properties.go on lines 75..92
            cloud/azure/resource/models/deployment_operation_properties.go on lines 94..111
            cloud/azure/resource/models/deployment_operation_properties.go on lines 113..130
            cloud/azure/resource/models/deployment_properties.go on lines 70..87
            cloud/azure/resource/models/deployment_properties.go on lines 130..147
            cloud/azure/resource/models/deployment_properties.go on lines 149..166
            cloud/azure/resource/models/deployment_properties_extended.go on lines 101..118
            cloud/azure/resource/models/deployment_properties_extended.go on lines 188..205
            cloud/azure/resource/models/deployment_properties_extended.go on lines 234..251
            cloud/azure/resource/models/deployment_validate_result.go on lines 44..61
            cloud/azure/resource/models/generic_resource.go on lines 98..115
            cloud/azure/resource/models/generic_resource.go on lines 130..147
            cloud/azure/resource/models/generic_resource.go on lines 149..166
            cloud/azure/resource/models/resource_group.go on lines 68..85
            cloud/azure/resource/models/resource_group_export_result.go on lines 39..56
            cloud/azure/resource/models/tag_details.go on lines 52..69
            cloud/azure/resource/models/tag_value.go on lines 42..59

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

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

            func (m *GenericResource) validateSku(formats strfmt.Registry) error {
            
                if swag.IsZero(m.Sku) { // not required
                    return nil
                }
            Severity: Major
            Found in cloud/azure/resource/models/generic_resource.go and 19 other locations - About 1 hr to fix
            cloud/azure/resource/models/deployment_extended.go on lines 58..75
            cloud/azure/resource/models/deployment_operation.go on lines 44..61
            cloud/azure/resource/models/deployment_operation_properties.go on lines 75..92
            cloud/azure/resource/models/deployment_operation_properties.go on lines 94..111
            cloud/azure/resource/models/deployment_operation_properties.go on lines 113..130
            cloud/azure/resource/models/deployment_properties.go on lines 70..87
            cloud/azure/resource/models/deployment_properties.go on lines 130..147
            cloud/azure/resource/models/deployment_properties.go on lines 149..166
            cloud/azure/resource/models/deployment_properties_extended.go on lines 101..118
            cloud/azure/resource/models/deployment_properties_extended.go on lines 188..205
            cloud/azure/resource/models/deployment_properties_extended.go on lines 234..251
            cloud/azure/resource/models/deployment_validate_result.go on lines 44..61
            cloud/azure/resource/models/deployment_validate_result.go on lines 63..80
            cloud/azure/resource/models/generic_resource.go on lines 98..115
            cloud/azure/resource/models/generic_resource.go on lines 130..147
            cloud/azure/resource/models/resource_group.go on lines 68..85
            cloud/azure/resource/models/resource_group_export_result.go on lines 39..56
            cloud/azure/resource/models/tag_details.go on lines 52..69
            cloud/azure/resource/models/tag_value.go on lines 42..59

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

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

            func (m *DeploymentPropertiesExtended) validateDebugSetting(formats strfmt.Registry) error {
            
                if swag.IsZero(m.DebugSetting) { // not required
                    return nil
                }
            cloud/azure/resource/models/deployment_extended.go on lines 58..75
            cloud/azure/resource/models/deployment_operation.go on lines 44..61
            cloud/azure/resource/models/deployment_operation_properties.go on lines 75..92
            cloud/azure/resource/models/deployment_operation_properties.go on lines 94..111
            cloud/azure/resource/models/deployment_operation_properties.go on lines 113..130
            cloud/azure/resource/models/deployment_properties.go on lines 70..87
            cloud/azure/resource/models/deployment_properties.go on lines 130..147
            cloud/azure/resource/models/deployment_properties.go on lines 149..166
            cloud/azure/resource/models/deployment_properties_extended.go on lines 188..205
            cloud/azure/resource/models/deployment_properties_extended.go on lines 234..251
            cloud/azure/resource/models/deployment_validate_result.go on lines 44..61
            cloud/azure/resource/models/deployment_validate_result.go on lines 63..80
            cloud/azure/resource/models/generic_resource.go on lines 98..115
            cloud/azure/resource/models/generic_resource.go on lines 130..147
            cloud/azure/resource/models/generic_resource.go on lines 149..166
            cloud/azure/resource/models/resource_group.go on lines 68..85
            cloud/azure/resource/models/resource_group_export_result.go on lines 39..56
            cloud/azure/resource/models/tag_details.go on lines 52..69
            cloud/azure/resource/models/tag_value.go on lines 42..59

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

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

            func (m *DeploymentValidateResult) validateError(formats strfmt.Registry) error {
            
                if swag.IsZero(m.Error) { // not required
                    return nil
                }
            Severity: Major
            Found in cloud/azure/resource/models/deployment_validate_result.go and 19 other locations - About 1 hr to fix
            cloud/azure/resource/models/deployment_extended.go on lines 58..75
            cloud/azure/resource/models/deployment_operation.go on lines 44..61
            cloud/azure/resource/models/deployment_operation_properties.go on lines 75..92
            cloud/azure/resource/models/deployment_operation_properties.go on lines 94..111
            cloud/azure/resource/models/deployment_operation_properties.go on lines 113..130
            cloud/azure/resource/models/deployment_properties.go on lines 70..87
            cloud/azure/resource/models/deployment_properties.go on lines 130..147
            cloud/azure/resource/models/deployment_properties.go on lines 149..166
            cloud/azure/resource/models/deployment_properties_extended.go on lines 101..118
            cloud/azure/resource/models/deployment_properties_extended.go on lines 188..205
            cloud/azure/resource/models/deployment_properties_extended.go on lines 234..251
            cloud/azure/resource/models/deployment_validate_result.go on lines 63..80
            cloud/azure/resource/models/generic_resource.go on lines 98..115
            cloud/azure/resource/models/generic_resource.go on lines 130..147
            cloud/azure/resource/models/generic_resource.go on lines 149..166
            cloud/azure/resource/models/resource_group.go on lines 68..85
            cloud/azure/resource/models/resource_group_export_result.go on lines 39..56
            cloud/azure/resource/models/tag_details.go on lines 52..69
            cloud/azure/resource/models/tag_value.go on lines 42..59

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

            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