YorickPeterse/ruby-lint

View on GitHub

Showing 2,162 of 2,162 total issues

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

  defs.define_constant('ActionDispatch::Cookies::VerifyAndUpgradeLegacySignedMessage') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('verify_and_upgrade_legacy_signed_message') do |method|
      method.define_argument('name')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_dispatch.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/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_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('RSpec::CallerFilter') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_method('first_non_rspec_line') do |method|
      method.define_optional_argument('skip_frames')
Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.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 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/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('Mongoid::Sessions::Validators::Storage') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('validate') do |method|
      method.define_argument('klass')
Severity: Major
Found in lib/ruby-lint/definitions/gems/mongoid.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/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/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('ActionController::Flash') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('redirect_to') do |method|
      method.define_optional_argument('options')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_controller.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/gems/test.rb on lines 2626..2631
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('ActiveSupport::Rescuable::ClassMethods') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('rescue_from') do |method|
      method.define_rest_argument('klasses')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_support.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/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 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('ActiveRecord::DynamicMatchers') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('respond_to?') do |method|
      method.define_argument('name')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_record.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/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 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('RSpec::Core::Formatters') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_method('register') do |method|
      method.define_argument('formatter_class')
Severity: Major
Found in lib/ruby-lint/definitions/gems/rspec.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 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/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('URI::Util') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_method('make_components_hash') do |method|
      method.define_argument('klass')
Severity: Major
Found in lib/ruby-lint/definitions/core/uri.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/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/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('Abbrev') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_method('abbrev') do |method|
      method.define_argument('words')
Severity: Major
Found in lib/ruby-lint/definitions/core/abbrev.rb and 39 other locations - About 15 mins to fix
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/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('ActiveSupport::Callbacks') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('run_callbacks') do |method|
      method.define_argument('kind')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_support.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/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 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('Arel::Visitors::WhereSql') do |klass|
    klass.inherits(defs.constant_proxy('Arel::Visitors::ToSql', RubyLint.registry))

    klass.define_instance_method('visit_Arel_Nodes_SelectCore') do |method|
      method.define_argument('o')
Severity: Major
Found in lib/ruby-lint/definitions/rails/arel.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/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/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('Rails::DeprecatedConstant') do |klass|
    klass.inherits(defs.constant_proxy('ActiveSupport::Deprecation::DeprecatedConstantProxy', RubyLint.registry))

    klass.define_method('deprecate') do |method|
      method.define_argument('old')
Severity: Major
Found in lib/ruby-lint/definitions/rails/rails.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/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

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

    klass.define_instance_method('head') do |method|
      method.define_argument('status')
Severity: Major
Found in lib/ruby-lint/definitions/rails/action_controller.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/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 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('URI::HTTPS::Util') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_method('make_components_hash') do |method|
      method.define_argument('klass')
Severity: Major
Found in lib/ruby-lint/definitions/core/uri.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 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/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('ActiveRecord::Base::AttrNames') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_method('set_name_cache') do |method|
      method.define_argument('name')
Severity: Major
Found in lib/ruby-lint/definitions/rails/active_record.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/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 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('OptionParser::Switch::OptionalArgument::RequiredArgument') do |klass|
    klass.inherits(defs.constant_proxy('OptionParser::Switch', RubyLint.registry))

    klass.define_instance_method('parse') do |method|
      method.define_argument('arg')
Severity: Major
Found in lib/ruby-lint/definitions/core/option_parser.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 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/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('Mongoid::Attributes::ClassMethods') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('alias_attribute') do |method|
      method.define_argument('name')
Severity: Major
Found in lib/ruby-lint/definitions/gems/mongoid.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 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/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('Celluloid::PoolManager::Properties') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_instance_method('property') do |method|
      method.define_argument('name')
Severity: Major
Found in lib/ruby-lint/definitions/gems/celluloid.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 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/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('OpenSSL::SSL') do |klass|
    klass.inherits(defs.constant_proxy('Object', RubyLint.registry))

    klass.define_method('verify_certificate_identity') do |method|
      method.define_argument('cert')
Severity: Major
Found in lib/ruby-lint/definitions/core/open_ssl.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/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/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

Severity
Category
Status
Source
Language