YorickPeterse/ruby-lint

View on GitHub

Showing 2,162 of 2,162 total issues

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

  defs.define_constant('ActiveSupport::JSON::Variable') do |klass|
    klass.inherits(defs.constant_proxy('String', RubyLint.registry))

    klass.define_instance_method('as_json') do |method|
      method.define_optional_argument('options')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_support.rb and 27 other locations - About 55 mins to fix
lib/ruby-lint/definitions/core/drb.rb on lines 67..81
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1272..1286
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1290..1304
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1323..1337
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1341..1355
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1359..1373
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1377..1391
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1410..1424
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1428..1442
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1446..1460
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1464..1478
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1482..1496
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1500..1514
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1518..1532
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1536..1550
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1554..1568
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1572..1586
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1590..1604
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1608..1622
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1626..1640
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1644..1658
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1662..1676
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1680..1694
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1698..1712
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1716..1730
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1734..1748
lib/ruby-lint/definitions/gems/lib_xml.rb on lines 5825..5839

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

  defs.define_constant('OpenSSL::Digest::DSS1') do |klass|
    klass.inherits(defs.constant_proxy('OpenSSL::Digest', RubyLint.registry))

    klass.define_method('digest') do |method|
      method.define_argument('data')
Severity: Major
Found in lib/ruby-lint/definitions/core/open_ssl.rb and 27 other locations - About 55 mins to fix
lib/ruby-lint/definitions/core/drb.rb on lines 67..81
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1272..1286
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1323..1337
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1341..1355
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1359..1373
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1377..1391
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1410..1424
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1428..1442
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1446..1460
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1464..1478
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1482..1496
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1500..1514
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1518..1532
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1536..1550
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1554..1568
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1572..1586
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1590..1604
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1608..1622
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1626..1640
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1644..1658
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1662..1676
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1680..1694
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1698..1712
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1716..1730
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1734..1748
lib/ruby-lint/definitions/gems/lib_xml.rb on lines 5825..5839
lib/ruby-lint/definitions/rails/active_support.rb on lines 2724..2738

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

  defs.define_constant('OpenSSL::Digest::MD4::MD2') do |klass|
    klass.inherits(defs.constant_proxy('OpenSSL::Digest', RubyLint.registry))

    klass.define_method('digest') do |method|
      method.define_argument('data')
Severity: Major
Found in lib/ruby-lint/definitions/core/open_ssl.rb and 27 other locations - About 55 mins to fix
lib/ruby-lint/definitions/core/drb.rb on lines 67..81
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1272..1286
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1290..1304
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1323..1337
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1341..1355
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1359..1373
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1377..1391
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1428..1442
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1446..1460
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1464..1478
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1482..1496
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1500..1514
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1518..1532
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1536..1550
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1554..1568
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1572..1586
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1590..1604
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1608..1622
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1626..1640
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1644..1658
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1662..1676
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1680..1694
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1698..1712
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1716..1730
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1734..1748
lib/ruby-lint/definitions/gems/lib_xml.rb on lines 5825..5839
lib/ruby-lint/definitions/rails/active_support.rb on lines 2724..2738

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

  defs.define_constant('OpenSSL::Digest::DSS') do |klass|
    klass.inherits(defs.constant_proxy('OpenSSL::Digest', RubyLint.registry))

    klass.define_method('digest') do |method|
      method.define_argument('data')
Severity: Major
Found in lib/ruby-lint/definitions/core/open_ssl.rb and 27 other locations - About 55 mins to fix
lib/ruby-lint/definitions/core/drb.rb on lines 67..81
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1290..1304
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1323..1337
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1341..1355
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1359..1373
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1377..1391
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1410..1424
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1428..1442
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1446..1460
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1464..1478
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1482..1496
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1500..1514
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1518..1532
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1536..1550
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1554..1568
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1572..1586
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1590..1604
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1608..1622
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1626..1640
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1644..1658
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1662..1676
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1680..1694
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1698..1712
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1716..1730
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1734..1748
lib/ruby-lint/definitions/gems/lib_xml.rb on lines 5825..5839
lib/ruby-lint/definitions/rails/active_support.rb on lines 2724..2738

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

  defs.define_constant('OpenSSL::Digest::MD4::MD5') do |klass|
    klass.inherits(defs.constant_proxy('OpenSSL::Digest', RubyLint.registry))

    klass.define_method('digest') do |method|
      method.define_argument('data')
Severity: Major
Found in lib/ruby-lint/definitions/core/open_ssl.rb and 27 other locations - About 55 mins to fix
lib/ruby-lint/definitions/core/drb.rb on lines 67..81
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1272..1286
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1290..1304
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1323..1337
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1341..1355
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1359..1373
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1377..1391
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1410..1424
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1446..1460
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1464..1478
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1482..1496
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1500..1514
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1518..1532
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1536..1550
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1554..1568
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1572..1586
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1590..1604
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1608..1622
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1626..1640
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1644..1658
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1662..1676
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1680..1694
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1698..1712
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1716..1730
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1734..1748
lib/ruby-lint/definitions/gems/lib_xml.rb on lines 5825..5839
lib/ruby-lint/definitions/rails/active_support.rb on lines 2724..2738

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

  defs.define_constant('OpenSSL::Digest::MD4') do |klass|
    klass.inherits(defs.constant_proxy('OpenSSL::Digest', RubyLint.registry))

    klass.define_method('digest') do |method|
      method.define_argument('data')
Severity: Major
Found in lib/ruby-lint/definitions/core/open_ssl.rb and 27 other locations - About 55 mins to fix
lib/ruby-lint/definitions/core/drb.rb on lines 67..81
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1272..1286
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1290..1304
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1323..1337
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1359..1373
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1377..1391
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1410..1424
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1428..1442
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1446..1460
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1464..1478
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1482..1496
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1500..1514
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1518..1532
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1536..1550
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1554..1568
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1572..1586
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1590..1604
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1608..1622
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1626..1640
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1644..1658
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1662..1676
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1680..1694
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1698..1712
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1716..1730
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1734..1748
lib/ruby-lint/definitions/gems/lib_xml.rb on lines 5825..5839
lib/ruby-lint/definitions/rails/active_support.rb on lines 2724..2738

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

  defs.define_constant('OpenSSL::Digest::MD4::DSS1') do |klass|
    klass.inherits(defs.constant_proxy('OpenSSL::Digest', RubyLint.registry))

    klass.define_method('digest') do |method|
      method.define_argument('data')
Severity: Major
Found in lib/ruby-lint/definitions/core/open_ssl.rb and 27 other locations - About 55 mins to fix
lib/ruby-lint/definitions/core/drb.rb on lines 67..81
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1272..1286
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1290..1304
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1323..1337
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1341..1355
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1359..1373
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1410..1424
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1428..1442
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1446..1460
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1464..1478
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1482..1496
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1500..1514
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1518..1532
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1536..1550
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1554..1568
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1572..1586
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1590..1604
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1608..1622
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1626..1640
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1644..1658
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1662..1676
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1680..1694
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1698..1712
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1716..1730
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1734..1748
lib/ruby-lint/definitions/gems/lib_xml.rb on lines 5825..5839
lib/ruby-lint/definitions/rails/active_support.rb on lines 2724..2738

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

  defs.define_constant('OpenSSL::Digest::MDC2') do |klass|
    klass.inherits(defs.constant_proxy('OpenSSL::Digest', RubyLint.registry))

    klass.define_method('digest') do |method|
      method.define_argument('data')
Severity: Major
Found in lib/ruby-lint/definitions/core/open_ssl.rb and 27 other locations - About 55 mins to fix
lib/ruby-lint/definitions/core/drb.rb on lines 67..81
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1272..1286
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1290..1304
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1323..1337
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1341..1355
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1359..1373
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1377..1391
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1410..1424
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1428..1442
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1446..1460
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1464..1478
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1482..1496
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1500..1514
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1518..1532
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1536..1550
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1554..1568
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1572..1586
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1590..1604
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1626..1640
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1644..1658
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1662..1676
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1680..1694
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1698..1712
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1716..1730
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1734..1748
lib/ruby-lint/definitions/gems/lib_xml.rb on lines 5825..5839
lib/ruby-lint/definitions/rails/active_support.rb on lines 2724..2738

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

  defs.define_constant('LibXML::XML::RelaxNG') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_method('document') do |method|
      method.define_argument('arg1')
Severity: Major
Found in lib/ruby-lint/definitions/gems/lib_xml.rb and 27 other locations - About 55 mins to fix
lib/ruby-lint/definitions/core/drb.rb on lines 67..81
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1272..1286
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1290..1304
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1323..1337
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1341..1355
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1359..1373
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1377..1391
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1410..1424
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1428..1442
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1446..1460
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1464..1478
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1482..1496
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1500..1514
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1518..1532
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1536..1550
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1554..1568
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1572..1586
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1590..1604
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1608..1622
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1626..1640
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1644..1658
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1662..1676
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1680..1694
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1698..1712
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1716..1730
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1734..1748
lib/ruby-lint/definitions/rails/active_support.rb on lines 2724..2738

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

  defs.define_constant('OpenSSL::Digest::MD2') do |klass|
    klass.inherits(defs.constant_proxy('OpenSSL::Digest', RubyLint.registry))

    klass.define_method('digest') do |method|
      method.define_argument('data')
Severity: Major
Found in lib/ruby-lint/definitions/core/open_ssl.rb and 27 other locations - About 55 mins to fix
lib/ruby-lint/definitions/core/drb.rb on lines 67..81
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1272..1286
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1290..1304
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1341..1355
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1359..1373
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1377..1391
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1410..1424
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1428..1442
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1446..1460
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1464..1478
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1482..1496
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1500..1514
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1518..1532
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1536..1550
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1554..1568
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1572..1586
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1590..1604
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1608..1622
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1626..1640
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1644..1658
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1662..1676
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1680..1694
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1698..1712
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1716..1730
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1734..1748
lib/ruby-lint/definitions/gems/lib_xml.rb on lines 5825..5839
lib/ruby-lint/definitions/rails/active_support.rb on lines 2724..2738

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

  defs.define_constant('OpenSSL::Digest::SHA1') do |klass|
    klass.inherits(defs.constant_proxy('OpenSSL::Digest', RubyLint.registry))

    klass.define_method('digest') do |method|
      method.define_argument('data')
Severity: Major
Found in lib/ruby-lint/definitions/core/open_ssl.rb and 27 other locations - About 55 mins to fix
lib/ruby-lint/definitions/core/drb.rb on lines 67..81
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1272..1286
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1290..1304
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1323..1337
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1341..1355
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1359..1373
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1377..1391
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1410..1424
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1428..1442
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1446..1460
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1464..1478
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1482..1496
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1500..1514
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1518..1532
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1536..1550
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1554..1568
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1572..1586
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1590..1604
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1608..1622
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1626..1640
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1644..1658
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1680..1694
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1698..1712
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1716..1730
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1734..1748
lib/ruby-lint/definitions/gems/lib_xml.rb on lines 5825..5839
lib/ruby-lint/definitions/rails/active_support.rb on lines 2724..2738

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

  defs.define_constant('OpenSSL::Digest::MD4::RIPEMD160') do |klass|
    klass.inherits(defs.constant_proxy('OpenSSL::Digest', RubyLint.registry))

    klass.define_method('digest') do |method|
      method.define_argument('data')
Severity: Major
Found in lib/ruby-lint/definitions/core/open_ssl.rb and 27 other locations - About 55 mins to fix
lib/ruby-lint/definitions/core/drb.rb on lines 67..81
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1272..1286
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1290..1304
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1323..1337
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1341..1355
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1359..1373
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1377..1391
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1410..1424
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1428..1442
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1446..1460
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1482..1496
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1500..1514
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1518..1532
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1536..1550
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1554..1568
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1572..1586
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1590..1604
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1608..1622
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1626..1640
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1644..1658
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1662..1676
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1680..1694
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1698..1712
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1716..1730
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1734..1748
lib/ruby-lint/definitions/gems/lib_xml.rb on lines 5825..5839
lib/ruby-lint/definitions/rails/active_support.rb on lines 2724..2738

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

  defs.define_constant('OpenSSL::Digest::MD4::SHA1') do |klass|
    klass.inherits(defs.constant_proxy('OpenSSL::Digest', RubyLint.registry))

    klass.define_method('digest') do |method|
      method.define_argument('data')
Severity: Major
Found in lib/ruby-lint/definitions/core/open_ssl.rb and 27 other locations - About 55 mins to fix
lib/ruby-lint/definitions/core/drb.rb on lines 67..81
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1272..1286
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1290..1304
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1323..1337
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1341..1355
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1359..1373
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1377..1391
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1410..1424
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1428..1442
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1446..1460
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1464..1478
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1482..1496
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1518..1532
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1536..1550
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1554..1568
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1572..1586
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1590..1604
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1608..1622
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1626..1640
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1644..1658
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1662..1676
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1680..1694
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1698..1712
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1716..1730
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1734..1748
lib/ruby-lint/definitions/gems/lib_xml.rb on lines 5825..5839
lib/ruby-lint/definitions/rails/active_support.rb on lines 2724..2738

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

  defs.define_constant('OpenSSL::Digest::MD5') do |klass|
    klass.inherits(defs.constant_proxy('OpenSSL::Digest', RubyLint.registry))

    klass.define_method('digest') do |method|
      method.define_argument('data')
Severity: Major
Found in lib/ruby-lint/definitions/core/open_ssl.rb and 27 other locations - About 55 mins to fix
lib/ruby-lint/definitions/core/drb.rb on lines 67..81
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1272..1286
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1290..1304
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1323..1337
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1341..1355
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1359..1373
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1377..1391
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1410..1424
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1428..1442
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1446..1460
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1464..1478
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1482..1496
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1500..1514
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1518..1532
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1536..1550
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1554..1568
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1572..1586
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1608..1622
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1626..1640
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1644..1658
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1662..1676
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1680..1694
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1698..1712
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1716..1730
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1734..1748
lib/ruby-lint/definitions/gems/lib_xml.rb on lines 5825..5839
lib/ruby-lint/definitions/rails/active_support.rb on lines 2724..2738

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

  defs.define_constant('OpenSSL::Digest::SHA') do |klass|
    klass.inherits(defs.constant_proxy('OpenSSL::Digest', RubyLint.registry))

    klass.define_method('digest') do |method|
      method.define_argument('data')
Severity: Major
Found in lib/ruby-lint/definitions/core/open_ssl.rb and 27 other locations - About 55 mins to fix
lib/ruby-lint/definitions/core/drb.rb on lines 67..81
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1272..1286
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1290..1304
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1323..1337
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1341..1355
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1359..1373
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1377..1391
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1410..1424
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1428..1442
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1446..1460
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1464..1478
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1482..1496
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1500..1514
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1518..1532
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1536..1550
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1554..1568
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1572..1586
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1590..1604
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1608..1622
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1626..1640
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1662..1676
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1680..1694
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1698..1712
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1716..1730
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1734..1748
lib/ruby-lint/definitions/gems/lib_xml.rb on lines 5825..5839
lib/ruby-lint/definitions/rails/active_support.rb on lines 2724..2738

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

  defs.define_constant('OpenSSL::Digest::MD4::SHA256') do |klass|
    klass.inherits(defs.constant_proxy('OpenSSL::Digest', RubyLint.registry))

    klass.define_method('digest') do |method|
      method.define_argument('data')
Severity: Major
Found in lib/ruby-lint/definitions/core/open_ssl.rb and 27 other locations - About 55 mins to fix
lib/ruby-lint/definitions/core/drb.rb on lines 67..81
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1272..1286
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1290..1304
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1323..1337
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1341..1355
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1359..1373
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1377..1391
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1410..1424
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1428..1442
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1446..1460
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1464..1478
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1482..1496
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1500..1514
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1518..1532
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1554..1568
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1572..1586
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1590..1604
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1608..1622
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1626..1640
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1644..1658
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1662..1676
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1680..1694
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1698..1712
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1716..1730
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1734..1748
lib/ruby-lint/definitions/gems/lib_xml.rb on lines 5825..5839
lib/ruby-lint/definitions/rails/active_support.rb on lines 2724..2738

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

  defs.define_constant('OpenSSL::Digest::RIPEMD160') do |klass|
    klass.inherits(defs.constant_proxy('OpenSSL::Digest', RubyLint.registry))

    klass.define_method('digest') do |method|
      method.define_argument('data')
Severity: Major
Found in lib/ruby-lint/definitions/core/open_ssl.rb and 27 other locations - About 55 mins to fix
lib/ruby-lint/definitions/core/drb.rb on lines 67..81
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1272..1286
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1290..1304
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1323..1337
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1341..1355
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1359..1373
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1377..1391
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1410..1424
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1428..1442
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1446..1460
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1464..1478
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1482..1496
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1500..1514
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1518..1532
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1536..1550
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1554..1568
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1572..1586
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1590..1604
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1608..1622
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1644..1658
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1662..1676
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1680..1694
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1698..1712
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1716..1730
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1734..1748
lib/ruby-lint/definitions/gems/lib_xml.rb on lines 5825..5839
lib/ruby-lint/definitions/rails/active_support.rb on lines 2724..2738

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

  defs.define_constant('OpenSSL::Digest::MD4::SHA384') do |klass|
    klass.inherits(defs.constant_proxy('OpenSSL::Digest', RubyLint.registry))

    klass.define_method('digest') do |method|
      method.define_argument('data')
Severity: Major
Found in lib/ruby-lint/definitions/core/open_ssl.rb and 27 other locations - About 55 mins to fix
lib/ruby-lint/definitions/core/drb.rb on lines 67..81
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1272..1286
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1290..1304
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1323..1337
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1341..1355
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1359..1373
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1377..1391
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1410..1424
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1428..1442
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1446..1460
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1464..1478
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1482..1496
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1500..1514
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1518..1532
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1536..1550
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1572..1586
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1590..1604
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1608..1622
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1626..1640
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1644..1658
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1662..1676
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1680..1694
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1698..1712
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1716..1730
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1734..1748
lib/ruby-lint/definitions/gems/lib_xml.rb on lines 5825..5839
lib/ruby-lint/definitions/rails/active_support.rb on lines 2724..2738

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

  defs.define_constant('OpenSSL::Digest::SHA256') do |klass|
    klass.inherits(defs.constant_proxy('OpenSSL::Digest', RubyLint.registry))

    klass.define_method('digest') do |method|
      method.define_argument('data')
Severity: Major
Found in lib/ruby-lint/definitions/core/open_ssl.rb and 27 other locations - About 55 mins to fix
lib/ruby-lint/definitions/core/drb.rb on lines 67..81
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1272..1286
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1290..1304
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1323..1337
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1341..1355
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1359..1373
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1377..1391
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1410..1424
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1428..1442
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1446..1460
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1464..1478
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1482..1496
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1500..1514
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1518..1532
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1536..1550
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1554..1568
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1572..1586
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1590..1604
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1608..1622
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1626..1640
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1644..1658
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1662..1676
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1680..1694
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1716..1730
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1734..1748
lib/ruby-lint/definitions/gems/lib_xml.rb on lines 5825..5839
lib/ruby-lint/definitions/rails/active_support.rb on lines 2724..2738

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

  defs.define_constant('OpenSSL::Digest::SHA224') do |klass|
    klass.inherits(defs.constant_proxy('OpenSSL::Digest', RubyLint.registry))

    klass.define_method('digest') do |method|
      method.define_argument('data')
Severity: Major
Found in lib/ruby-lint/definitions/core/open_ssl.rb and 27 other locations - About 55 mins to fix
lib/ruby-lint/definitions/core/drb.rb on lines 67..81
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1272..1286
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1290..1304
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1323..1337
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1341..1355
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1359..1373
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1377..1391
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1410..1424
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1428..1442
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1446..1460
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1464..1478
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1482..1496
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1500..1514
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1518..1532
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1536..1550
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1554..1568
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1572..1586
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1590..1604
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1608..1622
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1626..1640
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1644..1658
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1662..1676
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1698..1712
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1716..1730
lib/ruby-lint/definitions/core/open_ssl.rb on lines 1734..1748
lib/ruby-lint/definitions/gems/lib_xml.rb on lines 5825..5839
lib/ruby-lint/definitions/rails/active_support.rb on lines 2724..2738

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