YorickPeterse/ruby-lint

View on GitHub

Showing 2,162 of 2,162 total issues

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

  defs.define_constant('Rails::WelcomeController::Callback') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('_update_filter') do |method|
      method.define_argument('filter_options')
Severity: Major
Found in lib/ruby-lint/definitions/rails/rails.rb and 16 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/rails/action_controller.rb on lines 512..585
lib/ruby-lint/definitions/rails/action_controller.rb on lines 3114..3187
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 204..277
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 3061..3134
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 437..510
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 979..1052
lib/ruby-lint/definitions/rails/action_view.rb on lines 5429..5502
lib/ruby-lint/definitions/rails/action_view.rb on lines 6953..7026
lib/ruby-lint/definitions/rails/active_model.rb on lines 982..1055
lib/ruby-lint/definitions/rails/active_record.rb on lines 1977..2050
lib/ruby-lint/definitions/rails/active_record.rb on lines 3469..3542
lib/ruby-lint/definitions/rails/active_record.rb on lines 9622..9695
lib/ruby-lint/definitions/rails/active_record.rb on lines 11329..11402
lib/ruby-lint/definitions/rails/active_support.rb on lines 715..788
lib/ruby-lint/definitions/rails/active_support.rb on lines 4891..4964
lib/ruby-lint/definitions/rails/rails.rb on lines 1081..1154

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

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

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

    klass.define_instance_method('_update_filter') do |method|
      method.define_argument('filter_options')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_support.rb and 16 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/rails/action_controller.rb on lines 512..585
lib/ruby-lint/definitions/rails/action_controller.rb on lines 3114..3187
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 204..277
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 3061..3134
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 437..510
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 979..1052
lib/ruby-lint/definitions/rails/action_view.rb on lines 5429..5502
lib/ruby-lint/definitions/rails/action_view.rb on lines 6953..7026
lib/ruby-lint/definitions/rails/active_model.rb on lines 982..1055
lib/ruby-lint/definitions/rails/active_record.rb on lines 1977..2050
lib/ruby-lint/definitions/rails/active_record.rb on lines 3469..3542
lib/ruby-lint/definitions/rails/active_record.rb on lines 9622..9695
lib/ruby-lint/definitions/rails/active_record.rb on lines 11329..11402
lib/ruby-lint/definitions/rails/active_support.rb on lines 715..788
lib/ruby-lint/definitions/rails/rails.rb on lines 1081..1154
lib/ruby-lint/definitions/rails/rails.rb on lines 2143..2216

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

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

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

    klass.define_instance_method('_update_filter') do |method|
      method.define_argument('filter_options')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_view.rb and 16 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/rails/action_controller.rb on lines 512..585
lib/ruby-lint/definitions/rails/action_controller.rb on lines 3114..3187
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 204..277
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 3061..3134
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 437..510
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 979..1052
lib/ruby-lint/definitions/rails/action_view.rb on lines 6953..7026
lib/ruby-lint/definitions/rails/active_model.rb on lines 982..1055
lib/ruby-lint/definitions/rails/active_record.rb on lines 1977..2050
lib/ruby-lint/definitions/rails/active_record.rb on lines 3469..3542
lib/ruby-lint/definitions/rails/active_record.rb on lines 9622..9695
lib/ruby-lint/definitions/rails/active_record.rb on lines 11329..11402
lib/ruby-lint/definitions/rails/active_support.rb on lines 715..788
lib/ruby-lint/definitions/rails/active_support.rb on lines 4891..4964
lib/ruby-lint/definitions/rails/rails.rb on lines 1081..1154
lib/ruby-lint/definitions/rails/rails.rb on lines 2143..2216

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

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

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

    klass.define_instance_method('_update_filter') do |method|
      method.define_argument('filter_options')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_support.rb and 16 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/rails/action_controller.rb on lines 512..585
lib/ruby-lint/definitions/rails/action_controller.rb on lines 3114..3187
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 204..277
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 3061..3134
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 437..510
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 979..1052
lib/ruby-lint/definitions/rails/action_view.rb on lines 5429..5502
lib/ruby-lint/definitions/rails/action_view.rb on lines 6953..7026
lib/ruby-lint/definitions/rails/active_model.rb on lines 982..1055
lib/ruby-lint/definitions/rails/active_record.rb on lines 1977..2050
lib/ruby-lint/definitions/rails/active_record.rb on lines 3469..3542
lib/ruby-lint/definitions/rails/active_record.rb on lines 9622..9695
lib/ruby-lint/definitions/rails/active_record.rb on lines 11329..11402
lib/ruby-lint/definitions/rails/active_support.rb on lines 4891..4964
lib/ruby-lint/definitions/rails/rails.rb on lines 1081..1154
lib/ruby-lint/definitions/rails/rails.rb on lines 2143..2216

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

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

  defs.define_constant('Rails::InfoController::Callback') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('_update_filter') do |method|
      method.define_argument('filter_options')
Severity: Major
Found in lib/ruby-lint/definitions/rails/rails.rb and 16 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/rails/action_controller.rb on lines 512..585
lib/ruby-lint/definitions/rails/action_controller.rb on lines 3114..3187
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 204..277
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 3061..3134
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 437..510
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 979..1052
lib/ruby-lint/definitions/rails/action_view.rb on lines 5429..5502
lib/ruby-lint/definitions/rails/action_view.rb on lines 6953..7026
lib/ruby-lint/definitions/rails/active_model.rb on lines 982..1055
lib/ruby-lint/definitions/rails/active_record.rb on lines 1977..2050
lib/ruby-lint/definitions/rails/active_record.rb on lines 3469..3542
lib/ruby-lint/definitions/rails/active_record.rb on lines 9622..9695
lib/ruby-lint/definitions/rails/active_record.rb on lines 11329..11402
lib/ruby-lint/definitions/rails/active_support.rb on lines 715..788
lib/ruby-lint/definitions/rails/active_support.rb on lines 4891..4964
lib/ruby-lint/definitions/rails/rails.rb on lines 2143..2216

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

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

  defs.define_constant('ActionController::Base::Callback') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('_update_filter') do |method|
      method.define_argument('filter_options')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_controller.rb and 16 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/rails/action_controller.rb on lines 3114..3187
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 204..277
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 3061..3134
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 437..510
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 979..1052
lib/ruby-lint/definitions/rails/action_view.rb on lines 5429..5502
lib/ruby-lint/definitions/rails/action_view.rb on lines 6953..7026
lib/ruby-lint/definitions/rails/active_model.rb on lines 982..1055
lib/ruby-lint/definitions/rails/active_record.rb on lines 1977..2050
lib/ruby-lint/definitions/rails/active_record.rb on lines 3469..3542
lib/ruby-lint/definitions/rails/active_record.rb on lines 9622..9695
lib/ruby-lint/definitions/rails/active_record.rb on lines 11329..11402
lib/ruby-lint/definitions/rails/active_support.rb on lines 715..788
lib/ruby-lint/definitions/rails/active_support.rb on lines 4891..4964
lib/ruby-lint/definitions/rails/rails.rb on lines 1081..1154
lib/ruby-lint/definitions/rails/rails.rb on lines 2143..2216

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

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

  defs.define_constant('ActionController::TestCase::Callback') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('_update_filter') do |method|
      method.define_argument('filter_options')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_controller.rb and 16 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/rails/action_controller.rb on lines 512..585
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 204..277
lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 3061..3134
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 437..510
lib/ruby-lint/definitions/rails/action_mailer.rb on lines 979..1052
lib/ruby-lint/definitions/rails/action_view.rb on lines 5429..5502
lib/ruby-lint/definitions/rails/action_view.rb on lines 6953..7026
lib/ruby-lint/definitions/rails/active_model.rb on lines 982..1055
lib/ruby-lint/definitions/rails/active_record.rb on lines 1977..2050
lib/ruby-lint/definitions/rails/active_record.rb on lines 3469..3542
lib/ruby-lint/definitions/rails/active_record.rb on lines 9622..9695
lib/ruby-lint/definitions/rails/active_record.rb on lines 11329..11402
lib/ruby-lint/definitions/rails/active_support.rb on lines 715..788
lib/ruby-lint/definitions/rails/active_support.rb on lines 4891..4964
lib/ruby-lint/definitions/rails/rails.rb on lines 1081..1154
lib/ruby-lint/definitions/rails/rails.rb on lines 2143..2216

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

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

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

    klass.define_instance_method('action_name') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_view.rb and 2 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/rails/action_view.rb on lines 670..734
lib/ruby-lint/definitions/rails/action_view.rb on lines 5586..5650

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

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

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

    klass.define_instance_method('action_name') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_view.rb and 2 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/rails/action_view.rb on lines 670..734
lib/ruby-lint/definitions/rails/action_view.rb on lines 2467..2531

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

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

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

    klass.define_instance_method('action_name') do |method|
      method.define_rest_argument('args')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_view.rb and 2 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/rails/action_view.rb on lines 2467..2531
lib/ruby-lint/definitions/rails/action_view.rb on lines 5586..5650

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

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

File unixsocket.rb has 358 lines of code (exceeds 250 allowed). Consider refactoring.
Open

RubyLint.registry.register('UNIXSocket') do |defs|
  defs.define_constant('UNIXSocket') do |klass|
    klass.inherits(defs.constant_proxy('BasicSocket', RubyLint.registry))
    klass.inherits(defs.constant_proxy('IO::TransferIO', RubyLint.registry))

Severity: Minor
Found in lib/ruby-lint/definitions/core/unixsocket.rb - About 4 hrs to fix

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

      defs.define_constant('DRbObject') 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_object.rb and 1 other location - About 4 hrs to fix
    lib/ruby-lint/definitions/core/drb.rb on lines 190..256

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

    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('DRb::DRbObject') 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 1 other location - About 4 hrs to fix
    lib/ruby-lint/definitions/core/drb_object.rb on lines 7..73

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

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

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

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

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

    Refactorings

    Further Reading

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

      defs.define_constant('RSpec::Core::Notifications::CustomNotification::Passwd') do |klass|
        klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))
    
        klass.define_method('[]') do |method|
          method.define_rest_argument('arg1')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/rspec.rb and 22 other locations - About 4 hrs to fix
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2339..2413
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2623..2697
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2857..2931
    lib/ruby-lint/definitions/gems/rspec.rb on lines 3922..3996
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4090..4164
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4261..4335
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4429..4503
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4617..4691
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4951..5025
    lib/ruby-lint/definitions/gems/rspec.rb on lines 5624..5698
    lib/ruby-lint/definitions/gems/rspec.rb on lines 5804..5878
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6032..6106
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6214..6288
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6396..6470
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6575..6649
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6740..6814
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6957..7031
    lib/ruby-lint/definitions/gems/rspec.rb on lines 7132..7206
    lib/ruby-lint/definitions/gems/rspec.rb on lines 7320..7394
    lib/ruby-lint/definitions/gems/rspec.rb on lines 7551..7625
    lib/ruby-lint/definitions/gems/rspec.rb on lines 8259..8333
    lib/ruby-lint/definitions/gems/rspec.rb on lines 8634..8708

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

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

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

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

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

    Refactorings

    Further Reading

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

      defs.define_constant('RSpec::Core::Source::Location::Passwd') do |klass|
        klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))
    
        klass.define_method('[]') do |method|
          method.define_rest_argument('arg1')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/rspec.rb and 22 other locations - About 4 hrs to fix
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2339..2413
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2623..2697
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2857..2931
    lib/ruby-lint/definitions/gems/rspec.rb on lines 3922..3996
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4090..4164
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4261..4335
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4429..4503
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4617..4691
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4951..5025
    lib/ruby-lint/definitions/gems/rspec.rb on lines 5426..5500
    lib/ruby-lint/definitions/gems/rspec.rb on lines 5624..5698
    lib/ruby-lint/definitions/gems/rspec.rb on lines 5804..5878
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6032..6106
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6214..6288
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6396..6470
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6575..6649
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6740..6814
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6957..7031
    lib/ruby-lint/definitions/gems/rspec.rb on lines 7132..7206
    lib/ruby-lint/definitions/gems/rspec.rb on lines 7320..7394
    lib/ruby-lint/definitions/gems/rspec.rb on lines 7551..7625
    lib/ruby-lint/definitions/gems/rspec.rb on lines 8259..8333

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

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

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

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

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

    Refactorings

    Further Reading

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

      defs.define_constant('RSpec::Core::Notifications::GroupNotification::Passwd') do |klass|
        klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))
    
        klass.define_method('[]') do |method|
          method.define_rest_argument('arg1')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/rspec.rb and 22 other locations - About 4 hrs to fix
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2339..2413
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2623..2697
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2857..2931
    lib/ruby-lint/definitions/gems/rspec.rb on lines 3922..3996
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4090..4164
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4261..4335
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4429..4503
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4617..4691
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4951..5025
    lib/ruby-lint/definitions/gems/rspec.rb on lines 5426..5500
    lib/ruby-lint/definitions/gems/rspec.rb on lines 5624..5698
    lib/ruby-lint/definitions/gems/rspec.rb on lines 5804..5878
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6032..6106
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6396..6470
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6575..6649
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6740..6814
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6957..7031
    lib/ruby-lint/definitions/gems/rspec.rb on lines 7132..7206
    lib/ruby-lint/definitions/gems/rspec.rb on lines 7320..7394
    lib/ruby-lint/definitions/gems/rspec.rb on lines 7551..7625
    lib/ruby-lint/definitions/gems/rspec.rb on lines 8259..8333
    lib/ruby-lint/definitions/gems/rspec.rb on lines 8634..8708

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

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

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

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

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

    Refactorings

    Further Reading

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

      defs.define_constant('RSpec::Core::Hooks::AfterContextHook::Passwd') do |klass|
        klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))
    
        klass.define_method('[]') do |method|
          method.define_rest_argument('arg1')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/rspec.rb and 22 other locations - About 4 hrs to fix
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2339..2413
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2623..2697
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2857..2931
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4090..4164
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4261..4335
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4429..4503
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4617..4691
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4951..5025
    lib/ruby-lint/definitions/gems/rspec.rb on lines 5426..5500
    lib/ruby-lint/definitions/gems/rspec.rb on lines 5624..5698
    lib/ruby-lint/definitions/gems/rspec.rb on lines 5804..5878
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6032..6106
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6214..6288
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6396..6470
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6575..6649
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6740..6814
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6957..7031
    lib/ruby-lint/definitions/gems/rspec.rb on lines 7132..7206
    lib/ruby-lint/definitions/gems/rspec.rb on lines 7320..7394
    lib/ruby-lint/definitions/gems/rspec.rb on lines 7551..7625
    lib/ruby-lint/definitions/gems/rspec.rb on lines 8259..8333
    lib/ruby-lint/definitions/gems/rspec.rb on lines 8634..8708

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

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

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

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

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

    Refactorings

    Further Reading

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

      defs.define_constant('RSpec::Core::Notifications::ExampleNotification::Passwd') do |klass|
        klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))
    
        klass.define_method('[]') do |method|
          method.define_rest_argument('arg1')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/rspec.rb and 22 other locations - About 4 hrs to fix
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2339..2413
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2623..2697
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2857..2931
    lib/ruby-lint/definitions/gems/rspec.rb on lines 3922..3996
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4090..4164
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4261..4335
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4429..4503
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4617..4691
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4951..5025
    lib/ruby-lint/definitions/gems/rspec.rb on lines 5426..5500
    lib/ruby-lint/definitions/gems/rspec.rb on lines 5624..5698
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6032..6106
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6214..6288
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6396..6470
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6575..6649
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6740..6814
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6957..7031
    lib/ruby-lint/definitions/gems/rspec.rb on lines 7132..7206
    lib/ruby-lint/definitions/gems/rspec.rb on lines 7320..7394
    lib/ruby-lint/definitions/gems/rspec.rb on lines 7551..7625
    lib/ruby-lint/definitions/gems/rspec.rb on lines 8259..8333
    lib/ruby-lint/definitions/gems/rspec.rb on lines 8634..8708

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

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

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

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

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

    Refactorings

    Further Reading

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

      defs.define_constant('RSpec::Core::Notifications::PendingExampleFixedNotification::Passwd') do |klass|
        klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))
    
        klass.define_method('[]') do |method|
          method.define_rest_argument('arg1')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/rspec.rb and 22 other locations - About 4 hrs to fix
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2339..2413
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2623..2697
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2857..2931
    lib/ruby-lint/definitions/gems/rspec.rb on lines 3922..3996
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4090..4164
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4261..4335
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4429..4503
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4617..4691
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4951..5025
    lib/ruby-lint/definitions/gems/rspec.rb on lines 5426..5500
    lib/ruby-lint/definitions/gems/rspec.rb on lines 5624..5698
    lib/ruby-lint/definitions/gems/rspec.rb on lines 5804..5878
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6032..6106
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6214..6288
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6396..6470
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6575..6649
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6957..7031
    lib/ruby-lint/definitions/gems/rspec.rb on lines 7132..7206
    lib/ruby-lint/definitions/gems/rspec.rb on lines 7320..7394
    lib/ruby-lint/definitions/gems/rspec.rb on lines 7551..7625
    lib/ruby-lint/definitions/gems/rspec.rb on lines 8259..8333
    lib/ruby-lint/definitions/gems/rspec.rb on lines 8634..8708

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

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

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

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

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

    Refactorings

    Further Reading

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

      defs.define_constant('RSpec::Core::Notifications::MessageNotification::Passwd') do |klass|
        klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))
    
        klass.define_method('[]') do |method|
          method.define_rest_argument('arg1')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/rspec.rb and 22 other locations - About 4 hrs to fix
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2339..2413
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2623..2697
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2857..2931
    lib/ruby-lint/definitions/gems/rspec.rb on lines 3922..3996
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4090..4164
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4261..4335
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4429..4503
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4617..4691
    lib/ruby-lint/definitions/gems/rspec.rb on lines 4951..5025
    lib/ruby-lint/definitions/gems/rspec.rb on lines 5426..5500
    lib/ruby-lint/definitions/gems/rspec.rb on lines 5624..5698
    lib/ruby-lint/definitions/gems/rspec.rb on lines 5804..5878
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6032..6106
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6214..6288
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6575..6649
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6740..6814
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6957..7031
    lib/ruby-lint/definitions/gems/rspec.rb on lines 7132..7206
    lib/ruby-lint/definitions/gems/rspec.rb on lines 7320..7394
    lib/ruby-lint/definitions/gems/rspec.rb on lines 7551..7625
    lib/ruby-lint/definitions/gems/rspec.rb on lines 8259..8333
    lib/ruby-lint/definitions/gems/rspec.rb on lines 8634..8708

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

    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