YorickPeterse/ruby-lint

View on GitHub

Showing 2,162 of 2,162 total issues

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

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

    klass.define_method('allocate')

Severity: Major
Found in lib/ruby-lint/definitions/core/tcpserver.rb and 8 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/core/basic_socket.rb on lines 323..402
lib/ruby-lint/definitions/core/file.rb on lines 759..838
lib/ruby-lint/definitions/core/ipsocket.rb on lines 277..356
lib/ruby-lint/definitions/core/socket.rb on lines 2279..2358
lib/ruby-lint/definitions/core/tcpsocket.rb on lines 278..357
lib/ruby-lint/definitions/core/udpsocket.rb on lines 279..358
lib/ruby-lint/definitions/core/unixserver.rb on lines 263..342
lib/ruby-lint/definitions/core/unixsocket.rb on lines 292..371

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

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

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

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

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

Refactorings

Further Reading

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

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

    klass.define_method('allocate')

Severity: Major
Found in lib/ruby-lint/definitions/core/unixserver.rb and 8 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/core/basic_socket.rb on lines 323..402
lib/ruby-lint/definitions/core/file.rb on lines 759..838
lib/ruby-lint/definitions/core/ipsocket.rb on lines 277..356
lib/ruby-lint/definitions/core/socket.rb on lines 2279..2358
lib/ruby-lint/definitions/core/tcpserver.rb on lines 264..343
lib/ruby-lint/definitions/core/tcpsocket.rb on lines 278..357
lib/ruby-lint/definitions/core/udpsocket.rb on lines 279..358
lib/ruby-lint/definitions/core/unixsocket.rb on lines 292..371

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

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

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

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

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

Refactorings

Further Reading

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

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

    klass.define_method('allocate')

Severity: Major
Found in lib/ruby-lint/definitions/core/basic_socket.rb and 8 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/core/file.rb on lines 759..838
lib/ruby-lint/definitions/core/ipsocket.rb on lines 277..356
lib/ruby-lint/definitions/core/socket.rb on lines 2279..2358
lib/ruby-lint/definitions/core/tcpserver.rb on lines 264..343
lib/ruby-lint/definitions/core/tcpsocket.rb on lines 278..357
lib/ruby-lint/definitions/core/udpsocket.rb on lines 279..358
lib/ruby-lint/definitions/core/unixserver.rb on lines 263..342
lib/ruby-lint/definitions/core/unixsocket.rb on lines 292..371

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

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

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

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

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

Refactorings

Further Reading

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

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

    klass.define_method('allocate')

Severity: Major
Found in lib/ruby-lint/definitions/core/file.rb and 8 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/core/basic_socket.rb on lines 323..402
lib/ruby-lint/definitions/core/ipsocket.rb on lines 277..356
lib/ruby-lint/definitions/core/socket.rb on lines 2279..2358
lib/ruby-lint/definitions/core/tcpserver.rb on lines 264..343
lib/ruby-lint/definitions/core/tcpsocket.rb on lines 278..357
lib/ruby-lint/definitions/core/udpsocket.rb on lines 279..358
lib/ruby-lint/definitions/core/unixserver.rb on lines 263..342
lib/ruby-lint/definitions/core/unixsocket.rb on lines 292..371

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

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

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

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

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

Refactorings

Further Reading

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

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

    klass.define_method('allocate')

Severity: Major
Found in lib/ruby-lint/definitions/core/ipsocket.rb and 8 other locations - About 4 hrs to fix
lib/ruby-lint/definitions/core/basic_socket.rb on lines 323..402
lib/ruby-lint/definitions/core/file.rb on lines 759..838
lib/ruby-lint/definitions/core/socket.rb on lines 2279..2358
lib/ruby-lint/definitions/core/tcpserver.rb on lines 264..343
lib/ruby-lint/definitions/core/tcpsocket.rb on lines 278..357
lib/ruby-lint/definitions/core/udpsocket.rb on lines 279..358
lib/ruby-lint/definitions/core/unixserver.rb on lines 263..342
lib/ruby-lint/definitions/core/unixsocket.rb on lines 292..371

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

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::IncidentReporter') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    klass.inherits(defs.constant_proxy('Celluloid::Notifications', RubyLint.registry))
    klass.inherits(defs.constant_proxy('Celluloid::InstanceMethods', RubyLint.registry))
    klass.inherits(defs.constant_proxy('Celluloid', RubyLint.registry))
Severity: Major
Found in lib/ruby-lint/definitions/gems/celluloid.rb and 1 other location - About 4 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 1192..1252

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

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::IncidentReporter') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    klass.inherits(defs.constant_proxy('Celluloid::Notifications', RubyLint.registry))
    klass.inherits(defs.constant_proxy('Celluloid::InstanceMethods', RubyLint.registry))
    klass.inherits(defs.constant_proxy('Celluloid', RubyLint.registry))
Severity: Major
Found in lib/ruby-lint/definitions/gems/celluloid.rb and 1 other location - About 4 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 2448..2508

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

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('Test::Unit::Assertions::AssertionMessage') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    klass.inherits(defs.constant_proxy('Test::Unit::Util::BacktraceFilter', RubyLint.registry))

    klass.define_method('convert') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/gems/test.rb and 1 other location - About 4 hrs to fix
lib/ruby-lint/definitions/gems/test.rb on lines 2064..2133

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

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('Test::Unit::TestCase::AssertionMessage') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    klass.inherits(defs.constant_proxy('Test::Unit::Util::BacktraceFilter', RubyLint.registry))

    klass.define_method('convert') do |method|
Severity: Major
Found in lib/ruby-lint/definitions/gems/test.rb and 1 other location - About 4 hrs to fix
lib/ruby-lint/definitions/gems/test.rb on lines 492..561

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

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 hash.rb has 363 lines of code (exceeds 250 allowed). Consider refactoring.
Open

RubyLint.registry.register('Hash') do |defs|
  defs.define_constant('Hash') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    klass.inherits(defs.constant_proxy('JSON::Ext::Generator::GeneratorMethods::Hash', RubyLint.registry))
    klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))
Severity: Minor
Found in lib/ruby-lint/definitions/core/hash.rb - About 4 hrs to fix

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

      defs.define_constant('ActiveRecord::SchemaMigration::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_record.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 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('ActionDispatch::Reloader::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_dispatch.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_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('ActionMailer::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_mailer.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 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('ActiveRecord::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/active_record.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 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('ActiveRecord::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_record.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_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('ActionView::TestCase::TestController::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 5429..5502
    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('ActionDispatch::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/action_dispatch.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 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('ActiveRecord::ConnectionAdapters::AbstractAdapter::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_record.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 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('ActionMailer::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_mailer.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_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('ActiveModel::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_model.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_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

    Severity
    Category
    Status
    Source
    Language