YorickPeterse/ruby-lint

View on GitHub

Showing 2,162 of 2,162 total issues

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

  defs.define_constant('RSpec::Core::Formatters::ProgressFormatter') do |klass|
    klass.inherits(defs.constant_proxy('RSpec::Core::Formatters::BaseTextFormatter', RubyLint.registry))

    klass.define_instance_method('example_failed') do |method|
      method.define_argument('_notification')
Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.rb and 15 other locations - About 55 mins to fix
lib/ruby-lint/definitions/core/erb.rb on lines 269..285
lib/ruby-lint/definitions/core/uri.rb on lines 88..104
lib/ruby-lint/definitions/core/uri.rb on lines 470..486
lib/ruby-lint/definitions/gems/glib.rb on lines 3566..3582
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1330..1346
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3281..3297
lib/ruby-lint/definitions/gems/mongoid.rb on lines 6006..6022
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8589..8605
lib/ruby-lint/definitions/rails/abstract_controller.rb on lines 569..585
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1375..1391
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2738..2754
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2384..2400
lib/ruby-lint/definitions/rails/active_record.rb on lines 11695..11711
lib/ruby-lint/definitions/rails/active_support.rb on lines 1201..1217
lib/ruby-lint/definitions/rails/arel.rb on lines 1411..1427

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

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

  defs.define_constant('URI::HTTPS::Escape') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('decode') do |method|
      method.define_rest_argument('arg')
Severity: Major
Found in lib/ruby-lint/definitions/core/uri.rb and 15 other locations - About 55 mins to fix
lib/ruby-lint/definitions/core/erb.rb on lines 269..285
lib/ruby-lint/definitions/core/uri.rb on lines 88..104
lib/ruby-lint/definitions/gems/glib.rb on lines 3566..3582
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1330..1346
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3281..3297
lib/ruby-lint/definitions/gems/mongoid.rb on lines 6006..6022
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8589..8605
lib/ruby-lint/definitions/gems/rspec.rb on lines 3268..3284
lib/ruby-lint/definitions/rails/abstract_controller.rb on lines 569..585
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1375..1391
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2738..2754
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2384..2400
lib/ruby-lint/definitions/rails/active_record.rb on lines 11695..11711
lib/ruby-lint/definitions/rails/active_support.rb on lines 1201..1217
lib/ruby-lint/definitions/rails/arel.rb on lines 1411..1427

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

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

  defs.define_constant('ActiveSupport::Dependencies::ModuleConstMissing') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_method('append_features') do |method|
      method.define_argument('base')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_support.rb and 15 other locations - About 55 mins to fix
lib/ruby-lint/definitions/core/erb.rb on lines 269..285
lib/ruby-lint/definitions/core/uri.rb on lines 88..104
lib/ruby-lint/definitions/core/uri.rb on lines 470..486
lib/ruby-lint/definitions/gems/glib.rb on lines 3566..3582
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1330..1346
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3281..3297
lib/ruby-lint/definitions/gems/mongoid.rb on lines 6006..6022
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8589..8605
lib/ruby-lint/definitions/gems/rspec.rb on lines 3268..3284
lib/ruby-lint/definitions/rails/abstract_controller.rb on lines 569..585
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1375..1391
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2738..2754
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2384..2400
lib/ruby-lint/definitions/rails/active_record.rb on lines 11695..11711
lib/ruby-lint/definitions/rails/arel.rb on lines 1411..1427

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

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

  defs.define_constant('AbstractController::Translation') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('l') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/rails/abstract_controller.rb and 15 other locations - About 55 mins to fix
lib/ruby-lint/definitions/core/erb.rb on lines 269..285
lib/ruby-lint/definitions/core/uri.rb on lines 88..104
lib/ruby-lint/definitions/core/uri.rb on lines 470..486
lib/ruby-lint/definitions/gems/glib.rb on lines 3566..3582
lib/ruby-lint/definitions/gems/mongoid.rb on lines 1330..1346
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3281..3297
lib/ruby-lint/definitions/gems/mongoid.rb on lines 6006..6022
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8589..8605
lib/ruby-lint/definitions/gems/rspec.rb on lines 3268..3284
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1375..1391
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2738..2754
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2384..2400
lib/ruby-lint/definitions/rails/active_record.rb on lines 11695..11711
lib/ruby-lint/definitions/rails/active_support.rb on lines 1201..1217
lib/ruby-lint/definitions/rails/arel.rb on lines 1411..1427

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

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

  defs.define_constant('Mongoid::Contextual::Aggregable::Memory') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('avg') do |method|
      method.define_argument('field')
Severity: Major
Found in lib/ruby-lint/definitions/gems/mongoid.rb and 15 other locations - About 55 mins to fix
lib/ruby-lint/definitions/core/erb.rb on lines 269..285
lib/ruby-lint/definitions/core/uri.rb on lines 88..104
lib/ruby-lint/definitions/core/uri.rb on lines 470..486
lib/ruby-lint/definitions/gems/glib.rb on lines 3566..3582
lib/ruby-lint/definitions/gems/mongoid.rb on lines 3281..3297
lib/ruby-lint/definitions/gems/mongoid.rb on lines 6006..6022
lib/ruby-lint/definitions/gems/mongoid.rb on lines 8589..8605
lib/ruby-lint/definitions/gems/rspec.rb on lines 3268..3284
lib/ruby-lint/definitions/rails/abstract_controller.rb on lines 569..585
lib/ruby-lint/definitions/rails/action_controller.rb on lines 1375..1391
lib/ruby-lint/definitions/rails/action_controller.rb on lines 2738..2754
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2384..2400
lib/ruby-lint/definitions/rails/active_record.rb on lines 11695..11711
lib/ruby-lint/definitions/rails/active_support.rb on lines 1201..1217
lib/ruby-lint/definitions/rails/arel.rb on lines 1411..1427

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

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('Devise::OmniAuth::UrlHelpers') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_method('define_helpers') do |method|
      method.define_argument('mapping')
Severity: Minor
Found in lib/ruby-lint/definitions/gems/devise.rb and 1 other location - About 55 mins to fix
lib/ruby-lint/definitions/core/exception_for_matrix.rb on lines 7..21

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

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('ActionView::DependencyTracker') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_method('find_dependencies') do |method|
      method.define_argument('name')
Severity: Minor
Found in lib/ruby-lint/definitions/rails/action_view.rb and 1 other location - About 55 mins to fix
lib/ruby-lint/definitions/rails/action_view.rb on lines 4225..4239

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

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('Celluloid::PoolManager::ThreadHandle') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('alive?')

Severity: Minor
Found in lib/ruby-lint/definitions/gems/celluloid.rb and 1 other location - About 55 mins to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 4852..4869

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

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('Sprockets::ProcessedAsset::DependencyFile') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('eql?') do |method|
      method.define_argument('other')
Severity: Minor
Found in lib/ruby-lint/definitions/rails/sprockets.rb and 1 other location - About 55 mins to fix
lib/ruby-lint/definitions/core/marshal.rb on lines 223..237

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

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('Celluloid::PoolManager::LinkingRequest') do |klass|
    klass.inherits(defs.constant_proxy('Celluloid::SystemEvent', RubyLint.registry))

    klass.define_instance_method('actor')

Severity: Minor
Found in lib/ruby-lint/definitions/gems/celluloid.rb and 1 other location - About 55 mins to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 1322..1338

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

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('Celluloid::LinkingRequest') do |klass|
    klass.inherits(defs.constant_proxy('Celluloid::SystemEvent', RubyLint.registry))

    klass.define_instance_method('actor')

Severity: Minor
Found in lib/ruby-lint/definitions/gems/celluloid.rb and 1 other location - About 55 mins to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 2578..2594

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

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('ExceptionForMatrix') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_method('included') do |method|
      method.define_argument('mod')
Severity: Minor
Found in lib/ruby-lint/definitions/core/exception_for_matrix.rb and 1 other location - About 55 mins to fix
lib/ruby-lint/definitions/gems/devise.rb on lines 2030..2044

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

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('Celluloid::ThreadHandle') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('alive?')

Severity: Minor
Found in lib/ruby-lint/definitions/gems/celluloid.rb and 1 other location - About 55 mins to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 3570..3587

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

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('ActionView::RecordIdentifier') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('dom_class') do |method|
      method.define_argument('record_or_class')
Severity: Minor
Found in lib/ruby-lint/definitions/rails/action_view.rb and 1 other location - About 55 mins to fix
lib/ruby-lint/definitions/rails/action_view.rb on lines 2014..2028

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

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

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

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

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

Refactorings

Further Reading

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

  defs.define_constant('Marshal::StringState') do |klass|
    klass.inherits(defs.constant_proxy('Marshal::State', RubyLint.registry))

    klass.define_instance_method('consume') do |method|
      method.define_argument('bytes')
Severity: Minor
Found in lib/ruby-lint/definitions/core/marshal.rb and 1 other location - About 55 mins to fix
lib/ruby-lint/definitions/rails/sprockets.rb on lines 866..880

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

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('DRb::DRbArray') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_method('_load') do |method|
      method.define_argument('s')
Severity: Major
Found in lib/ruby-lint/definitions/core/drb.rb and 27 other locations - About 55 mins to fix
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
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::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 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::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 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 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::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 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::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 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

Severity
Category
Status
Source
Language