YorickPeterse/ruby-lint

View on GitHub

Showing 2,162 of 2,162 total issues

Class VirtualMachine has 71 methods (exceeds 20 allowed). Consider refactoring.
Open

  class VirtualMachine < Iterator
    include MethodEvaluation

    attr_reader :associations,
      :comments,
Severity: Major
Found in lib/ruby-lint/virtual_machine.rb - About 1 day to fix

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

      defs.define_constant('ActionMailer::Base::ClassMethods') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('_insert_callbacks') do |method|
          method.define_argument('callbacks')
    Severity: Major
    Found in lib/ruby-lint/definitions/rails/action_mailer.rb and 1 other location - About 1 day to fix
    lib/ruby-lint/definitions/rails/abstract_controller.rb on lines 111..248

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

    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('AbstractController::Callbacks::ClassMethods') do |klass|
        klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
    
        klass.define_instance_method('_insert_callbacks') do |method|
          method.define_argument('callbacks')
    Severity: Major
    Found in lib/ruby-lint/definitions/rails/abstract_controller.rb and 1 other location - About 1 day to fix
    lib/ruby-lint/definitions/rails/action_mailer.rb on lines 539..676

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

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

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

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

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

    Refactorings

    Further Reading

    File virtual_machine.rb has 587 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    module RubyLint
      ##
      # {RubyLint::VirtualMachine} is the heart of ruby-lint. It takes a AST
      # generated by {RubyLint::Parser}, iterates it and builds various definitions
      # of methods, variables, etc.
    Severity: Major
    Found in lib/ruby-lint/virtual_machine.rb - About 1 day to fix

      File io.rb has 572 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      RubyLint.registry.register('IO') do |defs|
        defs.define_constant('IO') do |klass|
          klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
          klass.inherits(defs.constant_proxy('Unmarshalable', RubyLint.registry))
          klass.inherits(defs.constant_proxy('File::Constants', RubyLint.registry))
      Severity: Major
      Found in lib/ruby-lint/definitions/core/io.rb - About 1 day to fix

        File minitest.rb has 542 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        RubyLint.registry.register('Minitest') do |defs|
          defs.define_constant('Minitest') do |klass|
            klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
        
            klass.define_method('__run') do |method|
        Severity: Major
        Found in lib/ruby-lint/definitions/gems/minitest.rb - About 1 day to fix

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

            defs.define_constant('Mongoid::Atomic::Modifiers::Entries') do |klass|
              klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
              klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))
          
              klass.define_method('[]') do |method|
          Severity: Major
          Found in lib/ruby-lint/definitions/gems/mongoid.rb and 1 other location - About 1 day to fix
          lib/ruby-lint/definitions/gems/mongoid.rb on lines 7156..7282

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

          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('Mongoid::Relations::Metadata::Entries') do |klass|
              klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
              klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))
          
              klass.define_method('[]') do |method|
          Severity: Major
          Found in lib/ruby-lint/definitions/gems/mongoid.rb and 1 other location - About 1 day to fix
          lib/ruby-lint/definitions/gems/mongoid.rb on lines 367..493

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

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

            defs.define_constant('ActiveSupport::OrderedOptions::Entries') do |klass|
              klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
              klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))
          
              klass.define_method('[]') do |method|
          Severity: Major
          Found in lib/ruby-lint/definitions/rails/active_support.rb and 10 other locations - About 1 day to fix
          lib/ruby-lint/definitions/core/hash.rb on lines 304..428
          lib/ruby-lint/definitions/core/option_parser.rb on lines 371..495
          lib/ruby-lint/definitions/core/option_parser.rb on lines 841..965
          lib/ruby-lint/definitions/core/syck.rb on lines 709..833
          lib/ruby-lint/definitions/core/syck.rb on lines 1011..1135
          lib/ruby-lint/definitions/rails/action_controller.rb on lines 1990..2114
          lib/ruby-lint/definitions/rails/active_support.rb on lines 1953..2077
          lib/ruby-lint/definitions/rails/active_support.rb on lines 2387..2511
          lib/ruby-lint/definitions/rails/active_support.rb on lines 3614..3738
          lib/ruby-lint/definitions/rails/sprockets.rb on lines 1378..1502

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

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

            defs.define_constant('OptionParser::CompletingHash::Entries') do |klass|
              klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
              klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))
          
              klass.define_method('[]') do |method|
          Severity: Major
          Found in lib/ruby-lint/definitions/core/option_parser.rb and 10 other locations - About 1 day to fix
          lib/ruby-lint/definitions/core/hash.rb on lines 304..428
          lib/ruby-lint/definitions/core/option_parser.rb on lines 841..965
          lib/ruby-lint/definitions/core/syck.rb on lines 709..833
          lib/ruby-lint/definitions/core/syck.rb on lines 1011..1135
          lib/ruby-lint/definitions/rails/action_controller.rb on lines 1990..2114
          lib/ruby-lint/definitions/rails/active_support.rb on lines 1953..2077
          lib/ruby-lint/definitions/rails/active_support.rb on lines 2387..2511
          lib/ruby-lint/definitions/rails/active_support.rb on lines 3614..3738
          lib/ruby-lint/definitions/rails/active_support.rb on lines 3918..4042
          lib/ruby-lint/definitions/rails/sprockets.rb on lines 1378..1502

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

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

            defs.define_constant('ActiveSupport::OrderedHash::Entries') do |klass|
              klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
              klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))
          
              klass.define_method('[]') do |method|
          Severity: Major
          Found in lib/ruby-lint/definitions/rails/active_support.rb and 10 other locations - About 1 day to fix
          lib/ruby-lint/definitions/core/hash.rb on lines 304..428
          lib/ruby-lint/definitions/core/option_parser.rb on lines 371..495
          lib/ruby-lint/definitions/core/option_parser.rb on lines 841..965
          lib/ruby-lint/definitions/core/syck.rb on lines 709..833
          lib/ruby-lint/definitions/core/syck.rb on lines 1011..1135
          lib/ruby-lint/definitions/rails/action_controller.rb on lines 1990..2114
          lib/ruby-lint/definitions/rails/active_support.rb on lines 1953..2077
          lib/ruby-lint/definitions/rails/active_support.rb on lines 2387..2511
          lib/ruby-lint/definitions/rails/active_support.rb on lines 3918..4042
          lib/ruby-lint/definitions/rails/sprockets.rb on lines 1378..1502

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

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

            defs.define_constant('ActionController::Parameters::Entries') do |klass|
              klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
              klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))
          
              klass.define_method('[]') do |method|
          Severity: Major
          Found in lib/ruby-lint/definitions/rails/action_controller.rb and 10 other locations - About 1 day to fix
          lib/ruby-lint/definitions/core/hash.rb on lines 304..428
          lib/ruby-lint/definitions/core/option_parser.rb on lines 371..495
          lib/ruby-lint/definitions/core/option_parser.rb on lines 841..965
          lib/ruby-lint/definitions/core/syck.rb on lines 709..833
          lib/ruby-lint/definitions/core/syck.rb on lines 1011..1135
          lib/ruby-lint/definitions/rails/active_support.rb on lines 1953..2077
          lib/ruby-lint/definitions/rails/active_support.rb on lines 2387..2511
          lib/ruby-lint/definitions/rails/active_support.rb on lines 3614..3738
          lib/ruby-lint/definitions/rails/active_support.rb on lines 3918..4042
          lib/ruby-lint/definitions/rails/sprockets.rb on lines 1378..1502

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

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

            defs.define_constant('ActiveSupport::InheritableOptions::Entries') do |klass|
              klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
              klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))
          
              klass.define_method('[]') do |method|
          Severity: Major
          Found in lib/ruby-lint/definitions/rails/active_support.rb and 10 other locations - About 1 day to fix
          lib/ruby-lint/definitions/core/hash.rb on lines 304..428
          lib/ruby-lint/definitions/core/option_parser.rb on lines 371..495
          lib/ruby-lint/definitions/core/option_parser.rb on lines 841..965
          lib/ruby-lint/definitions/core/syck.rb on lines 709..833
          lib/ruby-lint/definitions/core/syck.rb on lines 1011..1135
          lib/ruby-lint/definitions/rails/action_controller.rb on lines 1990..2114
          lib/ruby-lint/definitions/rails/active_support.rb on lines 1953..2077
          lib/ruby-lint/definitions/rails/active_support.rb on lines 3614..3738
          lib/ruby-lint/definitions/rails/active_support.rb on lines 3918..4042
          lib/ruby-lint/definitions/rails/sprockets.rb on lines 1378..1502

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

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

            defs.define_constant('OptionParser::OptionMap::Entries') do |klass|
              klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
              klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))
          
              klass.define_method('[]') do |method|
          Severity: Major
          Found in lib/ruby-lint/definitions/core/option_parser.rb and 10 other locations - About 1 day to fix
          lib/ruby-lint/definitions/core/hash.rb on lines 304..428
          lib/ruby-lint/definitions/core/option_parser.rb on lines 371..495
          lib/ruby-lint/definitions/core/syck.rb on lines 709..833
          lib/ruby-lint/definitions/core/syck.rb on lines 1011..1135
          lib/ruby-lint/definitions/rails/action_controller.rb on lines 1990..2114
          lib/ruby-lint/definitions/rails/active_support.rb on lines 1953..2077
          lib/ruby-lint/definitions/rails/active_support.rb on lines 2387..2511
          lib/ruby-lint/definitions/rails/active_support.rb on lines 3614..3738
          lib/ruby-lint/definitions/rails/active_support.rb on lines 3918..4042
          lib/ruby-lint/definitions/rails/sprockets.rb on lines 1378..1502

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

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

            defs.define_constant('Syck::Set::Entries') do |klass|
              klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
              klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))
          
              klass.define_method('[]') do |method|
          Severity: Major
          Found in lib/ruby-lint/definitions/core/syck.rb and 10 other locations - About 1 day to fix
          lib/ruby-lint/definitions/core/hash.rb on lines 304..428
          lib/ruby-lint/definitions/core/option_parser.rb on lines 371..495
          lib/ruby-lint/definitions/core/option_parser.rb on lines 841..965
          lib/ruby-lint/definitions/core/syck.rb on lines 1011..1135
          lib/ruby-lint/definitions/rails/action_controller.rb on lines 1990..2114
          lib/ruby-lint/definitions/rails/active_support.rb on lines 1953..2077
          lib/ruby-lint/definitions/rails/active_support.rb on lines 2387..2511
          lib/ruby-lint/definitions/rails/active_support.rb on lines 3614..3738
          lib/ruby-lint/definitions/rails/active_support.rb on lines 3918..4042
          lib/ruby-lint/definitions/rails/sprockets.rb on lines 1378..1502

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

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

            defs.define_constant('Syck::SpecialHash::Entries') do |klass|
              klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
              klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))
          
              klass.define_method('[]') do |method|
          Severity: Major
          Found in lib/ruby-lint/definitions/core/syck.rb and 10 other locations - About 1 day to fix
          lib/ruby-lint/definitions/core/hash.rb on lines 304..428
          lib/ruby-lint/definitions/core/option_parser.rb on lines 371..495
          lib/ruby-lint/definitions/core/option_parser.rb on lines 841..965
          lib/ruby-lint/definitions/core/syck.rb on lines 709..833
          lib/ruby-lint/definitions/rails/action_controller.rb on lines 1990..2114
          lib/ruby-lint/definitions/rails/active_support.rb on lines 1953..2077
          lib/ruby-lint/definitions/rails/active_support.rb on lines 2387..2511
          lib/ruby-lint/definitions/rails/active_support.rb on lines 3614..3738
          lib/ruby-lint/definitions/rails/active_support.rb on lines 3918..4042
          lib/ruby-lint/definitions/rails/sprockets.rb on lines 1378..1502

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

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

            defs.define_constant('ActiveSupport::HashWithIndifferentAccess::Entries') do |klass|
              klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
              klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))
          
              klass.define_method('[]') do |method|
          Severity: Major
          Found in lib/ruby-lint/definitions/rails/active_support.rb and 10 other locations - About 1 day to fix
          lib/ruby-lint/definitions/core/hash.rb on lines 304..428
          lib/ruby-lint/definitions/core/option_parser.rb on lines 371..495
          lib/ruby-lint/definitions/core/option_parser.rb on lines 841..965
          lib/ruby-lint/definitions/core/syck.rb on lines 709..833
          lib/ruby-lint/definitions/core/syck.rb on lines 1011..1135
          lib/ruby-lint/definitions/rails/action_controller.rb on lines 1990..2114
          lib/ruby-lint/definitions/rails/active_support.rb on lines 2387..2511
          lib/ruby-lint/definitions/rails/active_support.rb on lines 3614..3738
          lib/ruby-lint/definitions/rails/active_support.rb on lines 3918..4042
          lib/ruby-lint/definitions/rails/sprockets.rb on lines 1378..1502

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

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

            defs.define_constant('Hash::Entries') do |klass|
              klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
              klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))
          
              klass.define_method('[]') do |method|
          Severity: Major
          Found in lib/ruby-lint/definitions/core/hash.rb and 10 other locations - About 1 day to fix
          lib/ruby-lint/definitions/core/option_parser.rb on lines 371..495
          lib/ruby-lint/definitions/core/option_parser.rb on lines 841..965
          lib/ruby-lint/definitions/core/syck.rb on lines 709..833
          lib/ruby-lint/definitions/core/syck.rb on lines 1011..1135
          lib/ruby-lint/definitions/rails/action_controller.rb on lines 1990..2114
          lib/ruby-lint/definitions/rails/active_support.rb on lines 1953..2077
          lib/ruby-lint/definitions/rails/active_support.rb on lines 2387..2511
          lib/ruby-lint/definitions/rails/active_support.rb on lines 3614..3738
          lib/ruby-lint/definitions/rails/active_support.rb on lines 3918..4042
          lib/ruby-lint/definitions/rails/sprockets.rb on lines 1378..1502

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

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

            defs.define_constant('Sprockets::Railtie::OrderedOptions::Entries') do |klass|
              klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
              klass.inherits(defs.constant_proxy('Enumerable', RubyLint.registry))
          
              klass.define_method('[]') do |method|
          Severity: Major
          Found in lib/ruby-lint/definitions/rails/sprockets.rb and 10 other locations - About 1 day to fix
          lib/ruby-lint/definitions/core/hash.rb on lines 304..428
          lib/ruby-lint/definitions/core/option_parser.rb on lines 371..495
          lib/ruby-lint/definitions/core/option_parser.rb on lines 841..965
          lib/ruby-lint/definitions/core/syck.rb on lines 709..833
          lib/ruby-lint/definitions/core/syck.rb on lines 1011..1135
          lib/ruby-lint/definitions/rails/action_controller.rb on lines 1990..2114
          lib/ruby-lint/definitions/rails/active_support.rb on lines 1953..2077
          lib/ruby-lint/definitions/rails/active_support.rb on lines 2387..2511
          lib/ruby-lint/definitions/rails/active_support.rb on lines 3614..3738
          lib/ruby-lint/definitions/rails/active_support.rb on lines 3918..4042

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

          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('Sinatra::Application::OkJson') do |klass|
              klass.inherits(defs.constant_proxy('Object', RubyLint.registry))
          
              klass.define_instance_method('abbrev') do |method|
                method.define_argument('s')
          Severity: Major
          Found in lib/ruby-lint/definitions/gems/sinatra.rb and 1 other location - About 1 day to fix
          lib/ruby-lint/definitions/gems/sinatra.rb on lines 1094..1216

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

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

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

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

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

          Refactorings

          Further Reading

          Severity
          Category
          Status
          Source
          Language