YorickPeterse/ruby-lint

View on GitHub
lib/ruby-lint/definitions/gems/test.rb

Summary

Maintainability
F
1 wk
Test Coverage

File test.rb has 1856 lines of code (exceeds 250 allowed). Consider refactoring.
Open

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

  end
Severity: Major
Found in lib/ruby-lint/definitions/gems/test.rb - About 5 days to fix

    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

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

      defs.define_constant('Test::Unit::TestCase::Checker') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_method('available_priorities')
    
    
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 1 other location - About 3 hrs to fix
    lib/ruby-lint/definitions/gems/test.rb on lines 1866..1915

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

    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::Priority::Checker') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_method('available_priorities')
    
    
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 1 other location - About 3 hrs to fix
    lib/ruby-lint/definitions/gems/test.rb on lines 2142..2191

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

    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('Test::Unit::Omission') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
        klass.inherits(defs.constant_proxy('Test::Unit::Util::BacktraceFilter', RubyLint.registry))
    
        klass.define_instance_method('critical?')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 2 other locations - About 1 hr to fix
    lib/ruby-lint/definitions/gems/test.rb on lines 1624..1655
    lib/ruby-lint/definitions/gems/test.rb on lines 1773..1804

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

    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('Test::Unit::Pending') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
        klass.inherits(defs.constant_proxy('Test::Unit::Util::BacktraceFilter', RubyLint.registry))
    
        klass.define_instance_method('critical?')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 2 other locations - About 1 hr to fix
    lib/ruby-lint/definitions/gems/test.rb on lines 1624..1655
    lib/ruby-lint/definitions/gems/test.rb on lines 1696..1727

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

    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('Test::Unit::Notification') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
        klass.inherits(defs.constant_proxy('Test::Unit::Util::BacktraceFilter', RubyLint.registry))
    
        klass.define_instance_method('critical?')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 2 other locations - About 1 hr to fix
    lib/ruby-lint/definitions/gems/test.rb on lines 1696..1727
    lib/ruby-lint/definitions/gems/test.rb on lines 1773..1804

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

    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::Fixture::Fixture') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('[]') do |method|
          method.define_argument('type')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 1 other location - About 1 hr to fix
    lib/ruby-lint/definitions/gems/test.rb on lines 2222..2247

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

    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::Fixture') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('[]') do |method|
          method.define_argument('type')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 1 other location - About 1 hr to fix
    lib/ruby-lint/definitions/gems/test.rb on lines 1545..1570

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

    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::HookPoint') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('after_append_callbacks')
    
    
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 1 other location - About 1 hr to fix
    lib/ruby-lint/definitions/gems/test.rb on lines 1573..1596

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

    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::Fixture::HookPoint') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('after_append_callbacks')
    
    
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 1 other location - About 1 hr to fix
    lib/ruby-lint/definitions/gems/test.rb on lines 2250..2273

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

    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('Test::Unit::Attribute::StringifyKeyHash') do |klass|
        klass.inherits(defs.constant_proxy('Hash', RubyLint.registry))
    
        klass.define_method('stringify') do |method|
          method.define_argument('object')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 2 other locations - About 1 hr to fix
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 6555..6572
    lib/ruby-lint/definitions/gems/test.rb on lines 2345..2362

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

    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('Test::Unit::TestCase::StringifyKeyHash') do |klass|
        klass.inherits(defs.constant_proxy('Hash', RubyLint.registry))
    
        klass.define_method('stringify') do |method|
          method.define_argument('object')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 2 other locations - About 1 hr to fix
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 6555..6572
    lib/ruby-lint/definitions/gems/test.rb on lines 850..867

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

    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::AttributeMatcher') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('initialize') do |method|
          method.define_argument('test')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 1 other location - About 1 hr to fix
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2530..2545

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

    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('Test::Unit::TestCase::AssertExceptionHelper') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('expected?') do |method|
          method.define_argument('actual_exception')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 2 other locations - About 55 mins to fix
    lib/ruby-lint/definitions/gems/test.rb on lines 454..468
    lib/ruby-lint/definitions/rails/action_view.rb on lines 2032..2046

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

    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('Test::Unit::Assertions::AssertExceptionHelper') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('expected?') do |method|
          method.define_argument('actual_exception')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 2 other locations - About 55 mins to fix
    lib/ruby-lint/definitions/gems/test.rb on lines 2046..2060
    lib/ruby-lint/definitions/rails/action_view.rb on lines 2032..2046

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

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

      defs.define_constant('Test::Unit::TestCaseNotificationSupport') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_method('included') do |method|
          method.define_argument('base')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 5 other locations - About 35 mins to fix
    lib/ruby-lint/definitions/gems/test.rb on lines 1490..1500
    lib/ruby-lint/definitions/gems/tree.rb on lines 160..170
    lib/ruby-lint/definitions/rails/active_model.rb on lines 1323..1333
    lib/ruby-lint/definitions/rails/active_record.rb on lines 2396..2406
    lib/ruby-lint/definitions/rails/active_record.rb on lines 10041..10051

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

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

      defs.define_constant('Test::Unit::ExceptionHandler::ClassMethods') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('exception_handler') do |method|
          method.define_rest_argument('method_name_or_handlers')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 3 other locations - About 35 mins to fix
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 2990..3001
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 3759..3770
    lib/ruby-lint/definitions/gems/lib_xml.rb on lines 4564..4575

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

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

      defs.define_constant('Test::Unit::FailureHandler') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_method('included') do |method|
          method.define_argument('base')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 5 other locations - About 35 mins to fix
    lib/ruby-lint/definitions/gems/test.rb on lines 2393..2403
    lib/ruby-lint/definitions/gems/tree.rb on lines 160..170
    lib/ruby-lint/definitions/rails/active_model.rb on lines 1323..1333
    lib/ruby-lint/definitions/rails/active_record.rb on lines 2396..2406
    lib/ruby-lint/definitions/rails/active_record.rb on lines 10041..10051

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

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

      defs.define_constant('Test::Unit::Assertions::AssertionMessage::MaybeContainer') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('initialize') do |method|
          method.define_argument('value')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 7 other locations - About 35 mins to fix
    lib/ruby-lint/definitions/core/open_uri.rb on lines 60..70
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 23..33
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 2826..2836
    lib/ruby-lint/definitions/rails/action_view.rb on lines 7423..7433
    lib/ruby-lint/definitions/rails/active_record.rb on lines 10868..10878
    lib/ruby-lint/definitions/rails/active_support.rb on lines 1467..1477
    lib/ruby-lint/definitions/rails/active_support.rb on lines 5597..5607

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

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

      defs.define_constant('Test::Unit::TestCasePendingSupport') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_method('included') do |method|
          method.define_argument('base')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 13 other locations - About 30 mins to fix
    lib/ruby-lint/definitions/gems/nokogiri.rb on lines 54..63
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2770..2779
    lib/ruby-lint/definitions/rails/action_view.rb on lines 1742..1751
    lib/ruby-lint/definitions/rails/action_view.rb on lines 3297..3306
    lib/ruby-lint/definitions/rails/action_view.rb on lines 6677..6686
    lib/ruby-lint/definitions/rails/active_model.rb on lines 890..899
    lib/ruby-lint/definitions/rails/active_model.rb on lines 903..912
    lib/ruby-lint/definitions/rails/active_record.rb on lines 59..68
    lib/ruby-lint/definitions/rails/active_record.rb on lines 5509..5518
    lib/ruby-lint/definitions/rails/active_record.rb on lines 8662..8671
    lib/ruby-lint/definitions/rails/active_record.rb on lines 10805..10814
    lib/ruby-lint/definitions/rails/active_support.rb on lines 5103..5112
    lib/ruby-lint/definitions/rails/sprockets.rb on lines 1693..1702

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

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

      defs.define_constant('Test::Unit::Data::ClassMethods') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('data') do |method|
          method.define_rest_argument('arguments')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 11 other locations - About 30 mins to fix
    lib/ruby-lint/definitions/core/open_uri.rb on lines 143..152
    lib/ruby-lint/definitions/gems/devise.rb on lines 806..815
    lib/ruby-lint/definitions/gems/rspec.rb on lines 157..166
    lib/ruby-lint/definitions/gems/rspec.rb on lines 1892..1901
    lib/ruby-lint/definitions/gems/rspec.rb on lines 5157..5166
    lib/ruby-lint/definitions/gems/sinatra.rb on lines 225..234
    lib/ruby-lint/definitions/gems/sinatra.rb on lines 1081..1090
    lib/ruby-lint/definitions/gems/test.rb on lines 2194..2203
    lib/ruby-lint/definitions/rails/active_model.rb on lines 872..881
    lib/ruby-lint/definitions/rails/active_support.rb on lines 143..152
    lib/ruby-lint/definitions/rails/active_support.rb on lines 5116..5125

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

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

      defs.define_constant('Test::Unit::TestCase::ClassMethods') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('data') do |method|
          method.define_rest_argument('arguments')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 11 other locations - About 30 mins to fix
    lib/ruby-lint/definitions/core/open_uri.rb on lines 143..152
    lib/ruby-lint/definitions/gems/devise.rb on lines 806..815
    lib/ruby-lint/definitions/gems/rspec.rb on lines 157..166
    lib/ruby-lint/definitions/gems/rspec.rb on lines 1892..1901
    lib/ruby-lint/definitions/gems/rspec.rb on lines 5157..5166
    lib/ruby-lint/definitions/gems/sinatra.rb on lines 225..234
    lib/ruby-lint/definitions/gems/sinatra.rb on lines 1081..1090
    lib/ruby-lint/definitions/gems/test.rb on lines 1159..1168
    lib/ruby-lint/definitions/rails/active_model.rb on lines 872..881
    lib/ruby-lint/definitions/rails/active_support.rb on lines 143..152
    lib/ruby-lint/definitions/rails/active_support.rb on lines 5116..5125

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

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

      defs.define_constant('Test::Unit::Attribute') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_method('included') do |method|
          method.define_argument('base')
    Severity: Minor
    Found in lib/ruby-lint/definitions/gems/test.rb and 3 other locations - About 30 mins to fix
    lib/ruby-lint/definitions/gems/devise.rb on lines 1906..1917
    lib/ruby-lint/definitions/gems/glib.rb on lines 1435..1446
    lib/ruby-lint/definitions/gems/gtk.rb on lines 22355..22366

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

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

      defs.define_constant('Test::Unit::Diff::Differ') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('initialize') do |method|
          method.define_argument('from')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 49 other locations - About 25 mins to fix
    lib/ruby-lint/definitions/gems/gtk.rb on lines 8188..8195
    lib/ruby-lint/definitions/gems/gtk.rb on lines 8199..8206
    lib/ruby-lint/definitions/gems/gtk.rb on lines 8210..8217
    lib/ruby-lint/definitions/gems/gtk.rb on lines 8272..8279
    lib/ruby-lint/definitions/gems/gtk.rb on lines 8283..8290
    lib/ruby-lint/definitions/gems/gtk.rb on lines 8294..8301
    lib/ruby-lint/definitions/gems/gtk.rb on lines 11850..11857
    lib/ruby-lint/definitions/gems/gtk.rb on lines 13119..13126
    lib/ruby-lint/definitions/gems/gtk.rb on lines 22244..22251
    lib/ruby-lint/definitions/gems/gtk.rb on lines 22255..22262
    lib/ruby-lint/definitions/gems/gtk.rb on lines 22271..22278
    lib/ruby-lint/definitions/gems/gtk.rb on lines 22282..22289
    lib/ruby-lint/definitions/gems/gtk.rb on lines 22293..22300
    lib/ruby-lint/definitions/gems/gtk.rb on lines 22304..22311
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 3324..3331
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 3340..3347
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 3356..3363
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 3438..3445
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 3483..3490
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 3548..3555
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 3581..3588
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 3627..3634
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 3661..3668
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 3677..3684
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 3707..3714
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 3809..3816
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 3825..3832
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 3852..3859
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 3883..3890
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 3899..3906
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 3915..3922
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 3931..3938
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 3947..3954
    lib/ruby-lint/definitions/rails/abstract_controller.rb on lines 418..425
    lib/ruby-lint/definitions/rails/active_model.rb on lines 282..289
    lib/ruby-lint/definitions/rails/active_record.rb on lines 5939..5946
    lib/ruby-lint/definitions/rails/active_record.rb on lines 5974..5981
    lib/ruby-lint/definitions/rails/active_record.rb on lines 5985..5992
    lib/ruby-lint/definitions/rails/active_record.rb on lines 5996..6003
    lib/ruby-lint/definitions/rails/active_record.rb on lines 6007..6014
    lib/ruby-lint/definitions/rails/active_record.rb on lines 6018..6025
    lib/ruby-lint/definitions/rails/active_record.rb on lines 6115..6122
    lib/ruby-lint/definitions/rails/active_support.rb on lines 3340..3347
    lib/ruby-lint/definitions/rails/active_support.rb on lines 3541..3548
    lib/ruby-lint/definitions/rails/arel.rb on lines 1460..1467
    lib/ruby-lint/definitions/rails/arel.rb on lines 2487..2494
    lib/ruby-lint/definitions/rails/arel.rb on lines 4270..4277
    lib/ruby-lint/definitions/rails/arel.rb on lines 5562..5569
    lib/ruby-lint/definitions/rails/arel.rb on lines 5627..5634

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

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

      defs.define_constant('Test::Unit::Assertions::ThrowTagExtractor') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('extract_tag')
    
    
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 34 other locations - About 25 mins to fix
    lib/ruby-lint/definitions/core/gem.rb on lines 1282..1290
    lib/ruby-lint/definitions/core/webrick.rb on lines 2190..2198
    lib/ruby-lint/definitions/core/webrick.rb on lines 2222..2230
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 176..184
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 1683..1691
    lib/ruby-lint/definitions/gems/devise.rb on lines 1145..1153
    lib/ruby-lint/definitions/gems/devise.rb on lines 2124..2132
    lib/ruby-lint/definitions/gems/devise.rb on lines 2144..2152
    lib/ruby-lint/definitions/gems/devise.rb on lines 2162..2170
    lib/ruby-lint/definitions/gems/devise.rb on lines 2182..2190
    lib/ruby-lint/definitions/gems/nokogiri.rb on lines 882..890
    lib/ruby-lint/definitions/gems/rspec.rb on lines 200..208
    lib/ruby-lint/definitions/gems/rspec.rb on lines 1935..1943
    lib/ruby-lint/definitions/gems/rspec.rb on lines 3051..3059
    lib/ruby-lint/definitions/gems/rspec.rb on lines 7840..7848
    lib/ruby-lint/definitions/gems/test.rb on lines 2381..2389
    lib/ruby-lint/definitions/gems/test.rb on lines 2585..2593
    lib/ruby-lint/definitions/rails/action_view.rb on lines 3769..3777
    lib/ruby-lint/definitions/rails/action_view.rb on lines 3797..3805
    lib/ruby-lint/definitions/rails/active_record.rb on lines 7031..7039
    lib/ruby-lint/definitions/rails/active_support.rb on lines 1680..1688
    lib/ruby-lint/definitions/rails/active_support.rb on lines 2327..2335
    lib/ruby-lint/definitions/rails/active_support.rb on lines 2742..2750
    lib/ruby-lint/definitions/rails/active_support.rb on lines 2770..2778
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4554..4562
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4582..4590
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4610..4618
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4638..4646
    lib/ruby-lint/definitions/rails/arel.rb on lines 2055..2063
    lib/ruby-lint/definitions/rails/arel.rb on lines 2083..2091
    lib/ruby-lint/definitions/rails/arel.rb on lines 5522..5530
    lib/ruby-lint/definitions/rails/arel.rb on lines 5550..5558
    lib/ruby-lint/definitions/rails/arel.rb on lines 7040..7048
    lib/ruby-lint/definitions/rails/arel.rb on lines 7068..7076

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

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

      defs.define_constant('Test::Unit::TestCase::ThrowTagExtractor') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('extract_tag')
    
    
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 34 other locations - About 25 mins to fix
    lib/ruby-lint/definitions/core/gem.rb on lines 1282..1290
    lib/ruby-lint/definitions/core/webrick.rb on lines 2190..2198
    lib/ruby-lint/definitions/core/webrick.rb on lines 2222..2230
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 176..184
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 1683..1691
    lib/ruby-lint/definitions/gems/devise.rb on lines 1145..1153
    lib/ruby-lint/definitions/gems/devise.rb on lines 2124..2132
    lib/ruby-lint/definitions/gems/devise.rb on lines 2144..2152
    lib/ruby-lint/definitions/gems/devise.rb on lines 2162..2170
    lib/ruby-lint/definitions/gems/devise.rb on lines 2182..2190
    lib/ruby-lint/definitions/gems/nokogiri.rb on lines 882..890
    lib/ruby-lint/definitions/gems/rspec.rb on lines 200..208
    lib/ruby-lint/definitions/gems/rspec.rb on lines 1935..1943
    lib/ruby-lint/definitions/gems/rspec.rb on lines 3051..3059
    lib/ruby-lint/definitions/gems/rspec.rb on lines 7840..7848
    lib/ruby-lint/definitions/gems/test.rb on lines 767..775
    lib/ruby-lint/definitions/gems/test.rb on lines 2585..2593
    lib/ruby-lint/definitions/rails/action_view.rb on lines 3769..3777
    lib/ruby-lint/definitions/rails/action_view.rb on lines 3797..3805
    lib/ruby-lint/definitions/rails/active_record.rb on lines 7031..7039
    lib/ruby-lint/definitions/rails/active_support.rb on lines 1680..1688
    lib/ruby-lint/definitions/rails/active_support.rb on lines 2327..2335
    lib/ruby-lint/definitions/rails/active_support.rb on lines 2742..2750
    lib/ruby-lint/definitions/rails/active_support.rb on lines 2770..2778
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4554..4562
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4582..4590
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4610..4618
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4638..4646
    lib/ruby-lint/definitions/rails/arel.rb on lines 2055..2063
    lib/ruby-lint/definitions/rails/arel.rb on lines 2083..2091
    lib/ruby-lint/definitions/rails/arel.rb on lines 5522..5530
    lib/ruby-lint/definitions/rails/arel.rb on lines 5550..5558
    lib/ruby-lint/definitions/rails/arel.rb on lines 7040..7048
    lib/ruby-lint/definitions/rails/arel.rb on lines 7068..7076

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

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

      defs.define_constant('Test::Unit::TestSuiteCreator') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('create')
    
    
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 34 other locations - About 25 mins to fix
    lib/ruby-lint/definitions/core/gem.rb on lines 1282..1290
    lib/ruby-lint/definitions/core/webrick.rb on lines 2190..2198
    lib/ruby-lint/definitions/core/webrick.rb on lines 2222..2230
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 176..184
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 1683..1691
    lib/ruby-lint/definitions/gems/devise.rb on lines 1145..1153
    lib/ruby-lint/definitions/gems/devise.rb on lines 2124..2132
    lib/ruby-lint/definitions/gems/devise.rb on lines 2144..2152
    lib/ruby-lint/definitions/gems/devise.rb on lines 2162..2170
    lib/ruby-lint/definitions/gems/devise.rb on lines 2182..2190
    lib/ruby-lint/definitions/gems/nokogiri.rb on lines 882..890
    lib/ruby-lint/definitions/gems/rspec.rb on lines 200..208
    lib/ruby-lint/definitions/gems/rspec.rb on lines 1935..1943
    lib/ruby-lint/definitions/gems/rspec.rb on lines 3051..3059
    lib/ruby-lint/definitions/gems/rspec.rb on lines 7840..7848
    lib/ruby-lint/definitions/gems/test.rb on lines 767..775
    lib/ruby-lint/definitions/gems/test.rb on lines 2381..2389
    lib/ruby-lint/definitions/rails/action_view.rb on lines 3769..3777
    lib/ruby-lint/definitions/rails/action_view.rb on lines 3797..3805
    lib/ruby-lint/definitions/rails/active_record.rb on lines 7031..7039
    lib/ruby-lint/definitions/rails/active_support.rb on lines 1680..1688
    lib/ruby-lint/definitions/rails/active_support.rb on lines 2327..2335
    lib/ruby-lint/definitions/rails/active_support.rb on lines 2742..2750
    lib/ruby-lint/definitions/rails/active_support.rb on lines 2770..2778
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4554..4562
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4582..4590
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4610..4618
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4638..4646
    lib/ruby-lint/definitions/rails/arel.rb on lines 2055..2063
    lib/ruby-lint/definitions/rails/arel.rb on lines 2083..2091
    lib/ruby-lint/definitions/rails/arel.rb on lines 5522..5530
    lib/ruby-lint/definitions/rails/arel.rb on lines 5550..5558
    lib/ruby-lint/definitions/rails/arel.rb on lines 7040..7048
    lib/ruby-lint/definitions/rails/arel.rb on lines 7068..7076

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

    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('Test::Unit::Assertions::AssertionMessage::Literal') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('initialize') do |method|
          method.define_argument('value')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 16 other locations - About 25 mins to fix
    lib/ruby-lint/definitions/core/drb.rb on lines 291..300
    lib/ruby-lint/definitions/core/name_error.rb on lines 7..16
    lib/ruby-lint/definitions/core/socket.rb on lines 2967..2976
    lib/ruby-lint/definitions/core/socket.rb on lines 3018..3027
    lib/ruby-lint/definitions/core/socket.rb on lines 3069..3078
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 1534..1543
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 2790..2799
    lib/ruby-lint/definitions/gems/devise.rb on lines 1733..1742
    lib/ruby-lint/definitions/gems/test.rb on lines 593..602
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 1872..1881
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 3422..3431
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 1528..1537
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 1625..1634
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 1643..1652
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 1878..1887
    lib/ruby-lint/definitions/rails/active_record.rb on lines 11653..11662

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

    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('Test::Unit::Assertions::AssertionMessage::DelayedLiteral') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('initialize') do |method|
          method.define_argument('value')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 16 other locations - About 25 mins to fix
    lib/ruby-lint/definitions/core/drb.rb on lines 291..300
    lib/ruby-lint/definitions/core/name_error.rb on lines 7..16
    lib/ruby-lint/definitions/core/socket.rb on lines 2967..2976
    lib/ruby-lint/definitions/core/socket.rb on lines 3018..3027
    lib/ruby-lint/definitions/core/socket.rb on lines 3069..3078
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 1534..1543
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 2790..2799
    lib/ruby-lint/definitions/gems/devise.rb on lines 1733..1742
    lib/ruby-lint/definitions/gems/test.rb on lines 677..686
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 1872..1881
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 3422..3431
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 1528..1537
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 1625..1634
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 1643..1652
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 1878..1887
    lib/ruby-lint/definitions/rails/active_record.rb on lines 11653..11662

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

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

      defs.define_constant('Test::Unit::TestResultFailureSupport') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('add_failure') do |method|
          method.define_argument('failure')
    Severity: Minor
    Found in lib/ruby-lint/definitions/gems/test.rb and 3 other locations - About 25 mins to fix
    lib/ruby-lint/definitions/core/open_uri.rb on lines 41..52
    lib/ruby-lint/definitions/gems/test.rb on lines 2445..2456
    lib/ruby-lint/definitions/rails/active_support.rb on lines 3552..3563

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

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

      defs.define_constant('Test::Unit::TestResultErrorSupport') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('add_error') do |method|
          method.define_argument('error')
    Severity: Minor
    Found in lib/ruby-lint/definitions/gems/test.rb and 3 other locations - About 25 mins to fix
    lib/ruby-lint/definitions/core/open_uri.rb on lines 41..52
    lib/ruby-lint/definitions/gems/test.rb on lines 2459..2470
    lib/ruby-lint/definitions/rails/active_support.rb on lines 3552..3563

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

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

      defs.define_constant('Test::Unit::TestResultPendingSupport') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('add_pending') do |method|
          method.define_argument('pending')
    Severity: Minor
    Found in lib/ruby-lint/definitions/gems/test.rb and 5 other locations - About 20 mins to fix
    lib/ruby-lint/definitions/core/prime.rb on lines 250..259
    lib/ruby-lint/definitions/gems/sinatra.rb on lines 1288..1297
    lib/ruby-lint/definitions/gems/test.rb on lines 2473..2482
    lib/ruby-lint/definitions/gems/test.rb on lines 2485..2494
    lib/ruby-lint/definitions/rails/active_record.rb on lines 235..244

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

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

      defs.define_constant('Test::Unit::TestResultNotificationSupport') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('add_notification') do |method|
          method.define_argument('notification')
    Severity: Minor
    Found in lib/ruby-lint/definitions/gems/test.rb and 5 other locations - About 20 mins to fix
    lib/ruby-lint/definitions/core/prime.rb on lines 250..259
    lib/ruby-lint/definitions/gems/sinatra.rb on lines 1288..1297
    lib/ruby-lint/definitions/gems/test.rb on lines 2485..2494
    lib/ruby-lint/definitions/gems/test.rb on lines 2497..2506
    lib/ruby-lint/definitions/rails/active_record.rb on lines 235..244

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

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

      defs.define_constant('Test::Unit::TestResultOmissionSupport') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('add_omission') do |method|
          method.define_argument('omission')
    Severity: Minor
    Found in lib/ruby-lint/definitions/gems/test.rb and 5 other locations - About 20 mins to fix
    lib/ruby-lint/definitions/core/prime.rb on lines 250..259
    lib/ruby-lint/definitions/gems/sinatra.rb on lines 1288..1297
    lib/ruby-lint/definitions/gems/test.rb on lines 2473..2482
    lib/ruby-lint/definitions/gems/test.rb on lines 2497..2506
    lib/ruby-lint/definitions/rails/active_record.rb on lines 235..244

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

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

      defs.define_constant('Test::Unit::Util::BacktraceFilter') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_method('filter_backtrace') do |method|
          method.define_argument('backtrace')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 39 other locations - About 15 mins to fix
    lib/ruby-lint/definitions/core/abbrev.rb on lines 7..12
    lib/ruby-lint/definitions/core/erb.rb on lines 255..260
    lib/ruby-lint/definitions/core/open_ssl.rb on lines 2774..2779
    lib/ruby-lint/definitions/core/option_parser.rb on lines 1263..1268
    lib/ruby-lint/definitions/core/option_parser.rb on lines 1282..1287
    lib/ruby-lint/definitions/core/uri.rb on lines 1051..1056
    lib/ruby-lint/definitions/core/uri.rb on lines 1319..1324
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 2837..2842
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 3606..3611
    lib/ruby-lint/definitions/gems/devise.rb on lines 1824..1829
    lib/ruby-lint/definitions/gems/lib_xml.rb on lines 6807..6812
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 762..767
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 3693..3698
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 4187..4192
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 6376..6381
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 8524..8529
    lib/ruby-lint/definitions/gems/rspec.rb on lines 92..97
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2217..2222
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2226..2231
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6514..6519
    lib/ruby-lint/definitions/gems/test.rb on lines 1918..1923
    lib/ruby-lint/definitions/gems/test.rb on lines 2626..2631
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 967..972
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 1015..1020
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 2670..2675
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 659..664
    lib/ruby-lint/definitions/rails/action_view.rb on lines 526..531
    lib/ruby-lint/definitions/rails/action_view.rb on lines 3675..3680
    lib/ruby-lint/definitions/rails/action_view.rb on lines 5274..5279
    lib/ruby-lint/definitions/rails/active_record.rb on lines 36..41
    lib/ruby-lint/definitions/rails/active_record.rb on lines 1877..1882
    lib/ruby-lint/definitions/rails/active_record.rb on lines 5610..5615
    lib/ruby-lint/definitions/rails/active_record.rb on lines 9522..9527
    lib/ruby-lint/definitions/rails/active_support.rb on lines 701..706
    lib/ruby-lint/definitions/rails/active_support.rb on lines 1500..1505
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4319..4324
    lib/ruby-lint/definitions/rails/active_support.rb on lines 5166..5171
    lib/ruby-lint/definitions/rails/arel.rb on lines 7948..7953
    lib/ruby-lint/definitions/rails/rails.rb on lines 667..672

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

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

      defs.define_constant('Test::Unit::Priority::ClassMethods') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('priority') do |method|
          method.define_argument('name')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 39 other locations - About 15 mins to fix
    lib/ruby-lint/definitions/core/abbrev.rb on lines 7..12
    lib/ruby-lint/definitions/core/erb.rb on lines 255..260
    lib/ruby-lint/definitions/core/open_ssl.rb on lines 2774..2779
    lib/ruby-lint/definitions/core/option_parser.rb on lines 1263..1268
    lib/ruby-lint/definitions/core/option_parser.rb on lines 1282..1287
    lib/ruby-lint/definitions/core/uri.rb on lines 1051..1056
    lib/ruby-lint/definitions/core/uri.rb on lines 1319..1324
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 2837..2842
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 3606..3611
    lib/ruby-lint/definitions/gems/devise.rb on lines 1824..1829
    lib/ruby-lint/definitions/gems/lib_xml.rb on lines 6807..6812
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 762..767
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 3693..3698
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 4187..4192
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 6376..6381
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 8524..8529
    lib/ruby-lint/definitions/gems/rspec.rb on lines 92..97
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2217..2222
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2226..2231
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6514..6519
    lib/ruby-lint/definitions/gems/test.rb on lines 2602..2607
    lib/ruby-lint/definitions/gems/test.rb on lines 2626..2631
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 967..972
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 1015..1020
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 2670..2675
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 659..664
    lib/ruby-lint/definitions/rails/action_view.rb on lines 526..531
    lib/ruby-lint/definitions/rails/action_view.rb on lines 3675..3680
    lib/ruby-lint/definitions/rails/action_view.rb on lines 5274..5279
    lib/ruby-lint/definitions/rails/active_record.rb on lines 36..41
    lib/ruby-lint/definitions/rails/active_record.rb on lines 1877..1882
    lib/ruby-lint/definitions/rails/active_record.rb on lines 5610..5615
    lib/ruby-lint/definitions/rails/active_record.rb on lines 9522..9527
    lib/ruby-lint/definitions/rails/active_support.rb on lines 701..706
    lib/ruby-lint/definitions/rails/active_support.rb on lines 1500..1505
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4319..4324
    lib/ruby-lint/definitions/rails/active_support.rb on lines 5166..5171
    lib/ruby-lint/definitions/rails/arel.rb on lines 7948..7953
    lib/ruby-lint/definitions/rails/rails.rb on lines 667..672

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

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

      defs.define_constant('Test::Unit::Util::MethodOwnerFinder') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_method('find') do |method|
          method.define_argument('object')
    Severity: Major
    Found in lib/ruby-lint/definitions/gems/test.rb and 39 other locations - About 15 mins to fix
    lib/ruby-lint/definitions/core/abbrev.rb on lines 7..12
    lib/ruby-lint/definitions/core/erb.rb on lines 255..260
    lib/ruby-lint/definitions/core/open_ssl.rb on lines 2774..2779
    lib/ruby-lint/definitions/core/option_parser.rb on lines 1263..1268
    lib/ruby-lint/definitions/core/option_parser.rb on lines 1282..1287
    lib/ruby-lint/definitions/core/uri.rb on lines 1051..1056
    lib/ruby-lint/definitions/core/uri.rb on lines 1319..1324
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 2837..2842
    lib/ruby-lint/definitions/gems/celluloid.rb on lines 3606..3611
    lib/ruby-lint/definitions/gems/devise.rb on lines 1824..1829
    lib/ruby-lint/definitions/gems/lib_xml.rb on lines 6807..6812
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 762..767
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 3693..3698
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 4187..4192
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 6376..6381
    lib/ruby-lint/definitions/gems/mongoid.rb on lines 8524..8529
    lib/ruby-lint/definitions/gems/rspec.rb on lines 92..97
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2217..2222
    lib/ruby-lint/definitions/gems/rspec.rb on lines 2226..2231
    lib/ruby-lint/definitions/gems/rspec.rb on lines 6514..6519
    lib/ruby-lint/definitions/gems/test.rb on lines 1918..1923
    lib/ruby-lint/definitions/gems/test.rb on lines 2602..2607
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 967..972
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 1015..1020
    lib/ruby-lint/definitions/rails/action_controller.rb on lines 2670..2675
    lib/ruby-lint/definitions/rails/action_dispatch.rb on lines 659..664
    lib/ruby-lint/definitions/rails/action_view.rb on lines 526..531
    lib/ruby-lint/definitions/rails/action_view.rb on lines 3675..3680
    lib/ruby-lint/definitions/rails/action_view.rb on lines 5274..5279
    lib/ruby-lint/definitions/rails/active_record.rb on lines 36..41
    lib/ruby-lint/definitions/rails/active_record.rb on lines 1877..1882
    lib/ruby-lint/definitions/rails/active_record.rb on lines 5610..5615
    lib/ruby-lint/definitions/rails/active_record.rb on lines 9522..9527
    lib/ruby-lint/definitions/rails/active_support.rb on lines 701..706
    lib/ruby-lint/definitions/rails/active_support.rb on lines 1500..1505
    lib/ruby-lint/definitions/rails/active_support.rb on lines 4319..4324
    lib/ruby-lint/definitions/rails/active_support.rb on lines 5166..5171
    lib/ruby-lint/definitions/rails/arel.rb on lines 7948..7953
    lib/ruby-lint/definitions/rails/rails.rb on lines 667..672

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

    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

    There are no issues that match your filters.

    Category
    Status