jkawamoto/roadie

View on GitHub

Showing 2,161 of 2,161 total issues

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

func TestCmdConfigMachineTypeShow(t *testing.T) {

    var err error
    var output bytes.Buffer
    p := mock.NewProvider()
Severity: Major
Found in command/config_test.go and 1 other location - About 3 hrs to fix
command/config_test.go on lines 453..490

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

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

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

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

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

Refactorings

Further Reading

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

func TestCmdConfigRegionShow(t *testing.T) {

    var err error
    var output bytes.Buffer
    p := mock.NewProvider()
Severity: Major
Found in command/config_test.go and 1 other location - About 3 hrs to fix
command/config_test.go on lines 282..319

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

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

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

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

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

Refactorings

Further Reading

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

func cmdConfigMachineTypeSet(m *Metadata, machineType string) (err error) {

    resource, err := m.ResourceManager()
    if err != nil {
        return
Severity: Major
Found in command/config.go and 1 other location - About 3 hrs to fix
command/config.go on lines 313..351

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

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

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

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

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

Refactorings

Further Reading

Function TestLogManagerGet has a Cognitive Complexity of 40 (exceeds 20 allowed). Consider refactoring.
Open

func TestLogManagerGet(t *testing.T) {

    now := time.Now()

    m := NewLogManager()
Severity: Minor
Found in cloud/mock/log_test.go - About 3 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

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

    if err := m.validateApplicationPackageReferences(formats); err != nil {
        // prop
Severity: Major
Found in cloud/azure/batch/models/job_manager_task.go and 3 other locations - About 3 hrs to fix
cloud/azure/compute/models/data_disk.go on lines 46..83
cloud/azure/compute/models/virtual_machine_scale_set_o_s_disk.go on lines 44..81
cloud/azure/resource/models/deployment_properties_extended.go on lines 62..99

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

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

    if err := m.validateCaching(formats); err != nil {
        // prop
cloud/azure/batch/models/job_manager_task.go on lines 66..103
cloud/azure/compute/models/data_disk.go on lines 46..83
cloud/azure/resource/models/deployment_properties_extended.go on lines 62..99

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

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

    if err := m.validateDebugSetting(formats); err != nil {
        // prop
cloud/azure/batch/models/job_manager_task.go on lines 66..103
cloud/azure/compute/models/data_disk.go on lines 46..83
cloud/azure/compute/models/virtual_machine_scale_set_o_s_disk.go on lines 44..81

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

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

    if err := m.validateCaching(formats); err != nil {
        // prop
Severity: Major
Found in cloud/azure/compute/models/data_disk.go and 3 other locations - About 3 hrs to fix
cloud/azure/batch/models/job_manager_task.go on lines 66..103
cloud/azure/compute/models/virtual_machine_scale_set_o_s_disk.go on lines 44..81
cloud/azure/resource/models/deployment_properties_extended.go on lines 62..99

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

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

PoolGetParams has 29 methods (exceeds 20 allowed). Consider refactoring.
Open

type PoolGetParams struct {

    /*NrDollarExpand
      An OData $expand clause.

Severity: Minor
Found in cloud/azure/batch/client/pools/pool_get_parameters.go - About 3 hrs to fix

    JobGetParams has 29 methods (exceeds 20 allowed). Consider refactoring.
    Open

    type JobGetParams struct {
    
        /*NrDollarExpand
          An OData $expand clause.
    
    
    Severity: Minor
    Found in cloud/azure/batch/client/jobs/job_get_parameters.go - About 3 hrs to fix

      TaskUpdateParams has 29 methods (exceeds 20 allowed). Consider refactoring.
      Open

      type TaskUpdateParams struct {
      
          /*IfMatch
            An ETag is specified. Specify this header to perform the operation only if the resource's ETag is an exact match as specified.
      
      
      Severity: Minor
      Found in cloud/azure/batch/client/tasks/task_update_parameters.go - About 3 hrs to fix

        JobScheduleGetParams has 29 methods (exceeds 20 allowed). Consider refactoring.
        Open

        type JobScheduleGetParams struct {
        
            /*NrDollarExpand
              An OData $expand clause.
        
        
        Severity: Minor
        Found in cloud/azure/batch/client/job_schedules/job_schedule_get_parameters.go - About 3 hrs to fix

          Function TestQueues has a Cognitive Complexity of 39 (exceeds 20 allowed). Consider refactoring.
          Open

          func TestQueues(t *testing.T) {
          
              var err error
              ctx := context.Background()
              m := NewQueueManager()
          Severity: Minor
          Found in cloud/mock/queue_test.go - About 3 hrs to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

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

              for _, c := range cases {
          
                  err = cmdDelete(m, c.container, c.queries)
                  if err != nil {
                      t.Fatalf("cmdDelete returns an error: %v", err)
          Severity: Major
          Found in command/helper_test.go and 1 other location - About 3 hrs to fix
          command/result_test.go on lines 238..265

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

          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

              for _, c := range cases {
          
                  err = cmdResultDelete(m, c.instance, c.queries)
                  if err != nil {
                      t.Fatalf("cmdResultDelete returns an error: %v", err)
          Severity: Major
          Found in command/result_test.go and 1 other location - About 3 hrs to fix
          command/helper_test.go on lines 224..251

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

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

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

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

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

          Refactorings

          Further Reading

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

          func (a *Client) VirtualMachinesDelete(params *VirtualMachinesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualMachinesDeleteOK, *VirtualMachinesDeleteAccepted, *VirtualMachinesDeleteNoContent, error) {
              // TODO: Validate the params before sending
              if params == nil {
                  params = NewVirtualMachinesDeleteParams()
              }
          cloud/azure/compute/client/images/images_client.go on lines 63..95
          cloud/azure/compute/client/virtual_machine_extensions/virtual_machine_extensions_client.go on lines 63..95
          cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_client.go on lines 63..95
          cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_client.go on lines 98..130
          cloud/azure/resource/client/resources/resources_client.go on lines 86..118
          cloud/azure/resource/client/resources/resources_client.go on lines 123..155
          cloud/azure/resource/client/resources/resources_client.go on lines 160..192
          cloud/azure/resource/client/resources/resources_client.go on lines 197..229

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

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

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

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

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

          Refactorings

          Further Reading

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

          func (a *Client) ResourcesDelete(params *ResourcesDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*ResourcesDeleteOK, *ResourcesDeleteAccepted, *ResourcesDeleteNoContent, error) {
              // TODO: Validate the params before sending
              if params == nil {
                  params = NewResourcesDeleteParams()
              }
          Severity: Major
          Found in cloud/azure/resource/client/resources/resources_client.go and 8 other locations - About 3 hrs to fix
          cloud/azure/compute/client/images/images_client.go on lines 63..95
          cloud/azure/compute/client/virtual_machine_extensions/virtual_machine_extensions_client.go on lines 63..95
          cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_client.go on lines 63..95
          cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_client.go on lines 98..130
          cloud/azure/compute/client/virtual_machines/virtual_machines_client.go on lines 168..200
          cloud/azure/resource/client/resources/resources_client.go on lines 86..118
          cloud/azure/resource/client/resources/resources_client.go on lines 123..155
          cloud/azure/resource/client/resources/resources_client.go on lines 197..229

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

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

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

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

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

          Refactorings

          Further Reading

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

          func (a *Client) VirtualMachineScaleSetVmsDelete(params *VirtualMachineScaleSetVmsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualMachineScaleSetVmsDeleteOK, *VirtualMachineScaleSetVmsDeleteAccepted, *VirtualMachineScaleSetVmsDeleteNoContent, error) {
              // TODO: Validate the params before sending
              if params == nil {
                  params = NewVirtualMachineScaleSetVmsDeleteParams()
              }
          cloud/azure/compute/client/images/images_client.go on lines 63..95
          cloud/azure/compute/client/virtual_machine_extensions/virtual_machine_extensions_client.go on lines 63..95
          cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_client.go on lines 98..130
          cloud/azure/compute/client/virtual_machines/virtual_machines_client.go on lines 168..200
          cloud/azure/resource/client/resources/resources_client.go on lines 86..118
          cloud/azure/resource/client/resources/resources_client.go on lines 123..155
          cloud/azure/resource/client/resources/resources_client.go on lines 160..192
          cloud/azure/resource/client/resources/resources_client.go on lines 197..229

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

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

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

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

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

          Refactorings

          Further Reading

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

          func (a *Client) ResourcesCreateOrUpdateByID(params *ResourcesCreateOrUpdateByIDParams, authInfo runtime.ClientAuthInfoWriter) (*ResourcesCreateOrUpdateByIDOK, *ResourcesCreateOrUpdateByIDCreated, *ResourcesCreateOrUpdateByIDAccepted, error) {
              // TODO: Validate the params before sending
              if params == nil {
                  params = NewResourcesCreateOrUpdateByIDParams()
              }
          Severity: Major
          Found in cloud/azure/resource/client/resources/resources_client.go and 8 other locations - About 3 hrs to fix
          cloud/azure/compute/client/images/images_client.go on lines 63..95
          cloud/azure/compute/client/virtual_machine_extensions/virtual_machine_extensions_client.go on lines 63..95
          cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_client.go on lines 63..95
          cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_client.go on lines 98..130
          cloud/azure/compute/client/virtual_machines/virtual_machines_client.go on lines 168..200
          cloud/azure/resource/client/resources/resources_client.go on lines 86..118
          cloud/azure/resource/client/resources/resources_client.go on lines 160..192
          cloud/azure/resource/client/resources/resources_client.go on lines 197..229

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

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

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

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

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

          Refactorings

          Further Reading

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

          func (a *Client) VirtualMachineExtensionsDelete(params *VirtualMachineExtensionsDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*VirtualMachineExtensionsDeleteOK, *VirtualMachineExtensionsDeleteAccepted, *VirtualMachineExtensionsDeleteNoContent, error) {
              // TODO: Validate the params before sending
              if params == nil {
                  params = NewVirtualMachineExtensionsDeleteParams()
              }
          cloud/azure/compute/client/images/images_client.go on lines 63..95
          cloud/azure/compute/client/virtual_machine_scale_set_vms/virtual_machine_scale_set_vms_client.go on lines 63..95
          cloud/azure/compute/client/virtual_machine_scale_sets/virtual_machine_scale_sets_client.go on lines 98..130
          cloud/azure/compute/client/virtual_machines/virtual_machines_client.go on lines 168..200
          cloud/azure/resource/client/resources/resources_client.go on lines 86..118
          cloud/azure/resource/client/resources/resources_client.go on lines 123..155
          cloud/azure/resource/client/resources/resources_client.go on lines 160..192
          cloud/azure/resource/client/resources/resources_client.go on lines 197..229

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

          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