saltstack/salt

View on GitHub

Showing 7,542 of 17,590 total issues

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

        if __opts__.get('update_cachedir', False) is True:
            __utils__['cloud.delete_minion_cachedir'](name, __active_provider_name__.split(':')[0], __opts__)
Severity: Major
Found in salt/cloud/clouds/nova.py and 22 other locations - About 50 mins to fix
salt/cloud/clouds/azurearm.py on lines 1528..1532
salt/cloud/clouds/digitalocean.py on lines 868..869
salt/cloud/clouds/ec2.py on lines 3417..3418
salt/cloud/clouds/gce.py on lines 2377..2378
salt/cloud/clouds/gogrid.py on lines 421..422
salt/cloud/clouds/joyent.py on lines 429..430
salt/cloud/clouds/linode.py on lines 758..759
salt/cloud/clouds/lxc.py on lines 415..416
salt/cloud/clouds/msazure.py on lines 947..948
salt/cloud/clouds/oneandone.py on lines 918..922
salt/cloud/clouds/opennebula.py on lines 1226..1230
salt/cloud/clouds/openstack.py on lines 816..817
salt/cloud/clouds/parallels.py on lines 561..562
salt/cloud/clouds/profitbricks.py on lines 1023..1027
salt/cloud/clouds/proxmox.py on lines 1194..1196
salt/cloud/clouds/scaleway.py on lines 456..458
salt/cloud/clouds/softlayer.py on lines 637..638
salt/cloud/clouds/softlayer_hw.py on lines 547..548
salt/cloud/clouds/vagrant.py on lines 308..310
salt/cloud/clouds/vmware.py on lines 2513..2514
salt/cloud/clouds/xen.py on lines 1046..1050
salt/cloud/libcloudfuncs.py on lines 403..404

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

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

        if __opts__.get('update_cachedir', False) is True:
            __utils__['cloud.delete_minion_cachedir'](name, __active_provider_name__.split(':')[0], __opts__)
Severity: Major
Found in salt/cloud/libcloudfuncs.py and 22 other locations - About 50 mins to fix
salt/cloud/clouds/azurearm.py on lines 1528..1532
salt/cloud/clouds/digitalocean.py on lines 868..869
salt/cloud/clouds/ec2.py on lines 3417..3418
salt/cloud/clouds/gce.py on lines 2377..2378
salt/cloud/clouds/gogrid.py on lines 421..422
salt/cloud/clouds/joyent.py on lines 429..430
salt/cloud/clouds/linode.py on lines 758..759
salt/cloud/clouds/lxc.py on lines 415..416
salt/cloud/clouds/msazure.py on lines 947..948
salt/cloud/clouds/nova.py on lines 569..570
salt/cloud/clouds/oneandone.py on lines 918..922
salt/cloud/clouds/opennebula.py on lines 1226..1230
salt/cloud/clouds/openstack.py on lines 816..817
salt/cloud/clouds/parallels.py on lines 561..562
salt/cloud/clouds/profitbricks.py on lines 1023..1027
salt/cloud/clouds/proxmox.py on lines 1194..1196
salt/cloud/clouds/scaleway.py on lines 456..458
salt/cloud/clouds/softlayer.py on lines 637..638
salt/cloud/clouds/softlayer_hw.py on lines 547..548
salt/cloud/clouds/vagrant.py on lines 308..310
salt/cloud/clouds/vmware.py on lines 2513..2514
salt/cloud/clouds/xen.py on lines 1046..1050

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

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

    if __opts__.get('update_cachedir', False) is True:
        __utils__['cloud.delete_minion_cachedir'](
            name,
            __active_provider_name__.split(':')[0],
            __opts__
Severity: Major
Found in salt/cloud/clouds/profitbricks.py and 22 other locations - About 50 mins to fix
salt/cloud/clouds/azurearm.py on lines 1528..1532
salt/cloud/clouds/digitalocean.py on lines 868..869
salt/cloud/clouds/ec2.py on lines 3417..3418
salt/cloud/clouds/gce.py on lines 2377..2378
salt/cloud/clouds/gogrid.py on lines 421..422
salt/cloud/clouds/joyent.py on lines 429..430
salt/cloud/clouds/linode.py on lines 758..759
salt/cloud/clouds/lxc.py on lines 415..416
salt/cloud/clouds/msazure.py on lines 947..948
salt/cloud/clouds/nova.py on lines 569..570
salt/cloud/clouds/oneandone.py on lines 918..922
salt/cloud/clouds/opennebula.py on lines 1226..1230
salt/cloud/clouds/openstack.py on lines 816..817
salt/cloud/clouds/parallels.py on lines 561..562
salt/cloud/clouds/proxmox.py on lines 1194..1196
salt/cloud/clouds/scaleway.py on lines 456..458
salt/cloud/clouds/softlayer.py on lines 637..638
salt/cloud/clouds/softlayer_hw.py on lines 547..548
salt/cloud/clouds/vagrant.py on lines 308..310
salt/cloud/clouds/vmware.py on lines 2513..2514
salt/cloud/clouds/xen.py on lines 1046..1050
salt/cloud/libcloudfuncs.py on lines 403..404

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

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

    if __opts__.get('update_cachedir', False) is True:
        __utils__['cloud.delete_minion_cachedir'](name, __active_provider_name__.split(':')[0], __opts__)
Severity: Major
Found in salt/cloud/clouds/ec2.py and 22 other locations - About 50 mins to fix
salt/cloud/clouds/azurearm.py on lines 1528..1532
salt/cloud/clouds/digitalocean.py on lines 868..869
salt/cloud/clouds/gce.py on lines 2377..2378
salt/cloud/clouds/gogrid.py on lines 421..422
salt/cloud/clouds/joyent.py on lines 429..430
salt/cloud/clouds/linode.py on lines 758..759
salt/cloud/clouds/lxc.py on lines 415..416
salt/cloud/clouds/msazure.py on lines 947..948
salt/cloud/clouds/nova.py on lines 569..570
salt/cloud/clouds/oneandone.py on lines 918..922
salt/cloud/clouds/opennebula.py on lines 1226..1230
salt/cloud/clouds/openstack.py on lines 816..817
salt/cloud/clouds/parallels.py on lines 561..562
salt/cloud/clouds/profitbricks.py on lines 1023..1027
salt/cloud/clouds/proxmox.py on lines 1194..1196
salt/cloud/clouds/scaleway.py on lines 456..458
salt/cloud/clouds/softlayer.py on lines 637..638
salt/cloud/clouds/softlayer_hw.py on lines 547..548
salt/cloud/clouds/vagrant.py on lines 308..310
salt/cloud/clouds/vmware.py on lines 2513..2514
salt/cloud/clouds/xen.py on lines 1046..1050
salt/cloud/libcloudfuncs.py on lines 403..404

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

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

    if __opts__.get('update_cachedir', False) is True:
        __utils__['cloud.delete_minion_cachedir'](name, __active_provider_name__.split(':')[0], __opts__)
Severity: Major
Found in salt/cloud/clouds/msazure.py and 22 other locations - About 50 mins to fix
salt/cloud/clouds/azurearm.py on lines 1528..1532
salt/cloud/clouds/digitalocean.py on lines 868..869
salt/cloud/clouds/ec2.py on lines 3417..3418
salt/cloud/clouds/gce.py on lines 2377..2378
salt/cloud/clouds/gogrid.py on lines 421..422
salt/cloud/clouds/joyent.py on lines 429..430
salt/cloud/clouds/linode.py on lines 758..759
salt/cloud/clouds/lxc.py on lines 415..416
salt/cloud/clouds/nova.py on lines 569..570
salt/cloud/clouds/oneandone.py on lines 918..922
salt/cloud/clouds/opennebula.py on lines 1226..1230
salt/cloud/clouds/openstack.py on lines 816..817
salt/cloud/clouds/parallels.py on lines 561..562
salt/cloud/clouds/profitbricks.py on lines 1023..1027
salt/cloud/clouds/proxmox.py on lines 1194..1196
salt/cloud/clouds/scaleway.py on lines 456..458
salt/cloud/clouds/softlayer.py on lines 637..638
salt/cloud/clouds/softlayer_hw.py on lines 547..548
salt/cloud/clouds/vagrant.py on lines 308..310
salt/cloud/clouds/vmware.py on lines 2513..2514
salt/cloud/clouds/xen.py on lines 1046..1050
salt/cloud/libcloudfuncs.py on lines 403..404

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

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

        if __opts__.get('update_cachedir', False) is True:
            __utils__['cloud.delete_minion_cachedir'](
                name,
                __active_provider_name__.split(':')[0],
                __opts__
Severity: Major
Found in salt/cloud/clouds/xen.py and 22 other locations - About 50 mins to fix
salt/cloud/clouds/azurearm.py on lines 1528..1532
salt/cloud/clouds/digitalocean.py on lines 868..869
salt/cloud/clouds/ec2.py on lines 3417..3418
salt/cloud/clouds/gce.py on lines 2377..2378
salt/cloud/clouds/gogrid.py on lines 421..422
salt/cloud/clouds/joyent.py on lines 429..430
salt/cloud/clouds/linode.py on lines 758..759
salt/cloud/clouds/lxc.py on lines 415..416
salt/cloud/clouds/msazure.py on lines 947..948
salt/cloud/clouds/nova.py on lines 569..570
salt/cloud/clouds/oneandone.py on lines 918..922
salt/cloud/clouds/opennebula.py on lines 1226..1230
salt/cloud/clouds/openstack.py on lines 816..817
salt/cloud/clouds/parallels.py on lines 561..562
salt/cloud/clouds/profitbricks.py on lines 1023..1027
salt/cloud/clouds/proxmox.py on lines 1194..1196
salt/cloud/clouds/scaleway.py on lines 456..458
salt/cloud/clouds/softlayer.py on lines 637..638
salt/cloud/clouds/softlayer_hw.py on lines 547..548
salt/cloud/clouds/vagrant.py on lines 308..310
salt/cloud/clouds/vmware.py on lines 2513..2514
salt/cloud/libcloudfuncs.py on lines 403..404

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

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

    if __opts__.get('update_cachedir', False) is True:
        __utils__['cloud.delete_minion_cachedir'](name, __active_provider_name__.split(':')[0], __opts__)
Severity: Major
Found in salt/cloud/clouds/softlayer.py and 22 other locations - About 50 mins to fix
salt/cloud/clouds/azurearm.py on lines 1528..1532
salt/cloud/clouds/digitalocean.py on lines 868..869
salt/cloud/clouds/ec2.py on lines 3417..3418
salt/cloud/clouds/gce.py on lines 2377..2378
salt/cloud/clouds/gogrid.py on lines 421..422
salt/cloud/clouds/joyent.py on lines 429..430
salt/cloud/clouds/linode.py on lines 758..759
salt/cloud/clouds/lxc.py on lines 415..416
salt/cloud/clouds/msazure.py on lines 947..948
salt/cloud/clouds/nova.py on lines 569..570
salt/cloud/clouds/oneandone.py on lines 918..922
salt/cloud/clouds/opennebula.py on lines 1226..1230
salt/cloud/clouds/openstack.py on lines 816..817
salt/cloud/clouds/parallels.py on lines 561..562
salt/cloud/clouds/profitbricks.py on lines 1023..1027
salt/cloud/clouds/proxmox.py on lines 1194..1196
salt/cloud/clouds/scaleway.py on lines 456..458
salt/cloud/clouds/softlayer_hw.py on lines 547..548
salt/cloud/clouds/vagrant.py on lines 308..310
salt/cloud/clouds/vmware.py on lines 2513..2514
salt/cloud/clouds/xen.py on lines 1046..1050
salt/cloud/libcloudfuncs.py on lines 403..404

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

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

    if __opts__.get('update_cachedir', False) is True:
        __utils__['cloud.delete_minion_cachedir'](name, __active_provider_name__.split(':')[0], __opts__)
Severity: Major
Found in salt/cloud/clouds/linode.py and 22 other locations - About 50 mins to fix
salt/cloud/clouds/azurearm.py on lines 1528..1532
salt/cloud/clouds/digitalocean.py on lines 868..869
salt/cloud/clouds/ec2.py on lines 3417..3418
salt/cloud/clouds/gce.py on lines 2377..2378
salt/cloud/clouds/gogrid.py on lines 421..422
salt/cloud/clouds/joyent.py on lines 429..430
salt/cloud/clouds/lxc.py on lines 415..416
salt/cloud/clouds/msazure.py on lines 947..948
salt/cloud/clouds/nova.py on lines 569..570
salt/cloud/clouds/oneandone.py on lines 918..922
salt/cloud/clouds/opennebula.py on lines 1226..1230
salt/cloud/clouds/openstack.py on lines 816..817
salt/cloud/clouds/parallels.py on lines 561..562
salt/cloud/clouds/profitbricks.py on lines 1023..1027
salt/cloud/clouds/proxmox.py on lines 1194..1196
salt/cloud/clouds/scaleway.py on lines 456..458
salt/cloud/clouds/softlayer.py on lines 637..638
salt/cloud/clouds/softlayer_hw.py on lines 547..548
salt/cloud/clouds/vagrant.py on lines 308..310
salt/cloud/clouds/vmware.py on lines 2513..2514
salt/cloud/clouds/xen.py on lines 1046..1050
salt/cloud/libcloudfuncs.py on lines 403..404

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

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

    if __opts__.get('update_cachedir', False) is True:
        __utils__['cloud.delete_minion_cachedir'](vm_name, __active_provider_name__.split(':')[0], __opts__)
Severity: Major
Found in salt/cloud/clouds/gce.py and 22 other locations - About 50 mins to fix
salt/cloud/clouds/azurearm.py on lines 1528..1532
salt/cloud/clouds/digitalocean.py on lines 868..869
salt/cloud/clouds/ec2.py on lines 3417..3418
salt/cloud/clouds/gogrid.py on lines 421..422
salt/cloud/clouds/joyent.py on lines 429..430
salt/cloud/clouds/linode.py on lines 758..759
salt/cloud/clouds/lxc.py on lines 415..416
salt/cloud/clouds/msazure.py on lines 947..948
salt/cloud/clouds/nova.py on lines 569..570
salt/cloud/clouds/oneandone.py on lines 918..922
salt/cloud/clouds/opennebula.py on lines 1226..1230
salt/cloud/clouds/openstack.py on lines 816..817
salt/cloud/clouds/parallels.py on lines 561..562
salt/cloud/clouds/profitbricks.py on lines 1023..1027
salt/cloud/clouds/proxmox.py on lines 1194..1196
salt/cloud/clouds/scaleway.py on lines 456..458
salt/cloud/clouds/softlayer.py on lines 637..638
salt/cloud/clouds/softlayer_hw.py on lines 547..548
salt/cloud/clouds/vagrant.py on lines 308..310
salt/cloud/clouds/vmware.py on lines 2513..2514
salt/cloud/clouds/xen.py on lines 1046..1050
salt/cloud/libcloudfuncs.py on lines 403..404

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

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

    if __opts__.get('update_cachedir', False) is True:
        __utils__['cloud.delete_minion_cachedir'](
            name, __active_provider_name__.split(':')[0], __opts__
Severity: Major
Found in salt/cloud/clouds/scaleway.py and 22 other locations - About 50 mins to fix
salt/cloud/clouds/azurearm.py on lines 1528..1532
salt/cloud/clouds/digitalocean.py on lines 868..869
salt/cloud/clouds/ec2.py on lines 3417..3418
salt/cloud/clouds/gce.py on lines 2377..2378
salt/cloud/clouds/gogrid.py on lines 421..422
salt/cloud/clouds/joyent.py on lines 429..430
salt/cloud/clouds/linode.py on lines 758..759
salt/cloud/clouds/lxc.py on lines 415..416
salt/cloud/clouds/msazure.py on lines 947..948
salt/cloud/clouds/nova.py on lines 569..570
salt/cloud/clouds/oneandone.py on lines 918..922
salt/cloud/clouds/opennebula.py on lines 1226..1230
salt/cloud/clouds/openstack.py on lines 816..817
salt/cloud/clouds/parallels.py on lines 561..562
salt/cloud/clouds/profitbricks.py on lines 1023..1027
salt/cloud/clouds/proxmox.py on lines 1194..1196
salt/cloud/clouds/softlayer.py on lines 637..638
salt/cloud/clouds/softlayer_hw.py on lines 547..548
salt/cloud/clouds/vagrant.py on lines 308..310
salt/cloud/clouds/vmware.py on lines 2513..2514
salt/cloud/clouds/xen.py on lines 1046..1050
salt/cloud/libcloudfuncs.py on lines 403..404

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

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

    if __opts__.get('update_cachedir', False) is True:
        __utils__['cloud.delete_minion_cachedir'](
            name,
            __active_provider_name__.split(':')[0],
            __opts__
Severity: Major
Found in salt/cloud/clouds/opennebula.py and 22 other locations - About 50 mins to fix
salt/cloud/clouds/azurearm.py on lines 1528..1532
salt/cloud/clouds/digitalocean.py on lines 868..869
salt/cloud/clouds/ec2.py on lines 3417..3418
salt/cloud/clouds/gce.py on lines 2377..2378
salt/cloud/clouds/gogrid.py on lines 421..422
salt/cloud/clouds/joyent.py on lines 429..430
salt/cloud/clouds/linode.py on lines 758..759
salt/cloud/clouds/lxc.py on lines 415..416
salt/cloud/clouds/msazure.py on lines 947..948
salt/cloud/clouds/nova.py on lines 569..570
salt/cloud/clouds/oneandone.py on lines 918..922
salt/cloud/clouds/openstack.py on lines 816..817
salt/cloud/clouds/parallels.py on lines 561..562
salt/cloud/clouds/profitbricks.py on lines 1023..1027
salt/cloud/clouds/proxmox.py on lines 1194..1196
salt/cloud/clouds/scaleway.py on lines 456..458
salt/cloud/clouds/softlayer.py on lines 637..638
salt/cloud/clouds/softlayer_hw.py on lines 547..548
salt/cloud/clouds/vagrant.py on lines 308..310
salt/cloud/clouds/vmware.py on lines 2513..2514
salt/cloud/clouds/xen.py on lines 1046..1050
salt/cloud/libcloudfuncs.py on lines 403..404

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

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

    if __opts__.get('update_cachedir', False) is True:
        __utils__['cloud.delete_minion_cachedir'](
            name,
            __active_provider_name__.split(':')[0],
            __opts__
Severity: Major
Found in salt/cloud/clouds/oneandone.py and 22 other locations - About 50 mins to fix
salt/cloud/clouds/azurearm.py on lines 1528..1532
salt/cloud/clouds/digitalocean.py on lines 868..869
salt/cloud/clouds/ec2.py on lines 3417..3418
salt/cloud/clouds/gce.py on lines 2377..2378
salt/cloud/clouds/gogrid.py on lines 421..422
salt/cloud/clouds/joyent.py on lines 429..430
salt/cloud/clouds/linode.py on lines 758..759
salt/cloud/clouds/lxc.py on lines 415..416
salt/cloud/clouds/msazure.py on lines 947..948
salt/cloud/clouds/nova.py on lines 569..570
salt/cloud/clouds/opennebula.py on lines 1226..1230
salt/cloud/clouds/openstack.py on lines 816..817
salt/cloud/clouds/parallels.py on lines 561..562
salt/cloud/clouds/profitbricks.py on lines 1023..1027
salt/cloud/clouds/proxmox.py on lines 1194..1196
salt/cloud/clouds/scaleway.py on lines 456..458
salt/cloud/clouds/softlayer.py on lines 637..638
salt/cloud/clouds/softlayer_hw.py on lines 547..548
salt/cloud/clouds/vagrant.py on lines 308..310
salt/cloud/clouds/vmware.py on lines 2513..2514
salt/cloud/clouds/xen.py on lines 1046..1050
salt/cloud/libcloudfuncs.py on lines 403..404

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

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

    if __opts__.get('update_cachedir', False) is True:
        __utils__['cloud.delete_minion_cachedir'](name, __active_provider_name__.split(':')[0], __opts__)
Severity: Major
Found in salt/cloud/clouds/softlayer_hw.py and 22 other locations - About 50 mins to fix
salt/cloud/clouds/azurearm.py on lines 1528..1532
salt/cloud/clouds/digitalocean.py on lines 868..869
salt/cloud/clouds/ec2.py on lines 3417..3418
salt/cloud/clouds/gce.py on lines 2377..2378
salt/cloud/clouds/gogrid.py on lines 421..422
salt/cloud/clouds/joyent.py on lines 429..430
salt/cloud/clouds/linode.py on lines 758..759
salt/cloud/clouds/lxc.py on lines 415..416
salt/cloud/clouds/msazure.py on lines 947..948
salt/cloud/clouds/nova.py on lines 569..570
salt/cloud/clouds/oneandone.py on lines 918..922
salt/cloud/clouds/opennebula.py on lines 1226..1230
salt/cloud/clouds/openstack.py on lines 816..817
salt/cloud/clouds/parallels.py on lines 561..562
salt/cloud/clouds/profitbricks.py on lines 1023..1027
salt/cloud/clouds/proxmox.py on lines 1194..1196
salt/cloud/clouds/scaleway.py on lines 456..458
salt/cloud/clouds/softlayer.py on lines 637..638
salt/cloud/clouds/vagrant.py on lines 308..310
salt/cloud/clouds/vmware.py on lines 2513..2514
salt/cloud/clouds/xen.py on lines 1046..1050
salt/cloud/libcloudfuncs.py on lines 403..404

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

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

        if __opts__.get('update_cachedir', False) is True:
            __utils__['cloud.delete_minion_cachedir'](
                name, __active_provider_name__.split(':')[0], __opts__)
Severity: Major
Found in salt/cloud/clouds/proxmox.py and 22 other locations - About 50 mins to fix
salt/cloud/clouds/azurearm.py on lines 1528..1532
salt/cloud/clouds/digitalocean.py on lines 868..869
salt/cloud/clouds/ec2.py on lines 3417..3418
salt/cloud/clouds/gce.py on lines 2377..2378
salt/cloud/clouds/gogrid.py on lines 421..422
salt/cloud/clouds/joyent.py on lines 429..430
salt/cloud/clouds/linode.py on lines 758..759
salt/cloud/clouds/lxc.py on lines 415..416
salt/cloud/clouds/msazure.py on lines 947..948
salt/cloud/clouds/nova.py on lines 569..570
salt/cloud/clouds/oneandone.py on lines 918..922
salt/cloud/clouds/opennebula.py on lines 1226..1230
salt/cloud/clouds/openstack.py on lines 816..817
salt/cloud/clouds/parallels.py on lines 561..562
salt/cloud/clouds/profitbricks.py on lines 1023..1027
salt/cloud/clouds/scaleway.py on lines 456..458
salt/cloud/clouds/softlayer.py on lines 637..638
salt/cloud/clouds/softlayer_hw.py on lines 547..548
salt/cloud/clouds/vagrant.py on lines 308..310
salt/cloud/clouds/vmware.py on lines 2513..2514
salt/cloud/clouds/xen.py on lines 1046..1050
salt/cloud/libcloudfuncs.py on lines 403..404

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

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

    if __opts__.get('update_cachedir', False) is True:
        __utils__['cloud.delete_minion_cachedir'](name, __active_provider_name__.split(':')[0], __opts__)
Severity: Major
Found in salt/cloud/clouds/parallels.py and 22 other locations - About 50 mins to fix
salt/cloud/clouds/azurearm.py on lines 1528..1532
salt/cloud/clouds/digitalocean.py on lines 868..869
salt/cloud/clouds/ec2.py on lines 3417..3418
salt/cloud/clouds/gce.py on lines 2377..2378
salt/cloud/clouds/gogrid.py on lines 421..422
salt/cloud/clouds/joyent.py on lines 429..430
salt/cloud/clouds/linode.py on lines 758..759
salt/cloud/clouds/lxc.py on lines 415..416
salt/cloud/clouds/msazure.py on lines 947..948
salt/cloud/clouds/nova.py on lines 569..570
salt/cloud/clouds/oneandone.py on lines 918..922
salt/cloud/clouds/opennebula.py on lines 1226..1230
salt/cloud/clouds/openstack.py on lines 816..817
salt/cloud/clouds/profitbricks.py on lines 1023..1027
salt/cloud/clouds/proxmox.py on lines 1194..1196
salt/cloud/clouds/scaleway.py on lines 456..458
salt/cloud/clouds/softlayer.py on lines 637..638
salt/cloud/clouds/softlayer_hw.py on lines 547..548
salt/cloud/clouds/vagrant.py on lines 308..310
salt/cloud/clouds/vmware.py on lines 2513..2514
salt/cloud/clouds/xen.py on lines 1046..1050
salt/cloud/libcloudfuncs.py on lines 403..404

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

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

    if __opts__.get('update_cachedir', False) is True:
        __utils__['cloud.delete_minion_cachedir'](
           name,
           __active_provider_name__.split(':')[0],
           __opts__
Severity: Major
Found in salt/cloud/clouds/azurearm.py and 22 other locations - About 50 mins to fix
salt/cloud/clouds/digitalocean.py on lines 868..869
salt/cloud/clouds/ec2.py on lines 3417..3418
salt/cloud/clouds/gce.py on lines 2377..2378
salt/cloud/clouds/gogrid.py on lines 421..422
salt/cloud/clouds/joyent.py on lines 429..430
salt/cloud/clouds/linode.py on lines 758..759
salt/cloud/clouds/lxc.py on lines 415..416
salt/cloud/clouds/msazure.py on lines 947..948
salt/cloud/clouds/nova.py on lines 569..570
salt/cloud/clouds/oneandone.py on lines 918..922
salt/cloud/clouds/opennebula.py on lines 1226..1230
salt/cloud/clouds/openstack.py on lines 816..817
salt/cloud/clouds/parallels.py on lines 561..562
salt/cloud/clouds/profitbricks.py on lines 1023..1027
salt/cloud/clouds/proxmox.py on lines 1194..1196
salt/cloud/clouds/scaleway.py on lines 456..458
salt/cloud/clouds/softlayer.py on lines 637..638
salt/cloud/clouds/softlayer_hw.py on lines 547..548
salt/cloud/clouds/vagrant.py on lines 308..310
salt/cloud/clouds/vmware.py on lines 2513..2514
salt/cloud/clouds/xen.py on lines 1046..1050
salt/cloud/libcloudfuncs.py on lines 403..404

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

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

        if __opts__.get('update_cachedir', False) is True:
            __utils__['cloud.delete_minion_cachedir'](name, __active_provider_name__.split(':')[0], __opts__)
Severity: Major
Found in salt/cloud/clouds/openstack.py and 22 other locations - About 50 mins to fix
salt/cloud/clouds/azurearm.py on lines 1528..1532
salt/cloud/clouds/digitalocean.py on lines 868..869
salt/cloud/clouds/ec2.py on lines 3417..3418
salt/cloud/clouds/gce.py on lines 2377..2378
salt/cloud/clouds/gogrid.py on lines 421..422
salt/cloud/clouds/joyent.py on lines 429..430
salt/cloud/clouds/linode.py on lines 758..759
salt/cloud/clouds/lxc.py on lines 415..416
salt/cloud/clouds/msazure.py on lines 947..948
salt/cloud/clouds/nova.py on lines 569..570
salt/cloud/clouds/oneandone.py on lines 918..922
salt/cloud/clouds/opennebula.py on lines 1226..1230
salt/cloud/clouds/parallels.py on lines 561..562
salt/cloud/clouds/profitbricks.py on lines 1023..1027
salt/cloud/clouds/proxmox.py on lines 1194..1196
salt/cloud/clouds/scaleway.py on lines 456..458
salt/cloud/clouds/softlayer.py on lines 637..638
salt/cloud/clouds/softlayer_hw.py on lines 547..548
salt/cloud/clouds/vagrant.py on lines 308..310
salt/cloud/clouds/vmware.py on lines 2513..2514
salt/cloud/clouds/xen.py on lines 1046..1050
salt/cloud/libcloudfuncs.py on lines 403..404

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

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

    if __opts__.get('update_cachedir', False) is True:
        __utils__['cloud.delete_minion_cachedir'](name, __active_provider_name__.split(':')[0], __opts__)
Severity: Major
Found in salt/cloud/clouds/gogrid.py and 22 other locations - About 50 mins to fix
salt/cloud/clouds/azurearm.py on lines 1528..1532
salt/cloud/clouds/digitalocean.py on lines 868..869
salt/cloud/clouds/ec2.py on lines 3417..3418
salt/cloud/clouds/gce.py on lines 2377..2378
salt/cloud/clouds/joyent.py on lines 429..430
salt/cloud/clouds/linode.py on lines 758..759
salt/cloud/clouds/lxc.py on lines 415..416
salt/cloud/clouds/msazure.py on lines 947..948
salt/cloud/clouds/nova.py on lines 569..570
salt/cloud/clouds/oneandone.py on lines 918..922
salt/cloud/clouds/opennebula.py on lines 1226..1230
salt/cloud/clouds/openstack.py on lines 816..817
salt/cloud/clouds/parallels.py on lines 561..562
salt/cloud/clouds/profitbricks.py on lines 1023..1027
salt/cloud/clouds/proxmox.py on lines 1194..1196
salt/cloud/clouds/scaleway.py on lines 456..458
salt/cloud/clouds/softlayer.py on lines 637..638
salt/cloud/clouds/softlayer_hw.py on lines 547..548
salt/cloud/clouds/vagrant.py on lines 308..310
salt/cloud/clouds/vmware.py on lines 2513..2514
salt/cloud/clouds/xen.py on lines 1046..1050
salt/cloud/libcloudfuncs.py on lines 403..404

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

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

        res = __salt__['boto_route53.create_hosted_zone'](domain_name=domain_name,
Severity: Major
Found in salt/states/boto_route53.py and 7 other locations - About 50 mins to fix
salt/states/boto3_route53.py on lines 222..222
salt/states/boto_cloudwatch_event.py on lines 153..153
salt/states/boto_cloudwatch_event.py on lines 229..229
salt/states/boto_elb.py on lines 632..632
salt/states/cron.py on lines 349..350
salt/states/mount.py on lines 1117..1128
salt/states/ssh_known_hosts.py on lines 163..163

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

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

    result = __salt__['ssh.set_known_host'](
Severity: Major
Found in salt/states/ssh_known_hosts.py and 7 other locations - About 50 mins to fix
salt/states/boto3_route53.py on lines 222..222
salt/states/boto_cloudwatch_event.py on lines 153..153
salt/states/boto_cloudwatch_event.py on lines 229..229
salt/states/boto_elb.py on lines 632..632
salt/states/boto_route53.py on lines 474..474
salt/states/cron.py on lines 349..350
salt/states/mount.py on lines 1117..1128

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

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