YorickPeterse/ruby-lint

View on GitHub

Showing 2,162 of 2,162 total issues

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

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

    klass.define_method('current')

Severity: Major
Found in lib/ruby-lint/definitions/gems/celluloid.rb and 1 other location - About 3 hrs to fix
lib/ruby-lint/definitions/gems/celluloid.rb on lines 4390..4450

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

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

    klass.define_method('build')

Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.rb and 1 other location - About 3 hrs to fix
lib/ruby-lint/definitions/gems/rspec.rb on lines 1984..2039

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

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

    klass.define_method('build')

Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.rb and 1 other location - About 3 hrs to fix
lib/ruby-lint/definitions/gems/rspec.rb on lines 2093..2148

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

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

RubyLint.registry.register('Prime') do |defs|
  defs.define_constant('Prime') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))

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

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

      defs.define_constant('Nokogiri::HTML::ElementDescription::Desc') do |klass|
        klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))
    
        klass.define_method('[]') do |method|
          method.define_rest_argument('args')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/nokogiri.rb and 2 other locations - About 3 hrs to fix
    lib/ruby-lint/definitions/gems/nokogiri.rb on lines 2040..2107
    lib/ruby-lint/definitions/gems/nokogiri.rb on lines 6228..6295

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

    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('Nokogiri::XML::Notation::HTMLElementDescription') do |klass|
        klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))
    
        klass.define_method('[]') do |method|
          method.define_rest_argument('args')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/nokogiri.rb and 2 other locations - About 3 hrs to fix
    lib/ruby-lint/definitions/gems/nokogiri.rb on lines 1523..1590
    lib/ruby-lint/definitions/gems/nokogiri.rb on lines 2040..2107

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

    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('Nokogiri::HTML::EntityDescription::HTMLElementDescription') do |klass|
        klass.inherits(defs.constant_proxy('Struct', RubyLint.registry))
    
        klass.define_method('[]') do |method|
          method.define_rest_argument('args')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/nokogiri.rb and 2 other locations - About 3 hrs to fix
    lib/ruby-lint/definitions/gems/nokogiri.rb on lines 1523..1590
    lib/ruby-lint/definitions/gems/nokogiri.rb on lines 6228..6295

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

    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::StackDump::ThreadState::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/celluloid.rb and 1 other location - About 3 hrs to fix
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 3906..3962

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

    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::StackDump::TaskState::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/celluloid.rb and 1 other location - About 3 hrs to fix
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 4054..4110

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

    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::ActorProxy') do |klass|
        klass.inherits(defs.constant_proxy('Celluloid::SyncProxy', RubyLint.registry))
    
        klass.define_instance_method('__class__')
    
    
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/celluloid.rb and 1 other location - About 3 hrs to fix
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 1876..1923

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

    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::ActorProxy') do |klass|
        klass.inherits(defs.constant_proxy('Celluloid::SyncProxy', RubyLint.registry))
    
        klass.define_instance_method('__class__')
    
    
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/celluloid.rb and 1 other location - About 3 hrs to fix
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 423..470

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

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

      defs.define_constant('ActionDispatch::Callbacks::ClassMethods') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('__callback_runner_name') do |method|
          method.define_argument('kind')
    Severity: Major
    Found in lib/ruby-lint/definitions/rails/action_dispatch.rb and 6 other locations - About 3 hrs to fix
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 3163..3208
    lib/ruby-lint/definitions/rails/active_model.rb on lines 1084..1129
    lib/ruby-lint/definitions/rails/active_record.rb on lines 3571..3616
    lib/ruby-lint/definitions/rails/active_record.rb on lines 11431..11476
    lib/ruby-lint/definitions/rails/active_support.rb on lines 792..837
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4993..5038

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

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

      defs.define_constant('ActiveRecord::ConnectionAdapters::AbstractAdapter::ClassMethods') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('__callback_runner_name') do |method|
          method.define_argument('kind')
    Severity: Major
    Found in lib/ruby-lint/definitions/rails/active_record.rb and 6 other locations - About 3 hrs to fix
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 306..351
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 3163..3208
    lib/ruby-lint/definitions/rails/active_model.rb on lines 1084..1129
    lib/ruby-lint/definitions/rails/active_record.rb on lines 11431..11476
    lib/ruby-lint/definitions/rails/active_support.rb on lines 792..837
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4993..5038

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

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

      defs.define_constant('ActiveSupport::Callbacks::ClassMethods') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('__callback_runner_name') do |method|
          method.define_argument('kind')
    Severity: Major
    Found in lib/ruby-lint/definitions/rails/active_support.rb and 6 other locations - About 3 hrs to fix
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 306..351
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 3163..3208
    lib/ruby-lint/definitions/rails/active_model.rb on lines 1084..1129
    lib/ruby-lint/definitions/rails/active_record.rb on lines 3571..3616
    lib/ruby-lint/definitions/rails/active_record.rb on lines 11431..11476
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4993..5038

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

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

      defs.define_constant('ActiveSupport::TestCase::ClassMethods') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('__callback_runner_name') do |method|
          method.define_argument('kind')
    Severity: Major
    Found in lib/ruby-lint/definitions/rails/active_support.rb and 6 other locations - About 3 hrs to fix
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 306..351
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 3163..3208
    lib/ruby-lint/definitions/rails/active_model.rb on lines 1084..1129
    lib/ruby-lint/definitions/rails/active_record.rb on lines 3571..3616
    lib/ruby-lint/definitions/rails/active_record.rb on lines 11431..11476
    lib/ruby-lint/definitions/rails/active_support.rb on lines 792..837

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

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

      defs.define_constant('ActionDispatch::Reloader::ClassMethods') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('__callback_runner_name') do |method|
          method.define_argument('kind')
    Severity: Major
    Found in lib/ruby-lint/definitions/rails/action_dispatch.rb and 6 other locations - About 3 hrs to fix
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 306..351
    lib/ruby-lint/definitions/rails/active_model.rb on lines 1084..1129
    lib/ruby-lint/definitions/rails/active_record.rb on lines 3571..3616
    lib/ruby-lint/definitions/rails/active_record.rb on lines 11431..11476
    lib/ruby-lint/definitions/rails/active_support.rb on lines 792..837
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4993..5038

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

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

      defs.define_constant('ActiveRecord::TestCase::ClassMethods') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('__callback_runner_name') do |method|
          method.define_argument('kind')
    Severity: Major
    Found in lib/ruby-lint/definitions/rails/active_record.rb and 6 other locations - About 3 hrs to fix
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 306..351
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 3163..3208
    lib/ruby-lint/definitions/rails/active_model.rb on lines 1084..1129
    lib/ruby-lint/definitions/rails/active_record.rb on lines 3571..3616
    lib/ruby-lint/definitions/rails/active_support.rb on lines 792..837
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4993..5038

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

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

      defs.define_constant('ActiveModel::TestCase::ClassMethods') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('__callback_runner_name') do |method|
          method.define_argument('kind')
    Severity: Major
    Found in lib/ruby-lint/definitions/rails/active_model.rb and 6 other locations - About 3 hrs to fix
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 306..351
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 3163..3208
    lib/ruby-lint/definitions/rails/active_record.rb on lines 3571..3616
    lib/ruby-lint/definitions/rails/active_record.rb on lines 11431..11476
    lib/ruby-lint/definitions/rails/active_support.rb on lines 792..837
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4993..5038

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

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

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

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

        defs.define_constant('JSON::State') do |klass|
          klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
      
          klass.define_method('allocate')
      
      
      Severity: Major
      Found in lib/ruby-lint/definitions/core/json.rb and 2 other locations - About 3 hrs to fix
      lib/ruby-lint/definitions/core/json.rb on lines 218..285
      lib/ruby-lint/definitions/core/open_ssl.rb on lines 2204..2271

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

      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